1
0
mirror of synced 2024-06-10 14:39:59 +02:00
modern-cmake/examples/extended-project/tests/testlib.cpp
2020-08-03 18:16:52 -04:00

12 lines
291 B
C++

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <modern/lib.hpp>
TEST_CASE( "Quick check", "[main]" ) {
std::vector<double> values {1, 2., 3.};
auto [mean, moment] = accumulate_vector(values);
REQUIRE( mean == 2.0 );
REQUIRE( moment == Approx(4.666666) );
}