Commit 20e2483b authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed a broken test case

parent dc556529
...@@ -74,6 +74,7 @@ void testForce() { ...@@ -74,6 +74,7 @@ void testForce() {
positions[2] = Vec3(1, 0, 1); positions[2] = Vec3(1, 0, 1);
context.setPositions(positions); context.setPositions(positions);
State state = context.getState(State::Forces | State::Energy); State state = context.getState(State::Forces | State::Energy);
const vector<Vec3>& forces = state.getForces();
ASSERT_EQUAL_VEC(Vec3(0.5, 0.5*2.0*2.0*1.5, 0), forces[0], TOL); ASSERT_EQUAL_VEC(Vec3(0.5, 0.5*2.0*2.0*1.5, 0), forces[0], TOL);
ASSERT_EQUAL_VEC(Vec3(0, 0, 0), forces[1], TOL); ASSERT_EQUAL_VEC(Vec3(0, 0, 0), forces[1], TOL);
ASSERT_EQUAL_VEC(Vec3(0.5, -0.5*3.0*2.0*1.5, 0), forces[2], TOL); ASSERT_EQUAL_VEC(Vec3(0.5, -0.5*3.0*2.0*1.5, 0), forces[2], TOL);
......
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