From 2947bbd95a2c693559f81fc71b15cfad6b154068 Mon Sep 17 00:00:00 2001 From: Orange Date: Tue, 3 Sep 2024 21:37:27 +0300 Subject: [PATCH] added constexpr to unit tests --- tests/UnitTestMatrix.cpp | 3 ++- tests/UnitTestVector2.cpp | 2 +- tests/UnitTestVector3.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/UnitTestMatrix.cpp b/tests/UnitTestMatrix.cpp index c2f0840..205bf03 100644 --- a/tests/UnitTestMatrix.cpp +++ b/tests/UnitTestMatrix.cpp @@ -14,7 +14,8 @@ protected: Matrix m1; Matrix m2; - void SetUp() override { + constexpr void SetUp() override + { m1 = Matrix(2, 2); m2 = Matrix{{1.0f, 2.0f}, {3.0f, 4.0f}}; } diff --git a/tests/UnitTestVector2.cpp b/tests/UnitTestVector2.cpp index c1553be..3e9740d 100644 --- a/tests/UnitTestVector2.cpp +++ b/tests/UnitTestVector2.cpp @@ -15,7 +15,7 @@ protected: Vector2 v1; Vector2 v2; - void SetUp() override + constexpr void SetUp() override { v1 = Vector2(1.0f, 2.0f); v2 = Vector2(4.0f, 5.0f); diff --git a/tests/UnitTestVector3.cpp b/tests/UnitTestVector3.cpp index 37f9fff..daa59dc 100644 --- a/tests/UnitTestVector3.cpp +++ b/tests/UnitTestVector3.cpp @@ -13,7 +13,7 @@ protected: Vector3 v1; Vector3 v2; - void SetUp() override + constexpr void SetUp() override { v1 = Vector3(1.0f, 2.0f, 3.0f); v2 = Vector3(4.0f, 5.0f, 6.0f);