From 3dd9664ff67c358ff2a67c7261089084c48af853 Mon Sep 17 00:00:00 2001 From: kradchen Date: Fri, 19 May 2023 15:56:31 +0800 Subject: [PATCH] Add logic to Detection --- test/Detection_Test.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/test/Detection_Test.cpp b/test/Detection_Test.cpp index 75722dc..3a362b8 100644 --- a/test/Detection_Test.cpp +++ b/test/Detection_Test.cpp @@ -4,6 +4,7 @@ #include "Function1D.h" #include "MatlabReader.h" #include "Matrix.h" +#include "config/config.h" #include "transmissionReconstruction/detection/detection.h" @@ -16,6 +17,9 @@ inline double fourDecimalRound(double src){ #define EXPECT_DOUBLE_AE(valueA,valueB)\ EXPECT_DOUBLE_EQ(fourDecimalRound(valueA),fourDecimalRound(valueB)) +#define ASSERT_DOUBLE_AE(valueA,valueB)\ + ASSERT_DOUBLE_EQ(fourDecimalRound(valueA),fourDecimalRound(valueB)) + class Detection_Test : public ::testing::Test { protected: static void SetUpDetectionTester() { @@ -81,5 +85,36 @@ TEST_F(Detection_Test, applyTimeWindowing) { { EXPECT_DOUBLE_AE(AscanBlockProcessed[i],result.AscanBlockProcessed[i])<<",index:"<