Branimir Karadžić 8 years ago
parent
commit
2d7f762b00
1 changed files with 6 additions and 1 deletions
  1. 6 1
      tests/vsnprintf_test.cpp

+ 6 - 1
tests/vsnprintf_test.cpp

@@ -58,8 +58,13 @@ TEST_CASE("vsnprintf f", "")
 	REQUIRE(test("     nan", "%8f",   std::numeric_limits<double>::quiet_NaN() ) );
 	REQUIRE(test("     nan", "%8f",   std::numeric_limits<double>::quiet_NaN() ) );
 
 
 #if !BX_CRT_MSVC
 #if !BX_CRT_MSVC
-	// BK - VS2015 CRT vsnprintf returns '-NAN(IND' for some reason?
+	// BK - VS2015 CRT vsnprintf returns '-NAN(IND'.
+#	if BX_CRT_LIBCXX
+	// BK - Clang LibC vsnprintf returns 'NAN     '.
+	REQUIRE(test("NAN     ", "%-8F", -std::numeric_limits<double>::quiet_NaN() ) );
+#	else
 	REQUIRE(test("-NAN    ", "%-8F", -std::numeric_limits<double>::quiet_NaN() ) );
 	REQUIRE(test("-NAN    ", "%-8F", -std::numeric_limits<double>::quiet_NaN() ) );
+#	endif // BX_CRT_LIBCXX
 #endif // !BX_CRT_MSVC
 #endif // !BX_CRT_MSVC
 
 
 	REQUIRE(test("     inf", "%8f",   std::numeric_limits<double>::infinity() ) );
 	REQUIRE(test("     inf", "%8f",   std::numeric_limits<double>::infinity() ) );