Skip to content

Commit b91cd2d

Browse files
committed
Fix misformatted verify tests
1 parent 6069538 commit b91cd2d

File tree

13 files changed

+109
-132
lines changed

13 files changed

+109
-132
lines changed

libcxx/test/std/containers/associative/map/map.cons/deduct.verify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ using PC = std::pair<const int, long>;
4141
int main(int, char**) {
4242
{
4343
// cannot deduce Key and T from nothing
44-
std::map
45-
m; // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}}
44+
std::map m;
45+
// expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}}
4646
}
4747
{
4848
// cannot deduce Key and T from just (Compare)
@@ -68,8 +68,8 @@ int main(int, char**) {
6868
{
6969
// cannot convert from some arbitrary unrelated type
7070
NotAnAllocator a;
71-
std::map m(
72-
a); // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}}
71+
std::map m(a);
72+
// expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}}
7373
}
7474
{
7575
// cannot deduce that the inner braced things should be std::pair and not something else

libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.verify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ using PC = std::pair<const int, long>;
4141
int main(int, char**) {
4242
{
4343
// cannot deduce Key and T from nothing
44-
std::multimap
45-
m; // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}}
44+
std::multimap m;
45+
// expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}}
4646
}
4747
{
4848
// cannot deduce Key and T from just (Compare)
@@ -68,8 +68,8 @@ int main(int, char**) {
6868
{
6969
// cannot convert from some arbitrary unrelated type
7070
NotAnAllocator a;
71-
std::multimap m(
72-
a); // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}}
71+
std::multimap m(a);
72+
// expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}}
7373
}
7474
{
7575
// cannot deduce that the inner braced things should be std::pair and not something else

libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.verify.cpp

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,48 +20,37 @@ int main(int, char**) {
2020
{
2121
// queue(Compare, Container, const Alloc);
2222
// The '45' is not an allocator
23-
std::priority_queue pri(
24-
std::greater<int>(),
25-
std::deque<int>({1, 2, 3}),
26-
45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}}
23+
std::priority_queue pri(std::greater<int>(), std::deque<int>({1, 2, 3}), 45);
24+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}}
2725
}
2826

2927
{
3028
// queue(const queue&, const Alloc&);
3129
// The '45' is not an allocator
3230
std::priority_queue<int> source;
33-
std::priority_queue pri(
34-
source,
35-
45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}}
31+
std::priority_queue pri(source, 45);
32+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}}
3633
}
3734

3835
{
3936
// priority_queue(Iter, Iter, Comp)
4037
// int is not an iterator
41-
std::priority_queue pri(
42-
15,
43-
17,
44-
std::greater<
45-
double>()); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}}
38+
std::priority_queue pri(15, 17, std::greater< double>());
39+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}}
4640
}
4741

4842
{
4943
// priority_queue(Iter, Iter, Comp, Container)
5044
// float is not an iterator
51-
std::priority_queue pri(
52-
23.f,
53-
2.f,
54-
std::greater<float>(),
55-
std::deque<
56-
float>()); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}}
45+
std::priority_queue pri(23.f, 2.f, std::greater<float>(), std::deque< float>());
46+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}}
5747
}
5848

5949
// Test the implicit deduction guides
6050
{
6151
// priority_queue (allocator &)
62-
std::priority_queue pri(
63-
(std::allocator<
64-
int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}}
52+
std::priority_queue pri((std::allocator< int>()));
53+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}}
6554
// Note: The extra parens are necessary, since otherwise clang decides it is a function declaration.
6655
// Also, we can't use {} instead of parens, because that constructs a
6756
// stack<allocator<int>, allocator<allocator<int>>>

libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.verify.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,23 @@ int main(int, char**) {
2020
{
2121
// queue(const Container&, const Alloc&);
2222
// The '45' is not an allocator
23-
std::queue que(
24-
std::list<int>{1, 2, 3},
25-
45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}queue'}}
23+
std::queue que(std::list<int>{1, 2, 3}, 45);
24+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}queue'}}
2625
}
2726

2827
{
2928
// queue(const queue&, const Alloc&);
3029
// The '45' is not an allocator
3130
std::queue<int> source;
32-
std::queue que(
33-
source,
34-
45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}queue'}}
31+
std::queue que(source, 45);
32+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}queue'}}
3533
}
3634

3735
// Test the implicit deduction guides
3836
{
3937
// queue (allocator &)
40-
std::queue que(
41-
(std::allocator<
42-
int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}queue'}}
38+
std::queue que((std::allocator< int>()));
39+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}queue'}}
4340
// Note: The extra parens are necessary, since otherwise clang decides it is a function declaration.
4441
// Also, we can't use {} instead of parens, because that constructs a
4542
// stack<allocator<int>, allocator<allocator<int>>>

libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.verify.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,23 @@ int main(int, char**) {
2525
{
2626
// stack(const Container&, const Alloc&);
2727
// The '45' is not an allocator
28-
std::stack stk(
29-
std::list<int>({1, 2, 3}),
30-
45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}stack'}}
28+
std::stack stk(std::list<int>({1, 2, 3}), 45);
29+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}stack'}}
3130
}
3231

3332
{
3433
// stack(const stack&, const Alloc&);
3534
// The '45' is not an allocator
3635
std::stack<int> source;
37-
std::stack stk(
38-
source,
39-
45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}stack'}}
36+
std::stack stk(source, 45);
37+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}stack'}}
4038
}
4139

4240
// Test the implicit deduction guides
4341
{
4442
// stack (allocator &)
45-
std::stack stk(
46-
(std::allocator<
47-
int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}stack'}}
43+
std::stack stk((std::allocator< int>()));
44+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}stack'}}
4845
// Note: The extra parens are necessary, since otherwise clang decides it is a function declaration.
4946
// Also, we can't use {} instead of parens, because that constructs a
5047
// stack<allocator<int>, allocator<allocator<int>>>

libcxx/test/std/containers/sequences/array/array.cons/deduct.verify.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@
2222

2323
int main(int, char**) {
2424
{
25-
std::array arr{
26-
1,
27-
2,
28-
3L}; // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}array'}}
25+
std::array arr{1, 2, 3L};
26+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}array'}}
2927
}
3028

3129
return 0;

libcxx/test/std/containers/sequences/deque/deque.cons/deduct.verify.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ int main(int, char**) {
2828
// Test the implicit deduction guides
2929
{
3030
// deque (allocator &)
31-
std::deque deq(
32-
(std::allocator<
33-
int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}deque'}}
31+
std::deque deq((std::allocator< int>()));
32+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}deque'}}
3433
// Note: The extra parens are necessary, since otherwise clang decides it is a function declaration.
3534
// Also, we can't use {} instead of parens, because that constructs a
3635
// deque<allocator<int>, allocator<allocator<int>>>

libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.verify.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ int main(int, char**) {
2828
// Test the implicit deduction guides
2929
{
3030
// forward_list (allocator &)
31-
std::forward_list fwl(
32-
std::allocator<
33-
int>()); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}forward_list'}}
31+
std::forward_list fwl((std::allocator< int>()));
32+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}forward_list'}}
3433
// Note: The extra parens are necessary, since otherwise clang decides it is a function declaration.
3534
// Also, we can't use {} instead of parens, because that constructs a
3635
// forward_list<allocator<int>, allocator<allocator<int>>>

libcxx/test/std/containers/sequences/list/list.cons/deduct.verify.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ int main(int, char**) {
2828
// Test the implicit deduction guides
2929
{
3030
// list (allocator &)
31-
std::list lst(
32-
(std::allocator<
33-
int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}list'}}
31+
std::list lst((std::allocator< int>()));
32+
// expected-error-re@-1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}list'}}
3433
// Note: The extra parens are necessary, since otherwise clang decides it is a function declaration.
3534
// Also, we can't use {} instead of parens, because that constructs a
3635
// deque<allocator<int>, allocator<allocator<int>>>

libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.verify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ int main(int, char**) {
6363
using P = std::pair<const int, int>;
6464
{
6565
// cannot deduce Key from nothing
66-
std::unordered_map
67-
m; // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}}
66+
std::unordered_map m;
67+
// expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}}
6868
}
6969
{
7070
// cannot deduce Key from just (Size)
71-
std::unordered_map m(
72-
42); // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}}
71+
std::unordered_map m(42);
72+
// expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}}
7373
}
7474
{
7575
// cannot deduce Key from just (Size, Hash)

0 commit comments

Comments
 (0)