Skip to content

Commit e60f63a

Browse files
committed
Add basic test for pfasst::compute_quadrature.
1 parent 8e8bdc2 commit e60f63a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/test-quadrature.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,22 @@ TEST(NodesTest, GaussLobattoNodes) {
125125
EXPECT_THAT(l9, testing::Pointwise(DoubleNear(), l9e));
126126
}
127127

128+
TEST(QuadratureTest, GaussLobattoNodes) {
129+
auto l3 = pfasst::compute_nodes<long double>(3, "gauss-lobatto");
130+
131+
auto s3 = pfasst::compute_quadrature(l3, l3, 's');
132+
const long double s3e[6] = { 0.20833333333333333,
133+
0.33333333333333333,
134+
-0.04166666666666666,
135+
-0.04166666666666666,
136+
0.33333333333333333,
137+
0.20833333333333333 };
138+
139+
EXPECT_THAT(s3, testing::Pointwise(DoubleNear(), s3e));
140+
141+
// XXX: need more tests here
142+
}
143+
128144
int main(int argc, char **argv) {
129145
testing::InitGoogleTest(&argc, argv);
130146
return RUN_ALL_TESTS();

0 commit comments

Comments
 (0)