Skip to content

Commit 90434e6

Browse files
committed
sphere area tests
1 parent 4142aa4 commit 90434e6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/geometry/shapes/test/test_sphere_area.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ template struct Test<long double>;
6868
template <typename T>
6969
void test_sphere_relative_area_1(const T precision)
7070
{
71-
LOG(std::string("Test sphere area 1, ") + type_name<T>());
71+
const std::string name = std::string("Test sphere area 1, ") + type_name<T>();
72+
73+
LOG(name);
7274

7375
const auto cmp = [&](const T v1, const T v2)
7476
{
@@ -95,13 +97,15 @@ void test_sphere_relative_area_1(const T precision)
9597
cmp(sphere_relative_area<14, T>(A, B), 6.2971708851622969919328243435987148096048176384326e-24L);
9698
cmp(sphere_relative_area<15, T>(A, B), 1.1693985788590365916906420253926137382086446806823e-25L);
9799

98-
LOG("Check passed");
100+
LOG(name + " passed");
99101
}
100102

101103
template <typename T>
102104
void test_sphere_relative_area_2(const T precision)
103105
{
104-
LOG(std::string("Test sphere area 2, ") + type_name<T>());
106+
const std::string name = std::string("Test sphere area 2, ") + type_name<T>();
107+
108+
LOG(name);
105109

106110
const auto cmp = [&](const T v1, const T v2)
107111
{
@@ -128,7 +132,7 @@ void test_sphere_relative_area_2(const T precision)
128132
cmp(sphere_relative_area<14, T>(A, B), 0.013313970393473262087067334544828366956211559294135L);
129133
cmp(sphere_relative_area<15, T>(A, B), 0.010473262061717212781929422559521292732168015614157L);
130134

131-
LOG("Check passed");
135+
LOG(name + " passed");
132136
}
133137

134138
void test_sphere_area()

0 commit comments

Comments
 (0)