From 5a83710e371fe68a06e6e3876c6a2c8b820a8976 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sat, 20 Dec 2014 01:40:03 +0000 Subject: Move test into test/std subdirectory. llvm-svn: 224658 --- libcxx/test/std/re/re.traits/transform.pass.cpp | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 libcxx/test/std/re/re.traits/transform.pass.cpp (limited to 'libcxx/test/std/re/re.traits/transform.pass.cpp') diff --git a/libcxx/test/std/re/re.traits/transform.pass.cpp b/libcxx/test/std/re/re.traits/transform.pass.cpp new file mode 100644 index 00000000000..c3bce7939fe --- /dev/null +++ b/libcxx/test/std/re/re.traits/transform.pass.cpp @@ -0,0 +1,44 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// REQUIRES: locale.cs_CZ.ISO8859-2 + +// + +// template struct regex_traits; + +// template +// string_type transform(ForwardIterator first, ForwardIterator last) const; + +#include +#include +#include "test_iterators.h" + +int main() +{ + { + std::regex_traits t; + const char a[] = "a"; + const char B[] = "B"; + typedef forward_iterator F; + assert(t.transform(F(a), F(a+1)) > t.transform(F(B), F(B+1))); + t.imbue(std::locale("cs_CZ.ISO8859-2")); + assert(t.transform(F(a), F(a+1)) < t.transform(F(B), F(B+1))); + } + { + std::regex_traits t; + const wchar_t a[] = L"a"; + const wchar_t B[] = L"B"; + typedef forward_iterator F; + assert(t.transform(F(a), F(a+1)) > t.transform(F(B), F(B+1))); + t.imbue(std::locale("cs_CZ.ISO8859-2")); + assert(t.transform(F(a), F(a+1)) < t.transform(F(B), F(B+1))); + } +} -- cgit v1.2.3