diff options
author | SilicDev <83308290+SilicDev@users.noreply.github.com> | 2023-10-25 20:57:45 +0200 |
---|---|---|
committer | SilicDev <83308290+SilicDev@users.noreply.github.com> | 2023-10-25 20:57:45 +0200 |
commit | c0808d5083d07cc0486ea0708080baa53571d7c7 (patch) | |
tree | eaf10417a57a9b49cf17f2897a11d1c8cf073b7e | |
parent | 06d51891678e3abf360d6fcd2e8bd1ba96704fcc (diff) | |
download | redot-engine-c0808d5083d07cc0486ea0708080baa53571d7c7.tar.gz |
fix assignment to vec2 tests
-rw-r--r-- | tests/core/variant/test_variant.h | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/tests/core/variant/test_variant.h b/tests/core/variant/test_variant.h index 93ae3b4c43..54ca06c6c4 100644 --- a/tests/core/variant/test_variant.h +++ b/tests/core/variant/test_variant.h @@ -980,45 +980,45 @@ TEST_CASE("[Variant] Assignment To Vec2 from Bool,Int,Float,String,Vec2i,Vec3,Ve CHECK(basis_v.get_type() == Variant::VECTOR2); Variant aabb_v = AABB(); - string_v = "Hello"; - aabb_v = string_v; - CHECK(aabb_v == Variant("Hello")); - string_v = "Hello there"; - aabb_v = string_v; - CHECK(aabb_v.get_type() == Variant::STRING); + vec2_v = Vector2(2.2f, 3.5f); + aabb_v = vec2_v; + CHECK(aabb_v == Variant(Vector2(2.2f, 3.5f))); + vec2_v = Vector2(-5.4f, -7.9f); + aabb_v = vec2_v; + CHECK(aabb_v.get_type() == Variant::VECTOR2); Variant quaternion_v = Quaternion(); - string_v = "Hello"; - quaternion_v = string_v; - CHECK(quaternion_v == Variant("Hello")); - string_v = "Hello there"; - quaternion_v = string_v; - CHECK(quaternion_v.get_type() == Variant::STRING); + vec2_v = Vector2(2.2f, 3.5f); + quaternion_v = vec2_v; + CHECK(quaternion_v == Variant(Vector2(2.2f, 3.5f))); + vec2_v = Vector2(-5.4f, -7.9f); + quaternion_v = vec2_v; + CHECK(quaternion_v.get_type() == Variant::VECTOR2); Variant projection_v = Projection(); - string_v = "Hello"; - projection_v = string_v; - CHECK(projection_v == Variant("Hello")); - string_v = "Hello there"; - projection_v = string_v; - CHECK(projection_v.get_type() == Variant::STRING); + vec2_v = Vector2(2.2f, 3.5f); + projection_v = vec2_v; + CHECK(projection_v == Variant(Vector2(2.2f, 3.5f))); + vec2_v = Vector2(-5.4f, -7.9f); + projection_v = vec2_v; + CHECK(projection_v.get_type() == Variant::VECTOR2); Variant rid_v = RID(); - string_v = "Hello"; - rid_v = string_v; - CHECK(rid_v == Variant("Hello")); - string_v = "Hello there"; - rid_v = string_v; - CHECK(rid_v.get_type() == Variant::STRING); + vec2_v = Vector2(2.2f, 3.5f); + rid_v = vec2_v; + CHECK(rid_v == Variant(Vector2(2.2f, 3.5f))); + vec2_v = Vector2(-5.4f, -7.9f); + rid_v = vec2_v; + CHECK(rid_v.get_type() == Variant::VECTOR2); Object obj_one = Object(); Variant object_v = &obj_one; - string_v = "Hello"; - object_v = string_v; - CHECK(object_v == Variant("Hello")); - string_v = "Hello there"; - object_v = string_v; - CHECK(object_v.get_type() == Variant::STRING); + vec2_v = Vector2(2.2f, 3.5f); + object_v = vec2_v; + CHECK(object_v == Variant(Vector2(2.2f, 3.5f))); + vec2_v = Vector2(-5.4f, -7.9f); + object_v = vec2_v; + CHECK(object_v.get_type() == Variant::VECTOR2); } TEST_CASE("[Variant] Assignment To Vec2i from Bool,Int,Float,String,Vec2,Vec3,Vec3i,Vec4,Vec4i,Rect2,Rect2i,Trans2d,Trans3d,Color,Call,Plane,Basis,AABB,Quant,Proj,RID,and Object") { |