Don't hardcode the Czech locale name.
We already have a definition for the Czech locale name in platform_support.h. Use this one instead. While there, respect the common format of the tests. For most other tests it's the case that test_iterators.h is placed right underneath the other #includes (without an empty line). platform_support.h is included after an empty line. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@232383 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -23,9 +23,10 @@
|
||||
|
||||
#include <regex>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_iterators.h"
|
||||
|
||||
#include "platform_support.h" // locale name macros
|
||||
|
||||
int main()
|
||||
{
|
||||
{
|
||||
@@ -689,7 +690,7 @@ int main()
|
||||
std::regex_constants::awk)));
|
||||
assert(m.size() == 0);
|
||||
}
|
||||
std::locale::global(std::locale("cs_CZ.ISO8859-2"));
|
||||
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
|
||||
{
|
||||
std::cmatch m;
|
||||
const char s[] = "m";
|
||||
@@ -1460,7 +1461,7 @@ int main()
|
||||
std::regex_constants::awk)));
|
||||
assert(m.size() == 0);
|
||||
}
|
||||
std::locale::global(std::locale("cs_CZ.ISO8859-2"));
|
||||
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
|
||||
{
|
||||
std::wcmatch m;
|
||||
const wchar_t s[] = L"m";
|
||||
|
@@ -23,9 +23,10 @@
|
||||
|
||||
#include <regex>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_iterators.h"
|
||||
|
||||
#include "platform_support.h" // locale name macros
|
||||
|
||||
int main()
|
||||
{
|
||||
{
|
||||
@@ -691,7 +692,7 @@ int main()
|
||||
std::regex_constants::basic)));
|
||||
assert(m.size() == 0);
|
||||
}
|
||||
std::locale::global(std::locale("cs_CZ.ISO8859-2"));
|
||||
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
|
||||
{
|
||||
std::cmatch m;
|
||||
const char s[] = "m";
|
||||
@@ -1449,7 +1450,7 @@ int main()
|
||||
std::regex_constants::basic)));
|
||||
assert(m.size() == 0);
|
||||
}
|
||||
std::locale::global(std::locale("cs_CZ.ISO8859-2"));
|
||||
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
|
||||
{
|
||||
std::wcmatch m;
|
||||
const wchar_t s[] = L"m";
|
||||
|
@@ -23,9 +23,10 @@
|
||||
|
||||
#include <regex>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_iterators.h"
|
||||
|
||||
#include "platform_support.h" // locale name macros
|
||||
|
||||
int main()
|
||||
{
|
||||
{
|
||||
@@ -671,7 +672,7 @@ int main()
|
||||
assert(!std::regex_search(s, m, std::regex("[a[.hyphen.]z]")));
|
||||
assert(m.size() == 0);
|
||||
}
|
||||
std::locale::global(std::locale("cs_CZ.ISO8859-2"));
|
||||
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
|
||||
{
|
||||
std::cmatch m;
|
||||
const char s[] = "m";
|
||||
@@ -1450,7 +1451,7 @@ int main()
|
||||
assert(!std::regex_search(s, m, std::wregex(L"[a[.hyphen.]z]")));
|
||||
assert(m.size() == 0);
|
||||
}
|
||||
std::locale::global(std::locale("cs_CZ.ISO8859-2"));
|
||||
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
|
||||
{
|
||||
std::wcmatch m;
|
||||
const wchar_t s[] = L"m";
|
||||
|
@@ -23,9 +23,10 @@
|
||||
|
||||
#include <regex>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_iterators.h"
|
||||
|
||||
#include "platform_support.h" // locale name macros
|
||||
|
||||
int main()
|
||||
{
|
||||
{
|
||||
@@ -689,7 +690,7 @@ int main()
|
||||
std::regex_constants::extended)));
|
||||
assert(m.size() == 0);
|
||||
}
|
||||
std::locale::global(std::locale("cs_CZ.ISO8859-2"));
|
||||
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
|
||||
{
|
||||
std::cmatch m;
|
||||
const char s[] = "m";
|
||||
@@ -1445,7 +1446,7 @@ int main()
|
||||
std::regex_constants::extended)));
|
||||
assert(m.size() == 0);
|
||||
}
|
||||
std::locale::global(std::locale("cs_CZ.ISO8859-2"));
|
||||
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
|
||||
{
|
||||
std::wcmatch m;
|
||||
const wchar_t s[] = L"m";
|
||||
|
Reference in New Issue
Block a user