Lines Matching refs:alloc
66 test_string_pos_alloc(S orig, typename S::size_type pos, const typename S::allocator_type& alloc, S expected) {
67 S substr(std::move(orig), pos, alloc);
71 assert(substr.get_allocator() == alloc);
78 S orig, typename S::size_type pos, const typename S::allocator_type& alloc, should_throw_exception_t) {
82 [[maybe_unused]] S substr = S(std::move(orig), pos, alloc);
90 (void)alloc;
127 S orig, typename S::size_type pos, typename S::size_type n, const typename S::allocator_type& alloc, S expected) {
128 S substr(std::move(orig), pos, n, alloc);
132 assert(substr.get_allocator() == alloc);
142 const typename S::allocator_type& alloc,
147 [[maybe_unused]] S substr = S(std::move(orig), pos, n, alloc);
156 (void)alloc;
161 constexpr void test_string(const typename S::allocator_type& alloc) {
172 test_string_pos_alloc<S>(STR(""), 0, alloc, STR(""));
173 test_string_pos_alloc<S>(STR(""), 1, alloc, should_throw_exception);
174 test_string_pos_alloc<S>(STR("Banane"), 1, alloc, STR("anane"));
175 test_string_pos_alloc<S>(STR("Banane"), 6, alloc, STR(""));
176 test_string_pos_alloc<S>(STR("Banane"), 7, alloc, should_throw_exception);
177 test_string_pos_alloc<S>(STR("long long string so no SSO"), 0, alloc, STR("long long string so no SSO"));
178 test_string_pos_alloc<S>(STR("long long string so no SSO"), 10, alloc, STR("string so no SSO"));
179 test_string_pos_alloc<S>(STR("long long string so no SSO"), 26, alloc, STR(""));
180 test_string_pos_alloc<S>(STR("long long string so no SSO"), 27, alloc, should_throw_exception);
196 test_string_pos_n_alloc<S>(STR(""), 0, 0, alloc, STR(""));
197 test_string_pos_n_alloc<S>(STR(""), 0, 1, alloc, STR(""));
198 test_string_pos_n_alloc<S>(STR(""), 1, 0, alloc, should_throw_exception);
199 test_string_pos_n_alloc<S>(STR(""), 1, 1, alloc, should_throw_exception);
200 test_string_pos_n_alloc<S>(STR("Banane"), 1, 10, alloc, STR("anane"));
201 test_string_pos_n_alloc<S>(STR("Banane"), 6, 0, alloc, STR(""));
202 test_string_pos_n_alloc<S>(STR("Banane"), 6, 5, alloc, STR(""));
203 test_string_pos_n_alloc<S>(STR("Banane"), 7, 10, alloc, should_throw_exception);
204 test_string_pos_n_alloc<S>(STR("long long string so no SSO"), 0, 10, alloc, STR("long long "));
205 test_string_pos_n_alloc<S>(STR("long long string so no SSO"), 10, 8, alloc, STR("string s"));
206 test_string_pos_n_alloc<S>(STR("long long string so no SSO"), 20, 10, alloc, STR("no SSO"));
207 test_string_pos_n_alloc<S>(STR("long long string so no SSO"), 26, 10, alloc, STR(""));
208 test_string_pos_n_alloc<S>(STR("long long string so no SSO"), 27, 10, alloc, should_throw_exception);