Commit e4dcb211 by Maarten L. Hekkelman

modify tests for macOS?

parent a5a5f47f
......@@ -157,15 +157,15 @@ TEST_CASE("dh_q_0")
};
auto a = cif::dihedral_angle(t[0], t[1], t[2], p);
REQUIRE_THAT(a, Catch::Matchers::WithinRel(0, 0.01f));
REQUIRE_THAT(a, Catch::Matchers::WithinRel(0.f, 0.01f));
auto q = cif::construct_from_angle_axis(90, axis);
p.rotate(q);
REQUIRE_THAT(p.m_x, Catch::Matchers::WithinRel(1, 0.01f));
REQUIRE_THAT(p.m_y, Catch::Matchers::WithinRel(0, 0.01f));
REQUIRE_THAT(p.m_z, Catch::Matchers::WithinRel(1, 0.01f));
REQUIRE_THAT(p.m_x, Catch::Matchers::WithinRel(1.f, 0.01f));
REQUIRE_THAT(p.m_y, Catch::Matchers::WithinRel(0.f, 0.01f));
REQUIRE_THAT(p.m_z, Catch::Matchers::WithinRel(1.f, 0.01f));
a = cif::dihedral_angle(t[0], t[1], t[2], p);
REQUIRE_THAT(a, Catch::Matchers::WithinRel(90, 0.01f));
......@@ -174,13 +174,12 @@ TEST_CASE("dh_q_0")
p.rotate(q);
REQUIRE_THAT(p.m_x, Catch::Matchers::WithinRel(1, 0.01f));
REQUIRE_THAT(p.m_y, Catch::Matchers::WithinRel(1, 0.01f));
REQUIRE_THAT(p.m_z, Catch::Matchers::WithinRel(0, 0.01f));
REQUIRE_THAT(p.m_x, Catch::Matchers::WithinRel(1.f, 0.01f));
REQUIRE_THAT(p.m_y, Catch::Matchers::WithinRel(1.f, 0.01f));
REQUIRE_THAT(p.m_z, Catch::Matchers::WithinRel(0.f, 0.01f));
a = cif::dihedral_angle(t[0], t[1], t[2], p);
REQUIRE_THAT(a, Catch::Matchers::WithinRel(0, 0.01f));
REQUIRE_THAT(a, Catch::Matchers::WithinRel(0.f, 0.01f));
}
TEST_CASE("dh_q_1")
......
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