summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/localization
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2018-12-18 23:19:00 +0000
committerMarshall Clow <mclow.lists@gmail.com>2018-12-18 23:19:00 +0000
commit5a127cdcbfae6f753b05d8cd1de8d8271f7d8a23 (patch)
tree625fd3366faad5285125ba9fde0905ca7bd81a65 /libcxx/test/std/localization
parentcb67fad44a59cb783d2047a27ad387ed3ec2a466 (diff)
downloadbcm5719-llvm-5a127cdcbfae6f753b05d8cd1de8d8271f7d8a23.tar.gz
bcm5719-llvm-5a127cdcbfae6f753b05d8cd1de8d8271f7d8a23.zip
Portability fix: add missing includes and static_casts. Reviewed as https://reviews.llvm.org/D55777. Thanks to Andrey Maksimov for the patch.
llvm-svn: 349566
Diffstat (limited to 'libcxx/test/std/localization')
-rw-r--r--libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp1
-rw-r--r--libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp10
-rw-r--r--libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp1
3 files changed, 8 insertions, 4 deletions
diff --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp
index d7bcb2908d7..e4cabf6efa0 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp
@@ -20,6 +20,7 @@
#include <vector>
#include <cassert>
#include <cstddef>
+#include <cstring>
typedef std::codecvt<wchar_t, char, std::mbstate_t> F;
diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp
index d900c3764a1..570b8306cee 100644
--- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp
@@ -17,6 +17,7 @@
#include <locale>
#include <ios>
#include <cassert>
+#include <limits>
#include <streambuf>
#include "test_iterators.h"
@@ -46,6 +47,7 @@ int main()
const my_facet f(1);
std::ios ios(0);
long v = -1;
+ const std::ios_base::fmtflags zf = static_cast<std::ios_base::fmtflags>(0);
{
const char str[] = "123";
assert((ios.flags() & ios.basefield) == ios.dec);
@@ -110,7 +112,7 @@ int main()
}
{
const char str[] = "123";
- ios.setf(0, ios.basefield);
+ ios.setf(zf, ios.basefield);
std::ios_base::iostate err = ios.goodbit;
input_iterator<const char*> iter =
f.get(input_iterator<const char*>(str),
@@ -122,7 +124,7 @@ int main()
}
{
const char str[] = "0x123";
- ios.setf(0, ios.basefield);
+ ios.setf(zf, ios.basefield);
std::ios_base::iostate err = ios.goodbit;
input_iterator<const char*> iter =
f.get(input_iterator<const char*>(str),
@@ -134,7 +136,7 @@ int main()
}
{
const char str[] = "0123";
- ios.setf(0, ios.basefield);
+ ios.setf(zf, ios.basefield);
std::ios_base::iostate err = ios.goodbit;
input_iterator<const char*> iter =
f.get(input_iterator<const char*>(str),
@@ -146,7 +148,7 @@ int main()
}
{
const char str[] = "2-";
- ios.setf(0, ios.basefield);
+ ios.setf(zf, ios.basefield);
std::ios_base::iostate err = ios.goodbit;
input_iterator<const char*> iter =
f.get(input_iterator<const char*>(str),
diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
index bd9b3f05de7..712d2897dbc 100644
--- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
@@ -14,6 +14,7 @@
// iter_type get(iter_type in, iter_type end, ios_base&,
// ios_base::iostate& err, unsigned int& v) const;
+#include <limits>
#include <locale>
#include <ios>
#include <cassert>
OpenPOWER on IntegriCloud