Skip to content

Commit 75707f0

Browse files
committed
msvc format display of float in hex mode is different from gcc and clang
(it looks like msvc is doing a conversion to double before converting to hex)
1 parent e96a798 commit 75707f0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/print.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,17 @@ void TestPrintCheckOutput2d()
110110
" [ 0x1.f9a6b50b0f27cp-4 -0x1.f9a6b50b0f27cp-4]]",
111111
ss.str());
112112
} else {
113+
#ifdef KOKKOS_COMPILER_MSVC
114+
EXPECT_EQ(
115+
"[[ 0x1.f9a6b60000000p-4 0x1.f9a6b60000000p-4]\n"
116+
" [ 0x1.f9a6b60000000p-4 -0x1.f9a6b60000000p-4]]",
117+
ss.str());
118+
#else
113119
EXPECT_EQ(
114120
"[[ 0x1.f9a6b6p-4 0x1.f9a6b6p-4]\n"
115121
" [ 0x1.f9a6b6p-4 -0x1.f9a6b6p-4]]",
116122
ss.str());
123+
#endif
117124
}
118125
}
119126
{

0 commit comments

Comments
 (0)