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);
|
|
|
|
|
|
2023-11-01 14:31:29 +08:00
|
|
|
inline float fourDecimalRound(float src){
|
2023-04-23 09:30:47 +08:00
|
|
|
return round(src*10000.0)/10000.0;
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-01 14:31:29 +08:00
|
|
|
#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
|