Skip to content

Commit ab20dbd

Browse files
authored
Begin removing EDG workaround from ranges::to tests (#4944)
1 parent e34645f commit ab20dbd

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

tests/std/tests/P1206R7_ranges_to_mappish/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ struct mappish_instantiator {
156156
assert(c5.get_allocator().state == 13);
157157
assert(ranges::is_permutation(c5, expected, any_pair_eq));
158158
}
159-
#ifndef __EDG__ // TRANSITION, VSO-2208356
159+
#if defined(_MSVC_INTERNAL_TESTING) || !defined(__EDG__) // TRANSITION, VS 17.12p3
160160
{
161161
std::same_as<T> auto c6 = R{some_pairs} | ranges::to<T>(Alloc{13});
162162
assert(c6.get_allocator().state == 13);
163163
assert(ranges::is_permutation(c6, expected, any_pair_eq));
164164
}
165-
#endif // ^^^ no workaround ^^^
165+
#endif
166166
{
167167
std::same_as<T> auto c7 = R{some_pairs} | ranges::to<C>(Alloc{13});
168168
assert(c7.get_allocator().state == 13);

tests/std/tests/P1206R7_ranges_to_misc/test.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ struct reservable {
5454
};
5555

5656
constexpr bool test_reservable() {
57-
#ifndef __EDG__ // TRANSITION, VSO-2208356
57+
#if defined(_MSVC_INTERNAL_TESTING) || !defined(__EDG__) // TRANSITION, VS 17.12p3
5858
int some_ints[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
5959
{
6060
std::same_as<reservable> auto r = some_ints | ranges::to<reservable>(secret_key);
6161
assert(r.size_ == ranges::size(some_ints));
6262
assert(r.cap_ == ranges::size(some_ints));
6363
assert(r.reserved_ == ranges::size(some_ints));
6464
}
65-
#endif // ^^^ no workaround ^^^
65+
#endif
6666

6767
return true;
6868
}
@@ -93,14 +93,14 @@ constexpr bool test_common_constructible() {
9393
assert(c0.last_ == ranges::end(some_ints));
9494
assert(c0.args_ == 3);
9595
}
96-
#ifndef __EDG__ // TRANSITION, VSO-2208356
96+
#if defined(_MSVC_INTERNAL_TESTING) || !defined(__EDG__) // TRANSITION, VS 17.12p3
9797
{
9898
std::same_as<common_constructible> auto c1 = some_ints | ranges::to<common_constructible>(secret_key);
9999
assert(c1.first_ == ranges::begin(some_ints));
100100
assert(c1.last_ == ranges::end(some_ints));
101101
assert(c1.args_ == 3);
102102
}
103-
#endif // ^^^ no workaround ^^^
103+
#endif
104104

105105
// Verify that more than one argument can be passed after the range:
106106
{
@@ -109,14 +109,14 @@ constexpr bool test_common_constructible() {
109109
assert(c2.last_ == ranges::end(some_ints));
110110
assert(c2.args_ == 4);
111111
}
112-
#ifndef __EDG__ // TRANSITION, VSO-2208356
112+
#if defined(_MSVC_INTERNAL_TESTING) || !defined(__EDG__) // TRANSITION, VS 17.12p3
113113
{
114114
std::same_as<common_constructible> auto c3 = some_ints | ranges::to<common_constructible>(secret_key, 3.14);
115115
assert(c3.first_ == ranges::begin(some_ints));
116116
assert(c3.last_ == ranges::end(some_ints));
117117
assert(c3.args_ == 4);
118118
}
119-
#endif // ^^^ no workaround ^^^
119+
#endif
120120

121121
return true;
122122
}
@@ -302,7 +302,7 @@ constexpr void test_lwg4016_per_kind() {
302302
std::same_as<V> auto vec = std::views::iota(0, 42) | ranges::to<V>();
303303
assert(ranges::equal(vec, std::views::iota(0, 42)));
304304
}
305-
#ifndef __EDG__ // TRANSITION, VSO-2208356
305+
#if defined(_MSVC_INTERNAL_TESTING) || !defined(__EDG__) // TRANSITION, VS 17.12p3
306306
{
307307
std::same_as<V> auto vec = std::views::iota(0, 42) | ranges::to<V>(std::allocator<int>{});
308308
assert(ranges::equal(vec, std::views::iota(0, 42)));
@@ -315,7 +315,7 @@ constexpr void test_lwg4016_per_kind() {
315315
std::same_as<V> auto vec = std::views::empty<int> | ranges::to<V>(std::size_t{42}, std::allocator<int>{});
316316
assert(ranges::equal(vec, std::views::repeat(0, 42)));
317317
}
318-
#endif // ^^^ no workaround ^^^
318+
#endif
319319
{
320320
std::same_as<V> auto vec = ranges::to<V>(std::views::iota(0, 42), std::initializer_list<int>{-3, -2, -1});
321321
assert(ranges::equal(vec, std::views::iota(-3, 42)));

tests/std/tests/P1206R7_ranges_to_sequence/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ struct sequence_instantiator {
145145
assert(c5.get_allocator().state == 13);
146146
assert(ranges::equal(c5, meow));
147147
}
148-
#ifndef __EDG__ // TRANSITION, VSO-2208356
148+
#if defined(_MSVC_INTERNAL_TESTING) || !defined(__EDG__) // TRANSITION, VS 17.12p3
149149
{
150150
std::same_as<T> auto c6 = R{meow} | ranges::to<T>(Alloc{13});
151151
assert(c6.get_allocator().state == 13);
152152
assert(ranges::equal(c6, meow));
153153
}
154-
#endif // ^^^ no workaround ^^^
154+
#endif
155155
{
156156
std::same_as<T> auto c7 = R{meow} | ranges::to<C>(Alloc{13});
157157
assert(c7.get_allocator().state == 13);

tests/std/tests/P1206R7_ranges_to_settish/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ struct settish_instantiator {
150150
assert(c5.get_allocator().state == 13);
151151
assert(ranges::is_permutation(c5, expected));
152152
}
153-
#ifndef __EDG__ // TRANSITION, VSO-2208356
153+
#if defined(_MSVC_INTERNAL_TESTING) || !defined(__EDG__) // TRANSITION, VS 17.12p3
154154
{
155155
std::same_as<T> auto c6 = R{some_ints} | ranges::to<T>(Alloc{13});
156156
assert(c6.get_allocator().state == 13);
157157
assert(ranges::is_permutation(c6, expected));
158158
}
159-
#endif // ^^^ no workaround ^^^
159+
#endif
160160
{
161161
std::same_as<T> auto c7 = R{some_ints} | ranges::to<C>(Alloc{13});
162162
assert(c7.get_allocator().state == 13);

0 commit comments

Comments
 (0)