Skip to content
Snippets Groups Projects
Commit 47de9198 authored by Alfred Burgess's avatar Alfred Burgess
Browse files

Expanded unit tests for vec2

parent 1bc59d45
No related merge requests found
......@@ -29,6 +29,17 @@ TEST_CASE( "Testing Operator Comparisons" ) {
CHECK( d.x == 4 );
CHECK( d.y == 400 );
}
SUBCASE( "Scale Multiplication" )
{
Vec2 c = a * scale_a;
CHECK( c.x == 100 );
CHECK( c.y == 500 );
Vec2 d = a * scale_b;
CHECK( d.x == 0.5 );
CHECK( d.y == 2.5 );
}
SUBCASE( "Division" )
{
Vec2 c = a / b;
......@@ -51,4 +62,15 @@ TEST_CASE( "Testing Operator Comparisons" ) {
CHECK( c.x == 0.0 );
CHECK( c.y == 0.0 );
}
SUBCASE( "Scale Division" )
{
Vec2 c = a / scale_a;
CHECK( c.x == ( 1 / scale_a ) );
CHECK( c.y == ( 5 / scale_a ) );
Vec2 d = a / scale_b;
CHECK( d.x == ( 1 / scale_b ) );
CHECK( d.y == ( 5 / scale_b ) );
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment