Commit 7974065f authored by Chuanren Wu's avatar Chuanren Wu

more debug info for tests

parent 90fed587
......@@ -120,11 +120,18 @@ TEST(BC, SingleSegment4)
for (vl[3] = 1; vl[3] <= 5; ++vl[3]) {
auto v = discretizeImpl(vl, cs);
ASSERT_EQ(4, v.size())
<< "With equation: " << v[0] << " + " << v[1] << " = " << v[2] << " + " << v[3];
EXPECT_LE(1, v[0]);
EXPECT_LE(1, v[1]);
EXPECT_LE(1, v[2]);
EXPECT_LE(1, v[3]);
<< "With equation: "
<< vl[0] << " + " << vl[1] << " = "
<< vl[2] << " + " << vl[3];
for (int i = 0; i < 4; ++i) {
EXPECT_LE(vl[i], v[i])
<< "With equation " << i << " :"
<< vl[0] << " + " << vl[1] << " = "
<< vl[2] << " + " << vl[3]
<< " becomes "
<< v[0] << " + " << v[1] << " = "
<< v[2] << " + " << v[3];
}
EXPECT_EQ(v[0]+v[1], v[2]+v[3]);
}
}
......@@ -255,7 +262,7 @@ TEST(BC, ThreeSegment1)
auto v = discretizeImpl(vl, cs);
ASSERT_NE(0, v.size());
for (int i = 0; i < 12; ++i) {
EXPECT_LE(10, v[i]);
EXPECT_LE(10, v[i]) << "on edge " << i;
}
EXPECT_EQ(v[0], v[2]);
EXPECT_EQ(v[1], v[3]);
......
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