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-04-23 09:40:22 +08:00
|
|
|
inline double fourDecimalRound(double src){
|
2023-04-23 09:30:47 +08:00
|
|
|
return round(src*10000.0)/10000.0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define EXPECT_DOUBLE_AE(valueA,valueB)\
|
|
|
|
|
EXPECT_DOUBLE_EQ(fourDecimalRound(valueA),fourDecimalRound(valueB));
|
|
|
|
|
|
|
|
|
|
#endif //AURORA_TESTUTILITY_H
|