BD_Integratoren/C++/test/test_Compute.cpp
2021-10-27 22:00:24 +02:00

21 lines
440 B
C++

//
// Created by jholder on 22.10.21.
//
#include "Compute.h"
#include <catch2/catch.hpp>
TEST_CASE("Compute") {
Rod2d rod(1.0);
Simulation sim(0.1, 1);
auto com = Compute(rod, Compute::Type::msd, 10, sim);
SECTION("Mean of same values") {
for (int i = 0; i < 100; ++i) {
com.eval(rod);
}
CHECK(com.getAgg().getNumPoints() == 10);
CHECK(com.getAgg().getMean() == 0.0);
}
}