Commit c5175b7e authored by Chuanren Wu's avatar Chuanren Wu

test homogenity

parent dad66c2a
......@@ -83,6 +83,30 @@ TEST(BC, SingleSegment1)
EXPECT_EQ(v[1], v[3]);
}
TEST(BC, HomogeneousLine)
{
std::vector<Constraint> cs;
{
Constraint c;
for (int i = 1; i <= 10; ++i) {
c.plus(i);
}
c.minus(0);
cs.push_back(c);
}
std::vector<double> vl(15);
vl[0] = 14;
std::generate(std::next(vl.begin()), vl.end(), [](){ return 1.0;} );
auto v = discretize(vl, cs);
ASSERT_NE(0, v.size());
for (int i = 1; i <= 10; ++i) {
EXPECT_LE(2, v[i]);
}
}
TEST(BC, SingleSegment2)
{
std::vector<Constraint> cs;
......
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