diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2024-12-24 22:59:03 +0100 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2024-12-24 22:59:03 +0100 |
commit | bddbeb98b3db8d435de6b2d10269640121475538 (patch) | |
tree | 1a791f5dd49b94ead503b9b77c6b9277f2701a89 /src/util_ut.cpp | |
parent | c73a0e24a0d5c510a65efbe5c2fbc7fd39a3c003 (diff) | |
parent | 74d6e04c21bddd435bd74c34dbe027b883772a76 (diff) | |
download | atracdenc-bddbeb98b3db8d435de6b2d10269640121475538.tar.gz |
Merge branch 'master' into at3plus-dev
Diffstat (limited to 'src/util_ut.cpp')
-rw-r--r-- | src/util_ut.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/util_ut.cpp b/src/util_ut.cpp index 9fb61c4..9028c1e 100644 --- a/src/util_ut.cpp +++ b/src/util_ut.cpp @@ -22,10 +22,10 @@ #include <vector> TEST(Util, SwapArrayTest) { - TFloat arr[8] = { 0, 1, 2, 3, 4, 5, 6, 7 }; + float arr[8] = { 0, 1, 2, 3, 4, 5, 6, 7 }; SwapArray(arr, 8); for (size_t i = 0; i < 8; ++i) { - EXPECT_NEAR((TFloat)i, arr[7-i], 0.000000000001); + EXPECT_NEAR((float)i, arr[7-i], 0.000000000001); } } @@ -43,10 +43,10 @@ TEST(Util, GetFirstSetBitTest) { TEST(Util, CalcEnergy) { - EXPECT_NEAR((TFloat)0.0, CalcEnergy(std::vector<TFloat>{0.0}), 0.000000000001); - EXPECT_NEAR((TFloat)1.0, CalcEnergy(std::vector<TFloat>{1.0}), 0.000000000001); - EXPECT_NEAR((TFloat)2.0, CalcEnergy(std::vector<TFloat>{1.0, 1.0}), 0.000000000001); - EXPECT_NEAR((TFloat)5.0, CalcEnergy(std::vector<TFloat>{2.0, 1.0}), 0.000000000001); - EXPECT_NEAR((TFloat)5.0, CalcEnergy(std::vector<TFloat>{1.0, 2.0}), 0.000000000001); - EXPECT_NEAR((TFloat)8.0, CalcEnergy(std::vector<TFloat>{2.0, 2.0}), 0.000000000001); + EXPECT_NEAR((float)0.0, CalcEnergy(std::vector<float>{0.0}), 0.000000000001); + EXPECT_NEAR((float)1.0, CalcEnergy(std::vector<float>{1.0}), 0.000000000001); + EXPECT_NEAR((float)2.0, CalcEnergy(std::vector<float>{1.0, 1.0}), 0.000000000001); + EXPECT_NEAR((float)5.0, CalcEnergy(std::vector<float>{2.0, 1.0}), 0.000000000001); + EXPECT_NEAR((float)5.0, CalcEnergy(std::vector<float>{1.0, 2.0}), 0.000000000001); + EXPECT_NEAR((float)8.0, CalcEnergy(std::vector<float>{2.0, 2.0}), 0.000000000001); } |