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

Increase testing coverage #34

Open
Xkonti opened this issue Oct 4, 2023 · 0 comments
Open

Increase testing coverage #34

Xkonti opened this issue Oct 4, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Issues that qualify towards Hacktoberfest goals.

Comments

@Xkonti
Copy link
Owner

Xkonti commented Oct 4, 2023

Please feel free to pick any of the not-implemented operation and add tests - even if not coplete.

Problem

All operations should be covered by tests to enforce that the library is correct at all times.

The challenge in thoroughly testing the library lays in the sheer amount of possible variants of each operation:

  • Each operation has 4 variants depending on vector type (V2F, V3F, V2I, V3I)
  • Some operations might have additional variants in form of Comp
  • Some operations might have additional variants in form of InPlace
  • Some operations might have additional variants in form of CompInPlace
  • Each of the 4 variants represents a range of allowed types:
    • V2F and V3F allow for float32 and float64 turning it from 2 to 4 permutations
    • V2I and V3I allow for int, int8, int16, int32 and int64 turning it from 2 to 10 permutations

An operation like Add could be considered to have a high number of variants:

  • Add, AddComp, AddInPlace, AddCompInPlace = 4 variants
  • V2F and V3F introduce 4 variants of each = 4*4 = 16variants
  • V2I and V3I introduce 10 more variants of each = 4*10 = 40variants

That produces 16+40=56 variants of Add to run multiple tests on!

Current status

Checkmark Name of the function Status
✖️ Abs Partial ( #37 )
✖️ Add Only basic for V2F and V2I implemented
✖️ AddScalar NONE
✖️ AngleBetweenDeg NONE
✖️ AngleBetweenRad NONE
✖️ Apply NONE
✖️ Array NONE
✖️ Ceil NONE
✖️ ClampComp NONE
✖️ ClampLen NONE
✖️ Cross NONE
✖️ Discard NONE
✖️ Distance NONE
✖️ Div NONE
✖️ DivScalar NONE
✖️ Dot NONE
✖️ Extend NONE
✖️ Floor NONE
✖️ Insert NONE
✖️ Inv NONE
✖️ IsZero NONE
✖️ Len NONE
✖️ LenSqrt NONE
✖️ Math NONE
✔️ Max Implemented
✔️ Min Implemented
✖️ Mod NONE
✖️ ModScalar NONE
✖️ Mul NONE
✖️ MulScalar NONE
✖️ Neg NONE
✖️ New NONE
✖️ Norm NONE
✖️ Pow NONE
✖️ Pow2 NONE
✖️ Pow3 NONE
✖️ PowN NONE
✖️ PowNFloat NONE
✖️ Round NONE
✖️ Slice NONE
✖️ Split NONE
✖️ Sqrt NONE
✖️ Sub NONE
✖️ SubScalar NONE
✖️ Swizzle NONE
@Xkonti Xkonti added enhancement New feature or request good first issue Good for newcomers hacktoberfest Issues that qualify towards Hacktoberfest goals. labels Oct 4, 2023
Xkonti pushed a commit that referenced this issue Oct 5, 2023
I was looking to implement IsZero yesterday but my knowledge on vectors
is bad. It has been implemented already, so I decided to write a test
instead

Related: #34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Issues that qualify towards Hacktoberfest goals.
Projects
None yet
Development

No branches or pull requests

1 participant