From f10d0daf2ee9d1d88db1105bcee38e44686d1598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana=20G=C3=B3mez?= Date: Tue, 27 Feb 2024 10:16:20 +0100 Subject: [PATCH] Update test --- CMakeLists.txt | 7 +++++++ tests/TestBayesModels.cc | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d42041..acd389f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,13 @@ option(CODE_COVERAGE "Collect coverage from test library" OFF) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) include(AddGitSubmodule) +if (CMAKE_BUILD_TYPE STREQUAL "Debug") + MESSAGE("Debug mode") + set(ENABLE_TESTING ON) + set(CODE_COVERAGE ON) +endif (CMAKE_BUILD_TYPE STREQUAL "Debug") + + if (CODE_COVERAGE) enable_testing() include(CodeCoverage) diff --git a/tests/TestBayesModels.cc b/tests/TestBayesModels.cc index c88f571..db318ad 100644 --- a/tests/TestBayesModels.cc +++ b/tests/TestBayesModels.cc @@ -250,7 +250,7 @@ TEST_CASE("BoostAODE predict_single", "[BayesNet]") auto raw = RawDatasets("glass", true); std::map scores{ - {true, 0.84579f }, { false, 0.81308f } + {true, 0.84579f }, { false, 0.80841f } }; for (const bool kind : { true, false}) { auto clf = bayesnet::BoostAODE();