summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/localization/locales/locale/locale.members/name.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/localization/locales/locale/locale.members/name.pass.cpp')
-rw-r--r--libcxx/test/std/localization/locales/locale/locale.members/name.pass.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/libcxx/test/std/localization/locales/locale/locale.members/name.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.members/name.pass.cpp
new file mode 100644
index 00000000000..9d9b1423f33
--- /dev/null
+++ b/libcxx/test/std/localization/locales/locale/locale.members/name.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+// <locale>
+
+// basic_string<char> name() const;
+
+#include <locale>
+#include <cassert>
+
+#include "platform_support.h" // locale name macros
+
+int main()
+{
+ {
+ std::locale loc;
+ assert(loc.name() == "C");
+ }
+ {
+ std::locale loc(LOCALE_en_US_UTF_8);
+ assert(loc.name() == LOCALE_en_US_UTF_8);
+ }
+}
OpenPOWER on IntegriCloud