Commit bde9b9c2 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

worked on tests

parent e1b6ef5d
Pipeline #157963 passed with stages
in 11 minutes and 27 seconds
......@@ -3,7 +3,8 @@
INSTANTIATE_TEST_SUITE_P(
TestStochasticCollocation, TestStochasticCollocationWithoutEpsilon, Values(
TestParams{"SparseGrid2DGeneratorProblem", "FunctionEvaluation", "DummyPDESolver"}
TestParams{"SparseGrid2DGeneratorProblem", "FunctionEvaluation",
"DummyPDESolver", 2.513723354063905}
// Todo add more test cases
));
......@@ -16,7 +17,8 @@ TEST_P(TestStochasticCollocationWithoutEpsilon, TestSeriellAgainstParallel) {
mout.EndBlock();
mout << endl;
scSeriell->EstimatorResults();
EXPECT_NEAR(scSeriell->aggregate.mean.Q * scSeriell->aggregate.ctr.M,
GetParam().refValue, SC_TEST_TOLERANCE);
}
int main(int argc, char **argv) {
......
......@@ -4,6 +4,7 @@
#include "StochasticCollocation.hpp"
#include "TestEnvironment.hpp"
constexpr double SC_TEST_TOLERANCE = 1e-6;
struct TestParams {
std::string problemName;
......@@ -11,6 +12,8 @@ struct TestParams {
std::string quantity;
std::string model;
double refValue;
};
Logging &operator<<(Logging &s, const TestParams &testParams) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment