diff --git a/libstdc++/tests/ChangeLog b/libstdc++/tests/ChangeLog index 992bef54918..87ce0fc6c19 100644 --- a/libstdc++/tests/ChangeLog +++ b/libstdc++/tests/ChangeLog @@ -1,3 +1,8 @@ +1998-07-17 Jason Merrill + + * tmap.cc: Use less. + * tlist.cc (main): Use remove_if. + 1998-07-13 Manfred Hollstein * Makefile.in (VERSION): Bump to 2.9.0. diff --git a/libstdc++/tests/tlist.cc b/libstdc++/tests/tlist.cc index aaf56714a79..a37c999d0b5 100644 --- a/libstdc++/tests/tlist.cc +++ b/libstdc++/tests/tlist.cc @@ -1,6 +1,4 @@ -/* - test/demo of generic lists -*/ +// test/demo of generic lists #include @@ -8,8 +6,8 @@ else _assert(#ex, __FILE__,__LINE__); } #include -#include "list.h" -#include "algo.h" +#include +#include bool int_compare(int a, int b) { @@ -123,16 +121,7 @@ main() for (it = a.begin(), bit = b.begin(); it != a.end () && bit != b.end (); ) g.insert (g.end (), *it++ + *bit++); cout << "\nlist g = combine(plus, a, b);\n"; print(g); -#if 1 - for (it = g.begin(); it != g.end(); ) - { - bit = it++; - if (is_odd (*bit)) - g.erase (bit); - } -#else g.remove_if (is_odd); -#endif cout << "\ng.del(is_odd);\n"; print(g); ff.erase (ff.begin (), ff.end()); diff --git a/libstdc++/tests/tmap.cc b/libstdc++/tests/tmap.cc index 7169f9d20d1..900e66f506b 100644 --- a/libstdc++/tests/tmap.cc +++ b/libstdc++/tests/tmap.cc @@ -3,21 +3,14 @@ #include #include -int SIZE; - -#if 0 -/* Crashes compiler */ #define int_less less -#else -struct int_less { - bool operator() (int x, int y) const { return x < y; } -}; struct str_less { bool operator() (char* x, char* y) const { return strcmp(x,y) < 0; } }; -#endif #if 0 +int SIZE; + void add(int x[], int y[], map& a) { for (int i = 0; i < SIZE; ++i) a[x[i]] = y[i];