Skip to content

Commit

Permalink
modify tests for macOS?
Browse files Browse the repository at this point in the history
  • Loading branch information
mhekkel committed Jul 22, 2024
1 parent a5a5f47 commit e4dcb21
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions test/unit-3d-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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")
Expand Down

0 comments on commit e4dcb21

Please sign in to comment.