Files
Aurora/test/TestUtility.h

19 lines
500 B
C
Raw Normal View History

2023-04-23 09:30:47 +08:00
#ifndef AURORA_TESTUTILITY_H
#define AURORA_TESTUTILITY_H
#include <cmath>
#define DISPLAY_MATRIX(Matrix)\
printf("=====================================\r\n");\
printf("%s:\r\n", #Matrix);\
Matrix.printf();\
printf("%s end================================\r\n", #Matrix);
inline float fourDecimalRound(float src){
2023-04-23 09:30:47 +08:00
return round(src*10000.0)/10000.0;
}
#define EXPECT_FLOAT_AE(valueA,valueB)\
EXPECT_FLOAT_EQ(fourDecimalRound(valueA),fourDecimalRound(valueB));
2023-04-23 09:30:47 +08:00
#endif //AURORA_TESTUTILITY_H