summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std')
-rw-r--r--libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp3
-rw-r--r--libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp5
-rw-r--r--libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp5
-rw-r--r--libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp5
-rw-r--r--libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp5
-rw-r--r--libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp4
6 files changed, 18 insertions, 9 deletions
diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
index 967b6e37762..c923d847f11 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
@@ -17,12 +17,13 @@
#include <algorithm>
#include <cassert>
+#include <cstddef>
#include "test_macros.h"
struct gen
{
- int operator()(int n)
+ std::ptrdiff_t operator()(std::ptrdiff_t n)
{
return n-1;
}
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
index ebb876709b5..ea1e7dfe9fa 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
@@ -16,6 +16,7 @@
// sort(Iter first, Iter last);
#include <algorithm>
+#include <iterator>
#include <cassert>
template <class RI>
@@ -23,9 +24,11 @@ void
test_sort_helper(RI f, RI l)
{
typedef typename std::iterator_traits<RI>::value_type value_type;
+ typedef typename std::iterator_traits<RI>::difference_type difference_type;
+
if (f != l)
{
- long len = l - f;
+ difference_type len = l - f;
value_type* save(new value_type[len]);
do
{
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
index 2721c9c01ec..74a876cee19 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
@@ -16,6 +16,7 @@
// stable_sort(Iter first, Iter last);
#include <algorithm>
+#include <iterator>
#include <cassert>
template <class RI>
@@ -23,9 +24,11 @@ void
test_sort_helper(RI f, RI l)
{
typedef typename std::iterator_traits<RI>::value_type value_type;
+ typedef typename std::iterator_traits<RI>::difference_type difference_type;
+
if (f != l)
{
- long len = l - f;
+ difference_type len = l - f;
value_type* save(new value_type[len]);
do
{
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp
index c8d4e2d34f1..eec9e42636a 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp
@@ -14,14 +14,15 @@
#include <forward_list>
#include <cassert>
#include <iterator>
+#include <cstddef>
#include "min_allocator.h"
typedef int T;
const T t1[] = {0, 1, 2, 3, 4, 5, 6, 7};
const T t2[] = {10, 11, 12, 13, 14, 15};
-const int size_t1 = std::end(t1) - std::begin(t1);
-const int size_t2 = std::end(t2) - std::begin(t2);
+const std::ptrdiff_t size_t1 = std::end(t1) - std::begin(t1);
+const std::ptrdiff_t size_t2 = std::end(t2) - std::begin(t2);
template <class C>
void
diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp
index 349a3872d75..cc86c962567 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp
@@ -14,6 +14,7 @@
#include <forward_list>
#include <cassert>
#include <iterator>
+#include <cstddef>
#include "test_macros.h"
#include "min_allocator.h"
@@ -21,8 +22,8 @@
typedef int T;
const T t1[] = {0, 1, 2, 3, 4, 5, 6, 7};
const T t2[] = {10, 11, 12};
-const int size_t1 = std::end(t1) - std::begin(t1);
-const int size_t2 = std::end(t2) - std::begin(t2);
+const std::ptrdiff_t size_t1 = std::end(t1) - std::begin(t1);
+const std::ptrdiff_t size_t2 = std::end(t2) - std::begin(t2);
template <class C>
void
diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
index e498172aa8b..ed68279d7b5 100644
--- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
+++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp
@@ -27,8 +27,8 @@ int main()
std::istringstream is(s);
const unsigned int ignoreLen=10;
- size_t a=is.tellg();
+ std::istringstream::pos_type a=is.tellg();
is.ignore(ignoreLen);
- size_t b=is.tellg();
+ std::istringstream::pos_type b=is.tellg();
assert((b-a)==ignoreLen);
}
OpenPOWER on IntegriCloud