Commit 7f3a4cb2 authored by Chuanren Wu's avatar Chuanren Wu

add test

parent 69cca773
......@@ -24,6 +24,35 @@ TEST(BC, SimpleLine1)
EXPECT_LE(10, v[1]);
}
TEST(BC, SimpleLine2)
{
std::vector<Constraint> cs;
{
Constraint c;
c.plus(0);
c.plus(1);
c.minus(2);
cs.push_back(c);
}
{
Constraint c;
c.plus(2);
c.minus(3);
cs.push_back(c);
}
std::vector<double> vl(4);
std::generate(vl.begin(), vl.end(), [](){ return 10.0;} );
auto v = discretizeImpl(vl, cs);
ASSERT_NE(0, v.size());
EXPECT_LE(10, v[0]);
EXPECT_LE(10, v[1]);
EXPECT_LE(10, v[2]);
EXPECT_LE(10, v[3]);
}
TEST(BC, SingleSegment1)
{
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