Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for vector syntaxes #6163

Merged
merged 19 commits into from
Apr 8, 2024
Merged

Conversation

sovdeeth
Copy link
Member

@sovdeeth sovdeeth commented Nov 1, 2023

Description

Adds tests for all vector-related syntaxes. Fixes up some docs/pattern issues with assorted vector syntaxes as well.


Target Minecraft Versions: any
Requirements: none
Related Issues: #6158

@sovdeeth sovdeeth added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Nov 1, 2023
@Moderocky
Copy link
Member

Looking good so far, I'm ticking off all the ones you make so that nobody else makes the same.

@Moderocky Moderocky added the adds-missing-test For contributions that (primarily) add missing automated test files (see #6158). label Nov 1, 2023
@Moderocky
Copy link
Member

Moderocky commented Nov 1, 2023

As far as I can see, the remaining ones are:

  • ExprLocationFromVector
  • ExprVectorFromYawAndPitch
  • ExprLocationVectorOffset
  • ExprVectorNormalize
  • ExprVectorSquaredLength
  • ExprVectorOfLocation
  • ExprVectorSpherical
  • ExprVectorXYZ
  • ExprVectorLength

then

  • CondIsVectorNormalized

and

  • EffVectorRotateAroundAnother
  • EffVectorRotateXYZ

@Moderocky Moderocky marked this pull request as ready for review November 7, 2023 12:48
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few minor suggestions

@sovdeeth sovdeeth added the 2.8 Targeting a 2.8.X version release label Jan 1, 2024
@sovdeeth sovdeeth added 2.9 Targeting a 2.9.X version release and removed 2.8 Targeting a 2.8.X version release labels Mar 21, 2024
Copy link
Member

@Moderocky Moderocky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work.

@Moderocky Moderocky added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Apr 8, 2024
@Moderocky Moderocky merged commit b1db6d1 into SkriptLang:dev/patch Apr 8, 2024
4 checks passed
sovdeeth added a commit to sovdeeth/Skript that referenced this pull request Apr 18, 2024
* vector tests pt1

* Add test for vector random being within expected bounds.

* Add XYZ vector test.

* Add vector XYZ component test.

* Add vector length test.

* Add vector normalise test.

* Add vector from yaw and pitch test.

* Add vector of location test

* Add squared length test.

* Add location vector offset test.

* Add missing indefinite article to syntax.

* Add tests for spherical vectors.

* Fix a little oopsie.

* Apply suggestions from code review

Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>

* test updates

---------

Co-authored-by: Moderocky <admin@moderocky.com>
Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.9 Targeting a 2.9.X version release adds-missing-test For contributions that (primarily) add missing automated test files (see #6158). enhancement Feature request, an issue about something that could be improved, or a PR improving something. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants