Update test.cpp

This commit is contained in:
Raman 2016-07-14 10:30:06 +02:00 committed by GitHub
parent 676f0712fd
commit 98c7a0c169
1 changed files with 1 additions and 1 deletions

View File

@ -833,7 +833,7 @@ bool FloatCompare(float a, float b) { return fabs(a - b) < 0.001; }
// Additional parser testing not covered elsewhere. // Additional parser testing not covered elsewhere.
void ValueTest() { void ValueTest() {
// Test scientific notation numbers. // Test scientific notation numbers.
TEST_EQ(FloatCompare(TestValue<float>("{ Y:0.0314159e+2 }"), 3.14159), true); TEST_EQ(FloatCompare(TestValue<float>("{ Y:0.0314159e+2 }"), (float)3.14159), true);
// Test conversion functions. // Test conversion functions.
TEST_EQ(FloatCompare(TestValue<float>("{ Y:cos(rad(180)) }"), -1), true); TEST_EQ(FloatCompare(TestValue<float>("{ Y:cos(rad(180)) }"), -1), true);