summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/localization
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-04-04 04:39:38 +0000
committerEric Fiselier <eric@efcs.ca>2018-04-04 04:39:38 +0000
commit06091cfa7ad3978dc492630651d8741b7bf415da (patch)
tree1d2f5d763fd5f58a90e361ed6b33cf2265de62a9 /libcxx/test/std/localization
parentafa22edcf08ab18f8bd2d2b7412b65707b6da3e2 (diff)
downloadbcm5719-llvm-06091cfa7ad3978dc492630651d8741b7bf415da.tar.gz
bcm5719-llvm-06091cfa7ad3978dc492630651d8741b7bf415da.zip
Fix undefined macro issue in locale tests
llvm-svn: 329148
Diffstat (limited to 'libcxx/test/std/localization')
-rw-r--r--libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp5
-rw-r--r--libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp3
2 files changed, 7 insertions, 1 deletions
diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
index 84fc8f802b5..e1c616c5523 100644
--- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
@@ -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',';
diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
index 4a672a7b6d8..880d800c572 100644
--- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
@@ -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' ';
OpenPOWER on IntegriCloud