[libcxx] r328268 - Add temporary printouts to test to help debug failures.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 22 16:14:20 PDT 2018


Author: ericwf
Date: Thu Mar 22 16:14:20 2018
New Revision: 328268

URL: http://llvm.org/viewvc/llvm-project?rev=328268&view=rev
Log:
Add temporary printouts to test to help debug failures.

Some debian libc++ bots started having failures in the locale
tests due to what I assume is a change in the locale data for fr_FR
in glibc.

This change prints the actual value from the test to help debugging.
It should be reverted once the bots cycle.

Modified:
    libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
    libcxx/trunk/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp

Modified: libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp?rev=328268&r1=328267&r2=328268&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp Thu Mar 22 16:14:20 2018
@@ -21,6 +21,7 @@
 #include <locale>
 #include <limits>
 #include <cassert>
+#include <iostream> // FIXME: for debugging purposes only
 
 #include "test_macros.h"
 #include "platform_support.h" // locale name macros
@@ -119,6 +120,11 @@ int main()
 #endif
     {
         Fnf f(LOCALE_ru_RU_UTF_8, 1);
+        if (f.decimal_point() != sep) {
+            std::cout << "f.decimal_point() = '" << f.decimal_point() << "'\n";
+            std::cout << "sep = '" << sep << "'\n";
+            std::cout << std::endl;
+        }
         assert(f.decimal_point() == sep);
     }
     {

Modified: libcxx/trunk/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp?rev=328268&r1=328267&r2=328268&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp Thu Mar 22 16:14:20 2018
@@ -19,6 +19,7 @@
 
 #include <locale>
 #include <cassert>
+#include <iostream> // FIXME: for debugging purposes only
 
 #include "test_macros.h"
 #include "platform_support.h" // locale name macros
@@ -63,6 +64,11 @@ int main()
         {
             typedef char C;
             const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
+            if (np.thousands_sep() != sep) {
+              std::cout << "np.thousands_sep() = '" << np.thousands_sep() << "'\n";
+              std::cout << "sep = '" << sep << "'\n";
+              std::cout << std::endl;
+            }
             assert(np.thousands_sep() == sep);
         }
         {




More information about the cfe-commits mailing list