[libcxx] r329148 - Fix undefined macro issue in locale tests
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 3 21:39:39 PDT 2018
Author: ericwf
Date: Tue Apr 3 21:39:38 2018
New Revision: 329148
URL: http://llvm.org/viewvc/llvm-project?rev=329148&view=rev
Log:
Fix undefined macro issue in locale tests
Modified:
libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.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=329148&r1=329147&r2=329148&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 Tue Apr 3 21:39:38 2018
@@ -110,7 +110,10 @@ int main()
assert(f.decimal_point() == L',');
}
// GLIBC 2.23 uses '.' as the decimal point while other C libraries use ','
-// GLIBC 2.27 corrects this.
+// GLIBC 2.27 corrects this
+#ifndef TEST_GLIBC_PREREQ
+#define TEST_GLIBC_PREREQ(x, y) 0
+#endif
#if !defined(TEST_HAS_GLIBC) || TEST_GLIBC_PREREQ(2, 27)
const char sep = ',';
const wchar_t wsep = L',';
Modified: libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp?rev=329148&r1=329147&r2=329148&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp Tue Apr 3 21:39:38 2018
@@ -118,6 +118,9 @@ int main()
// and U002E as mon_decimal_point.
// TODO: Fix thousands_sep for 'char'.
// related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16006
+#ifndef TEST_GLIBC_PREREQ
+#define TEST_GLIBC_PREREQ(x, y) 0
+#endif
#ifndef TEST_HAS_GLIBC
const char sep = ' ';
const wchar_t wsep = L' ';
More information about the cfe-commits
mailing list