From e969a4c33ab8592e5ac2924b9920bcc37c36e776 Mon Sep 17 00:00:00 2001 From: Samuel Debionne Date: Mon, 9 Mar 2015 10:19:24 +0100 Subject: [PATCH] [test][util][range] Add tests for const pointer Add tests for range iterator_range and pair --- test/util/range.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/util/range.cpp b/test/util/range.cpp index 22095e975..c96464abe 100644 --- a/test/util/range.cpp +++ b/test/util/range.cpp @@ -12,6 +12,7 @@ #include +#include #include #include @@ -198,12 +199,13 @@ void test_detail() #endif } +template void test_pointers() { int arr[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; - boost::iterator_range r1(arr, arr+10); - std::pair r2(arr, arr+10); + boost::iterator_range r1(arr, arr + 10); + std::pair r2(arr, arr + 10); BOOST_CHECK(bgr::front(r1) == 0); BOOST_CHECK(bgr::front(r2) == 0); @@ -226,7 +228,8 @@ int test_main(int, char* []) test_all(); test_detail(); - test_pointers(); + test_pointers(); + test_pointers(); return 0; }