Commit db70438a authored by Chuanren Wu's avatar Chuanren Wu

one more test

parent 5dcf994d
......@@ -83,7 +83,7 @@ TEST(BC, SingleSegment1)
EXPECT_EQ(v[1], v[3]);
}
TEST(BC, HomogeneousLine)
TEST(BC, HomogeneousLine1)
{
std::vector<Constraint> cs;
{
......@@ -106,6 +106,30 @@ TEST(BC, HomogeneousLine)
}
}
TEST(BC, HomogeneousLine2)
{
std::vector<Constraint> cs;
{
Constraint c;
for (int i = 1; i <= 1000; ++i) {
c.plus(i);
}
c.minus(0);
cs.push_back(c);
}
std::vector<double> vl(1001);
std::generate(vl.begin(), vl.end(), [](){ return 1.0;} );
vl[0] = 100001;
auto v = discretize(vl, cs);
ASSERT_NE(0, v.size());
for (int i = 1; i <= 10; ++i) {
EXPECT_GE(101, v[i]);
EXPECT_GE(99, 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