From d369c4eb157464642fb86b80ae4dd9de67368bb7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 30 Aug 2022 15:00:24 -0400 Subject: [PATCH] fix bug from incorrect use of constexpr --- unittest/commands/test_set_property.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittest/commands/test_set_property.cpp b/unittest/commands/test_set_property.cpp index f482463060..f5e290c671 100644 --- a/unittest/commands/test_set_property.cpp +++ b/unittest/commands/test_set_property.cpp @@ -316,7 +316,7 @@ TEST_F(SetTest, SpinPackage) constexpr double vx = 0.1; constexpr double vy = 0.5; constexpr double vz = -0.1; - constexpr double norm = 1.0 / sqrt(vx * vx + vy * vy + vz * vz); + const double norm = 1.0 / sqrt(vx * vx + vy * vy + vz * vz); ASSERT_EQ(atom->sp[0][0], vx * norm); ASSERT_EQ(atom->sp[0][1], vy * norm); ASSERT_EQ(atom->sp[0][2], vz * norm);