[libcxx] [test] Fix MSVC warning C4067 "unexpected tokens following preprocessor directive - expected a newline".

Also fixes Clang/LLVM 4.0 (for Windows) error "function-like macro 'TEST_GLIBC_PREREQ' is not defined".

Fixes D34535.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@308533 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stephan T. Lavavej
2017-07-19 22:02:25 +00:00
parent ffc9965e58
commit 321617c33d

View File

@@ -117,7 +117,13 @@ int main()
// GLIBC <= 2.23 uses currency_symbol="<U0440><U0443><U0431>"
// GLIBC >= 2.24 uses currency_symbol="<U20BD>"
// See also: http://www.fileformat.info/info/unicode/char/20bd/index.htm
#if defined(TEST_GLIBC_PREREQ) && TEST_GLIBC_PREREQ(2, 24)
#if defined(TEST_GLIBC_PREREQ)
#if TEST_GLIBC_PREREQ(2, 24)
#define TEST_GLIBC_2_24_CURRENCY_SYMBOL
#endif
#endif
#if defined(TEST_GLIBC_2_24_CURRENCY_SYMBOL)
assert(f.curr_symbol() == " \u20BD");
#else
assert(f.curr_symbol() == " \xD1\x80\xD1\x83\xD0\xB1");
@@ -129,7 +135,7 @@ int main()
}
{
Fwf f(LOCALE_ru_RU_UTF_8, 1);
#if defined(TEST_GLIBC_PREREQ) && TEST_GLIBC_PREREQ(2, 24)
#if defined(TEST_GLIBC_2_24_CURRENCY_SYMBOL)
assert(f.curr_symbol() == L" \u20BD");
#else
assert(f.curr_symbol() == L" \x440\x443\x431");