diff options
Diffstat (limited to 'libcxx/test/localization')
3 files changed, 38 insertions, 0 deletions
diff --git a/libcxx/test/localization/locale.categories/category.ctype/ctype_base.pass.cpp b/libcxx/test/localization/locale.categories/category.ctype/ctype_base.pass.cpp index 9365b265621..497eaa3fefa 100644 --- a/libcxx/test/localization/locale.categories/category.ctype/ctype_base.pass.cpp +++ b/libcxx/test/localization/locale.categories/category.ctype/ctype_base.pass.cpp @@ -31,6 +31,9 @@ #include <locale> #include <cassert> +template <class _Tp> +void test(const _Tp &) {} + int main() { assert(std::ctype_base::space); @@ -54,4 +57,17 @@ int main() & std::ctype_base::xdigit) == 0); assert(std::ctype_base::alnum == (std::ctype_base::alpha | std::ctype_base::digit)); assert(std::ctype_base::graph == (std::ctype_base::alnum | std::ctype_base::punct)); + + test(std::ctype_base::space); + test(std::ctype_base::print); + test(std::ctype_base::cntrl); + test(std::ctype_base::upper); + test(std::ctype_base::lower); + test(std::ctype_base::alpha); + test(std::ctype_base::digit); + test(std::ctype_base::punct); + test(std::ctype_base::xdigit); + test(std::ctype_base::blank); + test(std::ctype_base::alnum); + test(std::ctype_base::graph); } diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp index 7025ec9c528..0d616e35e1b 100644 --- a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp +++ b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp @@ -17,10 +17,14 @@ // public: // typedef _CharT char_type; // typedef basic_string<char_type> string_type; +// static const bool intl = International; #include <locale> #include <type_traits> +template <class _Tp> +void test(const _Tp &) {} + int main() { static_assert((std::is_base_of<std::locale::facet, std::moneypunct<char> >::value), ""); @@ -31,4 +35,9 @@ int main() static_assert((std::is_same<std::moneypunct<wchar_t>::char_type, wchar_t>::value), ""); static_assert((std::is_same<std::moneypunct<char>::string_type, std::string>::value), ""); static_assert((std::is_same<std::moneypunct<wchar_t>::string_type, std::wstring>::value), ""); + + test(std::moneypunct<char, false>::intl); + test(std::moneypunct<char, true>::intl); + test(std::moneypunct<wchar_t, false>::intl); + test(std::moneypunct<wchar_t, true>::intl); } diff --git a/libcxx/test/localization/locales/locale/locale.types/locale.category/category.pass.cpp b/libcxx/test/localization/locales/locale/locale.types/locale.category/category.pass.cpp index 0119b844a78..b8ed5968e81 100644 --- a/libcxx/test/localization/locales/locale/locale.types/locale.category/category.pass.cpp +++ b/libcxx/test/localization/locales/locale/locale.types/locale.category/category.pass.cpp @@ -15,6 +15,10 @@ #include <type_traits> #include <cassert> +template <class _Tp> +void test(const _Tp &) {} + + int main() { static_assert((std::is_same<std::locale::category, int>::value), ""); @@ -38,4 +42,13 @@ int main() | std::locale::time | std::locale::messages) == std::locale::all); + + test(std::locale::none); + test(std::locale::collate); + test(std::locale::ctype); + test(std::locale::monetary); + test(std::locale::numeric); + test(std::locale::time); + test(std::locale::messages); + test(std::locale::all); } |