Commit f81d4755acb1fe92688790f2d355b8c2ae294c0d
1 parent
edda0986
change test_assert by test_value
Showing
1 changed file
with
2 additions
and
2 deletions
test/test_GVector.cpp
| ... | ... | @@ -181,7 +181,7 @@ void TestGVector::test6(void){ |
| 181 | 181 | // Devide by zero |
| 182 | 182 | m_result = m_test; |
| 183 | 183 | m_result /= 0.0; |
| 184 | - test_assert(m_result.print()=="(inf, inf, inf, inf, inf)","Devide by zero",m_result.print()); | |
| 184 | + test_assert(m_result.print()=="(inf, inf, inf, inf, inf)"||m_result.print()=="(Inf, Inf, Inf, Inf, Inf)","Devide by zero",m_result.print()); | |
| 185 | 185 | |
| 186 | 186 | // GVector + GVector |
| 187 | 187 | m_result = m_test + m_test; |
| ... | ... | @@ -285,7 +285,7 @@ void TestGVector::test6(void){ |
| 285 | 285 | test_assert(max(m_test)==5.5,"max(GVector)"); |
| 286 | 286 | |
| 287 | 287 | // sum(GVector) |
| 288 | - test_assert(m_test[0]+m_test[1]+m_test[2]+m_test[3]+m_test[4]==sum(m_test),"sum(GVector)"); | |
| 288 | + test_value(m_test[0]+m_test[1]+m_test[2]+m_test[3]+m_test[4],sum(m_test),1e-6,"sum(GVector)"); | |
| 289 | 289 | |
| 290 | 290 | // acos(GVector/10.0) |
| 291 | 291 | test_assert(acos(m_test/10.0).print()=="(1.46057, 1.34898, 1.23449, 1.1152, 0.988432)","acos(GVector/10.0)"); | ... | ... |