Skip to content

Commit 6460f7c

Browse files
Jose Luis RiveroMichael CarrollMichael Carroll
authored
Remove the use of numeric_limits in appendToStream test (#553)
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org> Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai> Co-authored-by: Michael Carroll <michael@openrobotics.org> Co-authored-by: Michael Carroll <mjcarroll@intrinsic.ai>
1 parent a527e14 commit 6460f7c

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

src/Helpers_TEST.cc

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,27 +1011,10 @@ TEST(HelpersTest, AppendToStream)
10111011
math::appendToStream(out, pi);
10121012
EXPECT_EQ(out.str(), "0 456 0 3.14159 3.141592654");
10131013

1014-
// Skip end of test for arm64
1015-
#if !defined __ARM_ARCH
1016-
out << " "
1017-
<< std::setprecision(std::numeric_limits<long double>::digits10 + 1);
1018-
1019-
math::appendToStream(out, pi);
1020-
#if defined(_WIN32) && !defined(__amd64__) && !defined(__i386__)
1021-
EXPECT_EQ(out.str(), "0 456 0 3.14159 3.141592654 3.141592653589793");
1022-
#else
1023-
EXPECT_EQ(out.str(), "0 456 0 3.14159 3.141592654 3.141592653589793239");
1024-
#endif
1025-
10261014
out << " "
10271015
<< std::setprecision(3);
10281016

10291017
math::appendToStream(out, pi);
1030-
#if defined(_WIN32) && !defined(__amd64__) && !defined(__i386__)
1031-
EXPECT_EQ(out.str(), "0 456 0 3.14159 3.141592654 3.141592653589793 3.14");
1032-
#else
1033-
EXPECT_EQ(out.str(), "0 456 0 3.14159 3.141592654 3.141592653589793239 3.14");
1034-
#endif
1035-
// ifndef __ARM_ARCH
1036-
#endif
1018+
EXPECT_EQ(out.str(), "0 456 0 3.14159 3.141592654 3.14");
10371019
}
1020+

0 commit comments

Comments
 (0)