Skip to content

Commit e960e8e

Browse files
committed
Fix CI
1 parent b940dcb commit e960e8e

File tree

2 files changed

+32
-36
lines changed

2 files changed

+32
-36
lines changed

libcxx/test/std/input.output/span.streams/ispanstream/inherited.stream.ops.pass.cpp

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
#include "../helper_macros.h"
2929
#include "../helper_types.h"
3030

31-
#include <print> // REMOVE ME
32-
#include <iostream> // REMOVE ME
33-
3431
template <typename CharT, typename TraitsT>
3532
void test_ispanstream(std::basic_ispanstream<CharT, TraitsT>& spSt, std::size_t size) {
3633
assert(spSt);
@@ -80,42 +77,41 @@ void test() {
8077
constexpr std::basic_string_view<CharT, TraitsT> sv{SV("zmt 94 hkt 82 pir 43vr")};
8178
assert(sv.size() < 30UZ);
8279

83-
// Create a std::span test value
84-
CharT arr[30UZ]{};
85-
initialize_array_from_string_view(arr, sv);
86-
87-
std::span<CharT> sp{arr};
88-
89-
// Create a "Read Only Sequence" test value
90-
CharT rosArr[30UZ]{};
91-
initialize_array_from_string_view(rosArr, sv);
92-
93-
ReadOnlySpan<CharT, 30UZ> ros{rosArr};
94-
assert(ros.size() == 30UZ);
95-
96-
// std::span` + Mode: default (`in`)
97-
{
98-
SpStream spSt(sp);
99-
test_ispanstream(spSt, 30UZ);
100-
}
101-
// std::span` + Mode: explicit `in`
102-
{
103-
SpStream spSt(sp, std::ios_base::in);
104-
test_ispanstream(spSt, 30UZ);
105-
}
106-
107-
// `ReadOnlySpan` + Mode: default (`in`)
10880
{
109-
SpStream spSt(ros);
110-
test_ispanstream(spSt, 30UZ);
81+
// Create a std::span test value
82+
CharT arr[30UZ]{};
83+
initialize_array_from_string_view(arr, sv);
84+
85+
std::span<CharT> sp{arr};
86+
87+
// std::span` + Mode: default (`in`)
88+
{
89+
SpStream spSt(sp);
90+
test_ispanstream(spSt, 30UZ);
91+
}
92+
// std::span` + Mode: explicit `in`
93+
{
94+
SpStream spSt(sp, std::ios_base::in);
95+
test_ispanstream(spSt, 30UZ);
96+
}
11197
}
11298

11399
{
114-
SpStream spSt(sp, std::ios_base::ate);
115-
std::println(stderr, "spSt.span().size() = {}", spSt.span().size());
116-
// std::println(stderr, "spSt.tellg() = {}", spSt.tellg());
117-
std::cerr << "spSt.tellg() = " << spSt.tellg() << std::endl;
118-
assert(false);
100+
// Create a "Read Only Sequence" test value
101+
CharT arr[30UZ]{};
102+
initialize_array_from_string_view(arr, sv);
103+
104+
ReadOnlySpan<CharT, 30UZ> ros{arr};
105+
assert(ros.size() == 30UZ);
106+
107+
{
108+
SpStream spSt(ros);
109+
test_ispanstream(spSt, 30UZ);
110+
}
111+
{
112+
SpStream spSt(std::move(ros));
113+
test_ispanstream(spSt, 30UZ);
114+
}
119115
}
120116
}
121117

libcxx/test/std/input.output/span.streams/spanbuf/spanbuf.assign/assign.move.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ void test() {
291291
}
292292
// Mode: `ate`
293293
{
294-
SpBuf rhsSpBuf{sp, std::ios_base : out | std::ios_base::ate};
294+
SpBuf rhsSpBuf{sp, std::ios_base::out | std::ios_base::ate};
295295
assert(rhsSpBuf.span().data() == arr);
296296
assert(rhsSpBuf.span().size() == 4);
297297

0 commit comments

Comments
 (0)