updates for using {fmt} and reordering of include statements exposing hidden includes

This commit is contained in:
Axel Kohlmeyer 2020-06-15 16:51:31 -04:00
parent 05d1924d62
commit 05319cae66
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
3 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@ endif()
set(TEST_INPUT_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/tests)
add_library(style_tests STATIC yaml_writer.cpp error_stats.cpp test_config_reader.cpp test_main.cpp)
target_compile_definitions(style_tests PRIVATE TEST_INPUT_FOLDER=${TEST_INPUT_FOLDER})
target_include_directories(style_tests PRIVATE ${LAMMPS_SOURCE_DIR})
target_link_libraries(style_tests PUBLIC GTest::GTest GTest::GMock Yaml::Yaml)
if(BUILD_MPI)
target_link_libraries(style_tests PUBLIC MPI::MPI_CXX)
@ -17,6 +18,7 @@ endif()
# unit test for error stats class
add_executable(test_error_stats test_error_stats.cpp)
target_include_directories(test_error_stats PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${LAMMPS_SOURCE_DIR})
target_link_libraries(test_error_stats PRIVATE GTest::GTestMain GTest::GTest)
add_test(NAME ErrorStats COMMAND test_error_stats)

View File

@ -14,6 +14,7 @@
#ifndef TEST_CONFIG_READER_H
#define TEST_CONFIG_READER_H
#include "test_config.h"
#include "yaml_reader.h"
class TestConfigReader : public YamlReader<TestConfigReader> {

View File

@ -26,7 +26,7 @@ TEST(ErrorStats, test)
std::stringstream out;
out << stats;
ASSERT_EQ(out.str(), " Average: 5.800e-01 StdDev: 7.305e-01 MaxErr: 2.000e+00 @ item: 3.0");
ASSERT_EQ(out.str(), "Average: 5.800e-01 StdDev: 7.305e-01 MaxErr: 2.000e+00 @ item: 3.0");
stats.reset();
ASSERT_DOUBLE_EQ(stats.avg(), 0.0);