+2019-11-26 Simon Marchi <simon.marchi@efficios.com>
+
+ * unittests/array-view-selftests.c (check_ptr_size_ctor2): Make
+ static.
+ * unittests/basic_string_view/capacity/1.cc (test01): Likewise.
+ * unittests/basic_string_view/cons/char/1.cc (test01): Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/cons/char/2.cc (test03): Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/cons/char/3.cc (test05): Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/element_access/char/1.cc (test01):
+ Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/element_access/char/empty.cc (main):
+ Likewise.
+ * unittests/basic_string_view/element_access/char/front_back.cc
+ (test01): Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/inserters/char/2.cc (test05):
+ Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc
+ (test01): Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc
+ (test01): Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/modifiers/swap/char/1.cc (test01):
+ Likewise.
+ * unittests/basic_string_view/operations/compare/char/1.cc
+ (test01): Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/operations/compare/char/13650.cc
+ (test01): Likewise.
+ * unittests/basic_string_view/operations/copy/char/1.cc (test01):
+ Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/operations/data/char/1.cc (test01):
+ Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/operations/find/char/1.cc (test01):
+ Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/operations/find/char/2.cc (test02):
+ Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/operations/find/char/3.cc (test03):
+ Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/operations/find/char/4.cc (main):
+ Likewise.
+ * unittests/basic_string_view/operations/rfind/char/1.cc (test01):
+ Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/operations/rfind/char/2.cc (test02):
+ Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/operations/rfind/char/3.cc (test03):
+ Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/operations/substr/char/1.cc
+ (test01): Likewise.
+ (main): Likewise.
+ * unittests/basic_string_view/operators/char/2.cc (main):
+ Likewise.
+ * unittests/optional/assignment/1.cc (test): Likewise.
+ * unittests/optional/assignment/2.cc (test): Likewise.
+ * unittests/optional/assignment/3.cc (test): Likewise.
+ * unittests/optional/assignment/4.cc (test): Likewise.
+ * unittests/optional/assignment/5.cc (test): Likewise.
+ * unittests/optional/assignment/6.cc (test): Likewise.
+ * unittests/optional/assignment/7.cc (test): Likewise.
+ * unittests/optional/cons/copy.cc (test): Likewise.
+ * unittests/optional/cons/default.cc (test): Likewise.
+ * unittests/optional/cons/move.cc (test): Likewise.
+ * unittests/optional/cons/value.cc (test): Likewise.
+ * unittests/optional/in_place.cc (test): Likewise.
+ * unittests/optional/observers/1.cc (test): Likewise.
+ * unittests/optional/observers/2.cc (test): Likewise.
+
2019-11-26 Simon Marchi <simon.marchi@efficios.com>
* tui-win.h (tui_set_var_cmd): Remove.
/* Check the array_view<T>(PTR, SIZE) ctor, when T is a pointer. */
-void
+static void
check_ptr_size_ctor2 ()
{
struct A {};
namespace string_view {
namespace capacity_1 {
-void
-test01()
+static void
+test01 ()
{
gdb::basic_string_view<A<B>> str02;
typedef gdb::basic_string_view< A<B> >::size_type size_type_o;
VERIFY( sz03 >= sz04 );
}
-int
+static int
main()
{
test01();
namespace cons_1 {
-void
-test01()
+static void
+test01 ()
{
typedef gdb::string_view::size_type csize_type;
VERIFY( str07.length() == 10 );
}
-int
-main()
+static int
+main ()
{
test01();
namespace cons_2 {
-void
-test03()
+static void
+test03 ()
{
const char* with_nulls = "This contains \0 a zero byte.";
VERIFY( s2.size() == 28 );
}
-int
-main()
+static int
+main ()
{
test03();
namespace cons_3 {
-void
-test05()
+static void
+test05 ()
{
char const * s = 0;
gdb::string_view zero_length_built_with_NULL(s, 0);
}
-int
-main()
+static int
+main ()
{
test05();
namespace element_access_1 {
-void
-test01()
+static void
+test01 ()
{
typedef gdb::string_view::size_type csize_type;
typedef gdb::string_view::const_reference cref;
}
}
-int
-main()
+static int
+main ()
{
test01();
return 0;
namespace element_access_empty {
-int
-main()
+static int
+main ()
{
{
gdb::string_view empty;
namespace element_access_front_back {
-void
-test01()
+static void
+test01 ()
{
gdb::string_view str("ramifications");
const gdb::string_view cstr("melodien");
VERIFY( cstr.back() == 'n' );
}
-int
-main()
+static int
+main ()
{
test01();
// testing basic_filebuf::xsputn via stress testing with large string_views
// based on a bug report libstdc++ 9
// mode == out
-void
-test05(std::size_t size)
+static void
+test05 (std::size_t size)
{
bool test ATTRIBUTE_UNUSED = true;
VERIFY( count == 2 * size );
}
-int
-main()
+static int
+main ()
{
test05(1);
test05(1000);
namespace modifiers_remove_prefix {
-void
-test01()
+static void
+test01 ()
{
using gdb::string_view;
}
#endif
-int
-main()
+static int
+main ()
{
test01();
#ifndef GDB_STRING_VIEW
namespace modifiers_remove_suffix {
-void
-test01()
+static void
+test01 ()
{
using gdb::string_view;
}
#endif
-int
-main()
+static int
+main ()
{
test01();
#ifndef GDB_STRING_VIEW
namespace modifiers_swap {
-void
-test01()
+static void
+test01 ()
{
using gdb::string_view;
return 0;
}
-int
-test01()
+static int
+test01 ()
{
using gdb::string_view;
}
-int
-main()
+static int
+main ()
{
test01();
namespace operations_compare_13650 {
// libstdc++/13650
-void
-test01()
+static void
+test01 ()
{
using gdb::string_view;
VERIFY( str_b.compare(0, 3, lit_02, 5) < 0 );
}
-int
+static int
main()
{
test01();
namespace operations_copy_1 {
-void
-test01()
+static void
+test01 ()
{
typedef gdb::string_view::size_type csize_type;
VERIFY( '9' == buffer[0] );
}
-int
-main()
+static int
+main ()
{
test01();
namespace operations_data_1 {
-int
-test01()
+static int
+test01 ()
{
gdb::string_view empty;
return 0;
}
-int
-main()
+static int
+main ()
{
test01();
namespace operations_find_1 {
-void
-test01()
+static void
+test01 ()
{
typedef gdb::string_view::size_type csize_type;
typedef gdb::string_view::const_reference cref;
}
#endif
-int
-main()
+static int
+main ()
{
test01();
#ifndef GDB_STRING_VIEW
namespace operations_find_2 {
-void
-test02()
+static void
+test02 ()
{
typedef gdb::string_view::size_type csize_type;
csize_type npos = gdb::string_view::npos;
}
#endif
-int
-main()
+static int
+main ()
{
test02();
#ifndef GDB_STRING_VIEW
namespace operations_find_3 {
-void
-test03()
+static void
+test03 ()
{
typedef gdb::string_view::size_type csize_type;
csize_type npos = gdb::string_view::npos;
}
#endif
-int
-main()
+static int
+main ()
{
test03();
#ifndef GDB_STRING_VIEW
namespace operations_find_4 {
// libstdc++/31401
-void
+static void
test01()
{
typedef gdb::string_view::size_type csize_type;
VERIFY( pos1 == npos );
}
-int
-main()
+static int
+main ()
{
test01();
// basic_string_view rfind
-void
-test01()
+static void
+test01 ()
{
typedef gdb::string_view::size_type csize_type;
typedef gdb::string_view::const_reference cref;
VERIFY( csz01 == npos );
}
-int
-main()
+static int
+main ()
{
test01();
// basic_string_view::find_last_of
-void
-test02()
+static void
+test02 ()
{
gdb::string_view z("ab");
gdb::string_view::size_type pos;
VERIFY( pos == gdb::string_view::npos );
}
-int
-main()
+static int
+main ()
{
test02();
// basic_string_view::find_last_not_of
-void
-test03()
+static void
+test03 ()
{
typedef gdb::string_view::size_type csize_type;
gdb::string_view::size_type pos;
pos = z.find_last_not_of("Xa");
VERIFY( pos == 1 );
}
-int
-main()
+
+static int
+main ()
{
test03();
namespace operations_substr_1 {
-void
-test01()
+static void
+test01 ()
{
typedef gdb::string_view::size_type csize_type;
typedef gdb::string_view::const_reference cref;
}
}
-int
-main()
+static int
+main ()
{
test01();
namespace operators_2 {
-void
+static void
test01()
{
gdb::string_view str_0("costa rica");
}
#endif
-int
-main()
+static int
+main ()
{
test01();
#ifndef GDB_STRING_VIEW
state_type state = zero;
};
-void test()
+static void
+test ()
{
using O = gdb::optional<value_type>;
using S = value_type::state_type;
state_type state = zero;
};
-void test()
+static void
+test ()
{
using O = gdb::optional<value_type>;
using S = value_type::state_type;
state_type state = zero;
};
-void test()
+static void
+test ()
{
using O = gdb::optional<value_type>;
using S = value_type::state_type;
state_type state = zero;
};
-void test()
+static void
+test ()
{
using O = gdb::optional<value_type>;
using S = value_type::state_type;
struct value_type : private mixin_counter { };
-void test()
+static void
+test ()
{
using O = gdb::optional<value_type>;
int state = 0;
};
-void test()
+static void
+test ()
{
using O = gdb::optional<value_type>;
namespace assign_7 {
-void test()
+static void
+test ()
{
gdb::optional<int> o{666};
VERIFY(o && *o == 666);
throwing_copy(throwing_copy const&) { throw exception {}; }
};
-void test()
+static void
+test ()
{
// [20.5.4.1] Constructors
int tracker::count = 0;
-void test()
+static void
+test ()
{
// [20.5.4.1] Constructors
throwing_move(throwing_move const&) { throw exception {}; }
};
-void test()
+static void
+test ()
{
// [20.5.4.1] Constructors
bool propagate;
};
-void test()
+static void
+test ()
{
// [20.5.4.1] Constructors
namespace in_place {
-void test()
+static void
+test ()
{
// [20.5.5] In-place construction
{
int i;
};
-void test()
+static void
+test ()
{
gdb::optional<value_type> o { value_type { 51 } };
VERIFY( (*o).i == 51 );
void* operator&(const value_type&) = delete;
-void test()
+static void
+test ()
{
gdb::optional<value_type> o { value_type { 51 } };
VERIFY( o->i == 51 );