17 #include "gtest/gtest.h" 21 int resize_call_count = 0;
23 struct resizable_string {
24 void resize(
size_t) { resize_call_count += 1; }
27 int resize_default_init_call_count = 0;
29 struct resize_default_init_string {
30 void resize(
size_t) { resize_call_count += 1; }
31 void __resize_default_init(
size_t) { resize_default_init_call_count += 1; }
34 TEST(ResizeUninit, WithAndWithout) {
35 resize_call_count = 0;
36 resize_default_init_call_count = 0;
40 EXPECT_EQ(resize_call_count, 0);
41 EXPECT_EQ(resize_default_init_call_count, 0);
44 EXPECT_EQ(resize_call_count, 0);
45 EXPECT_EQ(resize_default_init_call_count, 0);
47 EXPECT_EQ(resize_call_count, 1);
48 EXPECT_EQ(resize_default_init_call_count, 0);
51 resize_call_count = 0;
52 resize_default_init_call_count = 0;
54 resize_default_init_string rus;
56 EXPECT_EQ(resize_call_count, 0);
57 EXPECT_EQ(resize_default_init_call_count, 0);
60 EXPECT_EQ(resize_call_count, 0);
61 EXPECT_EQ(resize_default_init_call_count, 0);
63 EXPECT_EQ(resize_call_count, 0);
64 EXPECT_EQ(resize_default_init_call_count, 1);
void STLStringResizeUninitialized(string_type *s, size_t new_size)
constexpr bool STLStringSupportsNontrashingResize(string_type *)
TEST(Symbolize, Unimplemented)