[libcxx] r290758 - Fix some 'FIXME's in the tests.
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 30 09:42:11 PST 2016
Author: marshall
Date: Fri Dec 30 11:42:11 2016
New Revision: 290758
URL: http://llvm.org/viewvc/llvm-project?rev=290758&view=rev
Log:
Fix some 'FIXME's in the tests.
Modified:
libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp
libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp
libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp
libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp
Modified: libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp?rev=290758&r1=290757&r2=290758&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp Fri Dec 30 11:42:11 2016
@@ -54,13 +54,13 @@ unsigned count_equal::count = 0;
template <typename Iter1, typename Iter2>
void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) {
- count_equal::count = 0;
std::experimental::boyer_moore_searcher<Iter2,
MyHash<typename std::remove_cv<typename std::iterator_traits<Iter2>::value_type>::type>,
count_equal>
s{b2, e2};
- assert(count_equal::count <= max_count);
+ count_equal::count = 0;
assert(result == std::experimental::search(b1, e1, s));
+ assert(count_equal::count <= max_count);
}
template <class Iter1, class Iter2>
@@ -81,8 +81,7 @@ test()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- // FIXME: The max_count for this search should be 'sa'
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa * 2);
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
@@ -119,8 +118,7 @@ test2()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- // FIXME: The max_count for this search should be 'sa'
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa * 2);
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
Modified: libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp?rev=290758&r1=290757&r2=290758&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp Fri Dec 30 11:42:11 2016
@@ -75,8 +75,7 @@ test()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- // FIXME: The max_count for this search should be 'sa'
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa * 2);
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
@@ -111,8 +110,7 @@ test2()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- // FIXME: The max_count for this search should be 'sa'
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
char ic[] = {1};
Modified: libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp?rev=290758&r1=290757&r2=290758&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp Fri Dec 30 11:42:11 2016
@@ -79,8 +79,7 @@ test()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- // FIXME: The max_count for this search should be 'sa'
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
int ic[] = {1};
@@ -114,8 +113,7 @@ test2()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- // FIXME: The max_count for this search should be 'sa'
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
char ic[] = {1};
Modified: libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp?rev=290758&r1=290757&r2=290758&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp Fri Dec 30 11:42:11 2016
@@ -73,8 +73,7 @@ test()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- // FIXME: The max_count for this search should be 'sa'
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
int ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
int ic[] = {1};
@@ -108,8 +107,7 @@ test2()
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia+sa-3), Iter2(ia+sa), Iter1(ia+sa-3), 3*sa);
do_search(Iter1(ia), Iter1(ia+sa), Iter2(ia), Iter2(ia+sa), Iter1(ia), sa*sa);
do_search(Iter1(ia), Iter1(ia+sa-1), Iter2(ia), Iter2(ia+sa), Iter1(ia+sa-1), (sa-1)*sa);
- // FIXME: The max_count for this search should be 'sa'
- do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa*2);
+ do_search(Iter1(ia), Iter1(ia+1), Iter2(ia), Iter2(ia+sa), Iter1(ia+1), sa);
char ib[] = {0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4};
const unsigned sb = sizeof(ib)/sizeof(ib[0]);
char ic[] = {1};
More information about the cfe-commits
mailing list