BD_Integratoren/test/test_Compute.cpp
2021-10-22 21:58:37 +02:00

20 lines
447 B
C++

//
// Created by jholder on 22.10.21.
//
#include <Compute.h>
#include "catch2/catch.hpp"
#include "Integratoren2d_forceless.h"
TEST_CASE("Compute") {
auto rod = Rod2d(1.0);
auto com = Compute(rod, Compute::Type::msd, 10);
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);
}
}