🎉 init(cmake): init modern cmake template

This commit is contained in:
clzhao20
2024-04-08 15:22:45 +08:00
commit 120ef25b84
18 changed files with 285 additions and 0 deletions

11
tests/testlib.cpp Normal file
View File

@@ -0,0 +1,11 @@
#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) );
}