diff --git a/vortex-filtering/CMakeLists.txt b/vortex-filtering/CMakeLists.txt index e4d12c0f..fd52b2c7 100644 --- a/vortex-filtering/CMakeLists.txt +++ b/vortex-filtering/CMakeLists.txt @@ -89,6 +89,7 @@ install( ) if(BUILD_TESTING) + # add_compile_definitions(GNUPLOT_ENABLE=1) add_subdirectory(test) endif() diff --git a/vortex-filtering/test/dynamic_model_test.cpp b/vortex-filtering/test/dynamic_model_test.cpp index dcddc0bf..20aba047 100644 --- a/vortex-filtering/test/dynamic_model_test.cpp +++ b/vortex-filtering/test/dynamic_model_test.cpp @@ -51,7 +51,7 @@ TEST(DynamicModel, sampleSimpleModel) EXPECT_TRUE(isApproxEqual(approx_gauss.mean(), true_gauss.mean(), 0.1)); EXPECT_TRUE(isApproxEqual(true_gauss.cov(), true_gauss.cov(), 0.1)); - #ifdef GNUPLOT_ENABLE + #if (GNUPLOT_ENABLE) // Plot Gnuplot gp; gp << "set xrange [-10:10]\nset yrange [-10:10]\n"; diff --git a/vortex-filtering/test/ekf_test.cpp b/vortex-filtering/test/ekf_test.cpp index 5cbd36fb..c9bb2e27 100644 --- a/vortex-filtering/test/ekf_test.cpp +++ b/vortex-filtering/test/ekf_test.cpp @@ -104,7 +104,7 @@ TEST_F(EKFTestCVModel, convergence) } time.pop_back(); - #ifdef GNUPLOT_ENABLE + #if (GNUPLOT_ENABLE) Gnuplot gp; gp << "set terminal qt size 1600,1000\n"; // Modified to make plot larger gp << "set multiplot layout 2,1\n"; diff --git a/vortex-filtering/test/numerical_integration_test.cpp b/vortex-filtering/test/numerical_integration_test.cpp index 6c07b5aa..7f738467 100644 --- a/vortex-filtering/test/numerical_integration_test.cpp +++ b/vortex-filtering/test/numerical_integration_test.cpp @@ -76,7 +76,7 @@ class NumericalIntegration : public ::testing::Test { void plot_result(std::string title = "ERK convergence") { - #ifdef GNUPLOT_ENABLE + #if (GNUPLOT_ENABLE) // Plot first state and true solution against time Gnuplot gp; gp << "set terminal wxt size 1200,800\n"; diff --git a/vortex-filtering/test/probability_test.cpp b/vortex-filtering/test/probability_test.cpp index 6a1ff622..af966edd 100644 --- a/vortex-filtering/test/probability_test.cpp +++ b/vortex-filtering/test/probability_test.cpp @@ -94,7 +94,7 @@ TEST(MultiVarGauss, sample) double minorAxisLength = cov_ellipse.minor_axis(); double angle = cov_ellipse.angle_deg(); - #ifdef GNUPLOT_ENABLE + #if (GNUPLOT_ENABLE) Gnuplot gp; gp << "set xrange [-10:10]\nset yrange [-10:10]\n"; gp << "set style circle radius 0.05\n"; diff --git a/vortex-filtering/test/ukf_test.cpp b/vortex-filtering/test/ukf_test.cpp index 7da960cf..e56f3643 100644 --- a/vortex-filtering/test/ukf_test.cpp +++ b/vortex-filtering/test/ukf_test.cpp @@ -108,7 +108,7 @@ TEST_F(UKFtest, Convergence) x_m_std.push_back(x_est.at(i).mean()(0) - std::sqrt(x_est.at(i).cov()(0, 0))); // x_est - std } - #ifdef GNUPLOT_ENABLE + #if (GNUPLOT_ENABLE) Gnuplot gp; gp << "set terminal wxt size 1200,800\n"; gp << "set title 'UKF convergence'\n";