Added generic vector tag to all vector unit tests
This commit is contained in:
106
Test/Vector2.cpp
106
Test/Vector2.cpp
@@ -12,7 +12,7 @@ namespace {
|
||||
}
|
||||
|
||||
// Tests if all values are 0 after initialization via default constructor
|
||||
TEST_CASE(__FILE__"/New_Vector_All_0", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/New_Vector_All_0", "[Vector][Vector2]")
|
||||
{
|
||||
Vector2d v2;
|
||||
|
||||
@@ -23,7 +23,7 @@ TEST_CASE(__FILE__"/New_Vector_All_0", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests if values can be set via the constructor
|
||||
TEST_CASE(__FILE__"/Can_Set_Values_Constructor", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Can_Set_Values_Constructor", "[Vector][Vector2]")
|
||||
{
|
||||
Vector2d v2(69, 32);
|
||||
|
||||
@@ -34,7 +34,7 @@ TEST_CASE(__FILE__"/Can_Set_Values_Constructor", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests if values can be set via letters
|
||||
TEST_CASE(__FILE__"/Can_Set_Values_Letters", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Can_Set_Values_Letters", "[Vector][Vector2]")
|
||||
{
|
||||
Vector2d v2;
|
||||
v2.x = 69;
|
||||
@@ -47,7 +47,7 @@ TEST_CASE(__FILE__"/Can_Set_Values_Letters", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests if values can be set via array descriptors
|
||||
TEST_CASE(__FILE__"/Can_Set_Values_ArrayDescriptor", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Can_Set_Values_ArrayDescriptor", "[Vector][Vector2]")
|
||||
{
|
||||
Vector2d v2;
|
||||
v2[0] = 69;
|
||||
@@ -60,7 +60,7 @@ TEST_CASE(__FILE__"/Can_Set_Values_ArrayDescriptor", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests if values can be set via an initializer list
|
||||
TEST_CASE(__FILE__"/Can_Set_Values_InitializerList", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Can_Set_Values_InitializerList", "[Vector][Vector2]")
|
||||
{
|
||||
Vector2d v2 = {69, 32};
|
||||
|
||||
@@ -71,7 +71,7 @@ TEST_CASE(__FILE__"/Can_Set_Values_InitializerList", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for vectors copied via the copy constructor to have the same values
|
||||
TEST_CASE(__FILE__"/Copy_Constructor_Same_Values", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Copy_Constructor_Same_Values", "[Vector][Vector2]")
|
||||
{
|
||||
Vector2d a(69, 32);
|
||||
Vector2d b(a);
|
||||
@@ -83,7 +83,7 @@ TEST_CASE(__FILE__"/Copy_Constructor_Same_Values", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for vectors copied via the equals operator to have the same values
|
||||
TEST_CASE(__FILE__"/Operator_Equals_Same_Values", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Equals_Same_Values", "[Vector][Vector2]")
|
||||
{
|
||||
Vector2d a(69, 32);
|
||||
Vector2d b = a;
|
||||
@@ -95,7 +95,7 @@ TEST_CASE(__FILE__"/Operator_Equals_Same_Values", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for vectors copied via the copy constructor to be modifyable without modifying the original object
|
||||
TEST_CASE(__FILE__"/Copy_Constructor_Independent", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Copy_Constructor_Independent", "[Vector][Vector2]")
|
||||
{
|
||||
Vector2d a(69, 32);
|
||||
Vector2d b(a);
|
||||
@@ -113,7 +113,7 @@ TEST_CASE(__FILE__"/Copy_Constructor_Independent", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for vectors copied via the equals operator to be modifyable without modifying the original object
|
||||
TEST_CASE(__FILE__"/Operator_Equals_Independent", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Equals_Independent", "[Vector][Vector2]")
|
||||
{
|
||||
Vector2d a(69, 32);
|
||||
Vector2d b = a;
|
||||
@@ -132,7 +132,7 @@ TEST_CASE(__FILE__"/Operator_Equals_Independent", "[Vector2]")
|
||||
|
||||
// Tests if the dot product between two vectors angled 90 degrees from one another is 0. It should by definition be 0!
|
||||
// Dot products are commutative, so we'll check both directions.
|
||||
TEST_CASE(__FILE__"/DotProduct_90deg", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/DotProduct_90deg", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 100; i++)
|
||||
@@ -152,7 +152,7 @@ TEST_CASE(__FILE__"/DotProduct_90deg", "[Vector2]")
|
||||
|
||||
// Test if the dot product is positive for two vectors angled less than 90 degrees from another
|
||||
// Dot products are commutative, so we'll check both directions.
|
||||
TEST_CASE(__FILE__"/DotProduct_LessThan90deg", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/DotProduct_LessThan90deg", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -172,7 +172,7 @@ TEST_CASE(__FILE__"/DotProduct_LessThan90deg", "[Vector2]")
|
||||
|
||||
// Test if the dot product is negative for two vectors angled greater than 90 degrees from another
|
||||
// Dot products are commutative, so we'll check both directions.
|
||||
TEST_CASE(__FILE__"/DotProduct_GreaterThan90deg", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/DotProduct_GreaterThan90deg", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -191,7 +191,7 @@ TEST_CASE(__FILE__"/DotProduct_GreaterThan90deg", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests that the dot product is correct for a known value
|
||||
TEST_CASE(__FILE__"/DotProduct_Oracle", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/DotProduct_Oracle", "[Vector][Vector2]")
|
||||
{
|
||||
// Setup
|
||||
const Vector2d a(-99, 199);
|
||||
@@ -207,7 +207,7 @@ TEST_CASE(__FILE__"/DotProduct_Oracle", "[Vector2]")
|
||||
}
|
||||
|
||||
// Quick and dirty check if the useless int-method is working
|
||||
TEST_CASE(__FILE__"/DotProduct_Dirty_Int", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/DotProduct_Dirty_Int", "[Vector][Vector2]")
|
||||
{
|
||||
Vector2i a;
|
||||
Vector2i b;
|
||||
@@ -237,7 +237,7 @@ TEST_CASE(__FILE__"/DotProduct_Dirty_Int", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests if the cross product of two vectors of the exact opposite direction is 0
|
||||
TEST_CASE(__FILE__"/CrossProduct_Opposite_Direction", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/CrossProduct_Opposite_Direction", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -259,7 +259,7 @@ TEST_CASE(__FILE__"/CrossProduct_Opposite_Direction", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests if the cross product of two vectors of the exact same direction is 0
|
||||
TEST_CASE(__FILE__"/CrossProduct_Same_Direction", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/CrossProduct_Same_Direction", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -281,7 +281,7 @@ TEST_CASE(__FILE__"/CrossProduct_Same_Direction", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for the cross product to be positive, if vector b is to the left of a
|
||||
TEST_CASE(__FILE__"/CrossProduct_BToTheLeft", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/CrossProduct_BToTheLeft", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -303,7 +303,7 @@ TEST_CASE(__FILE__"/CrossProduct_BToTheLeft", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for the cross product to be negative, if vector b is to the left of a
|
||||
TEST_CASE(__FILE__"/CrossProduct_BToTheRight", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/CrossProduct_BToTheRight", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -325,7 +325,7 @@ TEST_CASE(__FILE__"/CrossProduct_BToTheRight", "[Vector2]")
|
||||
}
|
||||
|
||||
// Quick and dirty check if the useless int-method is working
|
||||
TEST_CASE(__FILE__"/CrossProduct_Dirty_Int", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/CrossProduct_Dirty_Int", "[Vector][Vector2]")
|
||||
{
|
||||
Vector2i a;
|
||||
Vector2i b;
|
||||
@@ -360,7 +360,7 @@ TEST_CASE(__FILE__"/CrossProduct_Dirty_Int", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests the SqrMagnitude method to work as expected with random numbers
|
||||
TEST_CASE(__FILE__"/SqrMagnitude", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/SqrMagnitude", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -376,7 +376,7 @@ TEST_CASE(__FILE__"/SqrMagnitude", "[Vector2]")
|
||||
}
|
||||
|
||||
// Checks if the int method is working
|
||||
TEST_CASE(__FILE__"/SqrMagnitude_Int", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/SqrMagnitude_Int", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -392,14 +392,14 @@ TEST_CASE(__FILE__"/SqrMagnitude_Int", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for the length of the vector (0,0) being 0
|
||||
TEST_CASE(__FILE__"/Magnitude_Is_0_On_Vec0", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Magnitude_Is_0_On_Vec0", "[Vector][Vector2]")
|
||||
{
|
||||
REQUIRE(0.0 == Vector2d(0, 0).Magnitude());
|
||||
return;
|
||||
}
|
||||
|
||||
// Tests for a vector of a known length to actually return that
|
||||
TEST_CASE(__FILE__"/Magnitude_One_Axis_X", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Magnitude_One_Axis_X", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -413,7 +413,7 @@ TEST_CASE(__FILE__"/Magnitude_One_Axis_X", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for a vector of a known length to actually return that
|
||||
TEST_CASE(__FILE__"/Magnitude_One_Axis_Y", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Magnitude_One_Axis_Y", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -427,7 +427,7 @@ TEST_CASE(__FILE__"/Magnitude_One_Axis_Y", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for a known result
|
||||
TEST_CASE(__FILE__"/Magnitude", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Magnitude", "[Vector][Vector2]")
|
||||
{
|
||||
// Ya'll got more of 'dem digits?
|
||||
REQUIRE(204.02205763103165736538358032703399658203125 == Vector2d(192, -69).Magnitude());
|
||||
@@ -435,7 +435,7 @@ TEST_CASE(__FILE__"/Magnitude", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for expected lerp result 0.00
|
||||
TEST_CASE(__FILE__"/Lerp_000", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Lerp_000", "[Vector][Vector2]")
|
||||
{
|
||||
const Vector2d a(100, 1000);
|
||||
const Vector2d b(200, 4000);
|
||||
@@ -447,7 +447,7 @@ TEST_CASE(__FILE__"/Lerp_000", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for expected lerp result 0.25
|
||||
TEST_CASE(__FILE__"/Lerp_025", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Lerp_025", "[Vector][Vector2]")
|
||||
{
|
||||
const Vector2d a(100, 1000);
|
||||
const Vector2d b(200, 4000);
|
||||
@@ -459,7 +459,7 @@ TEST_CASE(__FILE__"/Lerp_025", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for expected lerp result 0.50
|
||||
TEST_CASE(__FILE__"/Lerp_050", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Lerp_050", "[Vector][Vector2]")
|
||||
{
|
||||
const Vector2d a(100, 1000);
|
||||
const Vector2d b(200, 4000);
|
||||
@@ -471,7 +471,7 @@ TEST_CASE(__FILE__"/Lerp_050", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for expected lerp result 0.75
|
||||
TEST_CASE(__FILE__"/Lerp_075", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Lerp_075", "[Vector][Vector2]")
|
||||
{
|
||||
const Vector2d a(100, 1000);
|
||||
const Vector2d b(200, 4000);
|
||||
@@ -483,7 +483,7 @@ TEST_CASE(__FILE__"/Lerp_075", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for expected lerp result 1.00
|
||||
TEST_CASE(__FILE__"/Lerp_100", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Lerp_100", "[Vector][Vector2]")
|
||||
{
|
||||
const Vector2d a(100, 1000);
|
||||
const Vector2d b(200, 4000);
|
||||
@@ -495,7 +495,7 @@ TEST_CASE(__FILE__"/Lerp_100", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests lerpself
|
||||
TEST_CASE(__FILE__"/LerpSelf", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/LerpSelf", "[Vector][Vector2]")
|
||||
{
|
||||
Vector2d a(100, 1000);
|
||||
Vector2d b(200, 4000);
|
||||
@@ -508,7 +508,7 @@ TEST_CASE(__FILE__"/LerpSelf", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests if an input vector of length 0 is handled correctly by the normalize method
|
||||
TEST_CASE(__FILE__"/Normalize_Length_Before_Is_0", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Normalize_Length_Before_Is_0", "[Vector][Vector2]")
|
||||
{
|
||||
const Vector2d vec(0, 0);
|
||||
REQUIRE(0.0 == vec.Normalize().Magnitude());
|
||||
@@ -516,7 +516,7 @@ TEST_CASE(__FILE__"/Normalize_Length_Before_Is_0", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for any normalized vector to be of length 1
|
||||
TEST_CASE(__FILE__"/Normalize_Length_Is_1", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Normalize_Length_Is_1", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -536,7 +536,7 @@ TEST_CASE(__FILE__"/Normalize_Length_Is_1", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests the normalize method with known values
|
||||
TEST_CASE(__FILE__"/Normalize_Oracle", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Normalize_Oracle", "[Vector][Vector2]")
|
||||
{
|
||||
// Setup
|
||||
Vector2d v(3.2, -5.3);
|
||||
@@ -550,7 +550,7 @@ TEST_CASE(__FILE__"/Normalize_Oracle", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for a normalized vector to still point in the exact same direction
|
||||
TEST_CASE(__FILE__"/Normalize_Direction_Stays_Unaffected", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Normalize_Direction_Stays_Unaffected", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -580,7 +580,7 @@ TEST_CASE(__FILE__"/Normalize_Direction_Stays_Unaffected", "[Vector2]")
|
||||
|
||||
// Kinda dumb method, but ok lol
|
||||
// DON'T NORMALIZE INT-VECTORS WHAT IS WRONG WITH YOU
|
||||
TEST_CASE(__FILE__"/Normalized_Int_Vector_Is_0", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Normalized_Int_Vector_Is_0", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -599,7 +599,7 @@ TEST_CASE(__FILE__"/Normalized_Int_Vector_Is_0", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests that NormalizeSelf() results in the same as Normalize()
|
||||
TEST_CASE(__FILE__"/NormalizeSelf_IsSameAs_Normalize", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/NormalizeSelf_IsSameAs_Normalize", "[Vector][Vector2]")
|
||||
{
|
||||
// Run test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -616,7 +616,7 @@ TEST_CASE(__FILE__"/NormalizeSelf_IsSameAs_Normalize", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for the VectorScale() method to work
|
||||
TEST_CASE(__FILE__"/VectorScale", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/VectorScale", "[Vector][Vector2]")
|
||||
{
|
||||
// Run test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -641,7 +641,7 @@ TEST_CASE(__FILE__"/VectorScale", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for operator- (unary) to work
|
||||
TEST_CASE(__FILE__"/Operator_Unary_Negative", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Unary_Negative", "[Vector][Vector2]")
|
||||
{
|
||||
const Vector2d v(29, -5);
|
||||
|
||||
@@ -651,7 +651,7 @@ TEST_CASE(__FILE__"/Operator_Unary_Negative", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for operator+ to work as expected
|
||||
TEST_CASE(__FILE__"/Operator_Add", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Add", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -671,7 +671,7 @@ TEST_CASE(__FILE__"/Operator_Add", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for operator+= to work as expected
|
||||
TEST_CASE(__FILE__"/Operator_Add_Equals", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Add_Equals", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -691,7 +691,7 @@ TEST_CASE(__FILE__"/Operator_Add_Equals", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for operator- to work as expected
|
||||
TEST_CASE(__FILE__"/Operator_Sub", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Sub", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -711,7 +711,7 @@ TEST_CASE(__FILE__"/Operator_Sub", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for operator-= to work as expected
|
||||
TEST_CASE(__FILE__"/Operator_Sub_Equals", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Sub_Equals", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -731,7 +731,7 @@ TEST_CASE(__FILE__"/Operator_Sub_Equals", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for operator* to work as expected
|
||||
TEST_CASE(__FILE__"/Operator_Mult", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Mult", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -749,7 +749,7 @@ TEST_CASE(__FILE__"/Operator_Mult", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for operator*= to work as expected
|
||||
TEST_CASE(__FILE__"/Operator_Mult_Equals", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Mult_Equals", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -768,7 +768,7 @@ TEST_CASE(__FILE__"/Operator_Mult_Equals", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for operator/ to work as expected
|
||||
TEST_CASE(__FILE__"/Operator_Div", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Div", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -786,7 +786,7 @@ TEST_CASE(__FILE__"/Operator_Div", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for operator/= to work as expected
|
||||
TEST_CASE(__FILE__"/Operator_Div_Equals", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Div_Equals", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -805,7 +805,7 @@ TEST_CASE(__FILE__"/Operator_Div_Equals", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for operator== to work as expected
|
||||
TEST_CASE(__FILE__"/Operator_Compare_Equals", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Compare_Equals", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -828,7 +828,7 @@ TEST_CASE(__FILE__"/Operator_Compare_Equals", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests for operator!= to work as expected
|
||||
TEST_CASE(__FILE__"/Operator_Not_Equals", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Operator_Not_Equals", "[Vector][Vector2]")
|
||||
{
|
||||
// Test 1000 times
|
||||
for (std::size_t i = 0; i < 1000; i++)
|
||||
@@ -851,7 +851,7 @@ TEST_CASE(__FILE__"/Operator_Not_Equals", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests loose comparison via Vector2d::Similar -> true
|
||||
TEST_CASE(__FILE__"/Similar_True", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Similar_True", "[Vector][Vector2]")
|
||||
{
|
||||
REQUIRE(
|
||||
Vector2d(0.00000000000000000000001, -6.6666666666666666666666666666).Similar(
|
||||
@@ -861,7 +861,7 @@ TEST_CASE(__FILE__"/Similar_True", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests loose comparison via Vector2d::Similar -> false
|
||||
TEST_CASE(__FILE__"/Similar_False", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Similar_False", "[Vector][Vector2]")
|
||||
{
|
||||
REQUIRE_FALSE(
|
||||
Vector2d(0.00000000000000000000001, -6.6666666666666666666666666666).Similar(
|
||||
@@ -871,7 +871,7 @@ TEST_CASE(__FILE__"/Similar_False", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests that the move constructor works
|
||||
TEST_CASE(__FILE__"/Move_Constructor", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Move_Constructor", "[Vector][Vector2]")
|
||||
{
|
||||
const Vector2d a(1, 2);
|
||||
const Vector2d b(std::move(a));
|
||||
@@ -883,7 +883,7 @@ TEST_CASE(__FILE__"/Move_Constructor", "[Vector2]")
|
||||
}
|
||||
|
||||
// Tests that the move operator works
|
||||
TEST_CASE(__FILE__"/Move_Operator", "[Vector2]")
|
||||
TEST_CASE(__FILE__"/Move_Operator", "[Vector][Vector2]")
|
||||
{
|
||||
const Vector2d a(1, 2);
|
||||
const Vector2d b = std::move(a);
|
||||
|
||||
Reference in New Issue
Block a user