Skip to content

Commit 85a4014

Browse files
committed
Disabled failing tests with new constructors in c++26 mode
1 parent 619a938 commit 85a4014

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.members/str.move.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ struct StringBuf : std::stringbuf {
5555
};
5656

5757
static void test_altered_sequence_pointers() {
58+
#if TEST_STD_VER < 26
5859
{
5960
auto src = StringBuf("hello world", std::ios_base::in);
6061
src.public_setg(4, 6, 9);
@@ -79,6 +80,7 @@ static void test_altered_sequence_pointers() {
7980
assert(dest.str().empty());
8081
assert(dest.view().empty());
8182
}
83+
#endif // TEST_STD_VER < 26
8284
}
8385

8486
int main(int, char**) {

libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.members/str.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ struct StringBuf : std::stringbuf {
2828
};
2929

3030
static void test_altered_sequence_pointers() {
31+
#if TEST_STD_VER < 26
3132
{
3233
StringBuf src("hello world", std::ios_base::in);
3334
src.public_setg(4, 6, 9);
@@ -48,6 +49,7 @@ static void test_altered_sequence_pointers() {
4849
LIBCPP_ASSERT(str == "o wor");
4950
LIBCPP_ASSERT(dest.str() == "o wor");
5051
}
52+
#endif // TEST_STD_VER < 26
5153
}
5254

5355
int main(int, char**)

libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.members/view.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ struct StringBuf : std::stringbuf {
5959
};
6060

6161
static void test_altered_sequence_pointers() {
62+
#if TEST_STD_VER < 26
6263
{
6364
auto src = StringBuf("hello world", std::ios_base::in);
6465
src.public_setg(4, 6, 9);
@@ -75,6 +76,7 @@ static void test_altered_sequence_pointers() {
7576
assert(dest.view() == dest.str());
7677
LIBCPP_ASSERT(dest.view() == "o wor");
7778
}
79+
#endif // TEST_STD_VER < 26
7880
}
7981

8082
int main(int, char**) {

libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/seekoff.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ int main(int, char**)
4545
assert(sb.pubseekoff(0, std::ios_base::cur, std::ios_base::out) == 0);
4646
assert(sb.pubseekoff(0, std::ios_base::end, std::ios_base::out) == 0);
4747
}
48+
#if TEST_STD_VER < 26
4849
{
4950
std::stringbuf sb("0123456789", std::ios_base::in);
5051
assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == -1);
@@ -78,6 +79,7 @@ int main(int, char**)
7879
assert(sb.sputc('c') == 'c');
7980
assert(sb.str() == "012a456c89");
8081
}
82+
#endif // TEST_STD_VER < 26
8183
{
8284
std::stringbuf sb("0123456789");
8385
assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3);
@@ -106,6 +108,7 @@ int main(int, char**)
106108
assert(sb.str() == "0123456c89");
107109
}
108110
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
111+
# if TEST_STD_VER < 26
109112
{
110113
std::wstringbuf sb(L"0123456789", std::ios_base::in);
111114
assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::out) == -1);
@@ -139,6 +142,7 @@ int main(int, char**)
139142
assert(sb.sputc(L'c') == L'c');
140143
assert(sb.str() == L"012a456c89");
141144
}
145+
# endif // TEST_STD_VER < 26
142146
{
143147
std::wstringbuf sb(L"0123456789");
144148
assert(sb.pubseekoff(3, std::ios_base::beg, std::ios_base::in) == 3);

libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.virtuals/seekpos.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
int main(int, char**)
2323
{
24+
#if TEST_STD_VER < 26
2425
{
2526
std::stringbuf sb("0123456789", std::ios_base::in);
2627
assert(sb.pubseekpos(3, std::ios_base::out) == -1);
@@ -36,6 +37,7 @@ int main(int, char**)
3637
assert(sb.sputc('a') == 'a');
3738
assert(sb.str() == "012a456789");
3839
}
40+
#endif // TEST_STD_VER < 26
3941
{
4042
std::stringbuf sb("0123456789");
4143
assert(sb.pubseekpos(3, std::ios_base::in) == 3);
@@ -49,6 +51,7 @@ int main(int, char**)
4951
assert(sb.str() == "0123456789");
5052
}
5153
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
54+
# if TEST_STD_VER < 26
5255
{
5356
std::wstringbuf sb(L"0123456789", std::ios_base::in);
5457
assert(sb.pubseekpos(3, std::ios_base::out) == -1);
@@ -64,6 +67,7 @@ int main(int, char**)
6467
assert(sb.sputc(L'a') == L'a');
6568
assert(sb.str() == L"012a456789");
6669
}
70+
# endif // TEST_STD_VER < 26
6771
{
6872
std::wstringbuf sb(L"0123456789");
6973
assert(sb.pubseekpos(3, std::ios_base::in) == 3);

0 commit comments

Comments
 (0)