Enables legacy code compilation

The changes encapsulate the matrix tests within an `#ifdef` block, allowing conditional compilation based on whether `OMATH_ENABLE_LEGACY` is defined. This enables the legacy code to be compiled only when needed.
This commit is contained in:
2025-07-15 11:51:14 +03:00
parent 8e411771c2
commit 1aa62cb396

View File

@@ -1,6 +1,9 @@
//
// Created by vlad on 5/18/2024.
//
#ifdef OMATH_ENABLE_LEGACY
#include <gtest/gtest.h>
#include <omath/matrix.hpp>
#include "omath/vector3.hpp"
@@ -177,4 +180,5 @@ TEST_F(UnitTestMatrix, AssignmentOperator_Move)
EXPECT_FLOAT_EQ(m3.at(0, 0), 1.0f);
EXPECT_EQ(m2.row_count(), 0); // m2 should be empty after the move
EXPECT_EQ(m2.columns_count(), 0);
}
}
#endif