20
20
// ADDITIONAL_COMPILE_FLAGS: -I %{libcxx-dir}/src/experimental/include
21
21
22
22
#include < chrono>
23
+ #include < cstdio>
23
24
#include < fstream>
24
- #include < string>
25
25
#include < string_view>
26
+ #include < string>
26
27
#include < variant>
27
28
28
29
#include " assert_macros.h"
@@ -96,7 +97,7 @@ static void test_invalid() {
96
97
test_exception (" R r 0 mix" , " corrupt tzdb: expected whitespace" );
97
98
test_exception (" R r 0 1" , " corrupt tzdb: expected whitespace" );
98
99
99
- test_exception (" R r 0 1 X" , " corrupt tzdb: expected character '-'" );
100
+ test_exception (" R r 0 1 X" , " corrupt tzdb: expected character '-', got 'X' instead " );
100
101
101
102
test_exception (" R r 0 1 -" , " corrupt tzdb: expected whitespace" );
102
103
@@ -106,13 +107,17 @@ static void test_invalid() {
106
107
107
108
test_exception (" R r 0 1 - Ja +" , " corrupt tzdb weekday: invalid name" );
108
109
test_exception (" R r 0 1 - Ja 32" , " corrupt tzdb day: value too large" );
109
- test_exception (" R r 0 1 - Ja l" , " corrupt tzdb: expected string 'last'" );
110
+ test_exception (
111
+ " R r 0 1 - Ja l" ,
112
+ std::string{" corrupt tzdb: expected character 'a' from string 'last', got '" } + (char )EOF + " ' instead" );
110
113
test_exception (" R r 0 1 - Ja last" , " corrupt tzdb weekday: invalid name" );
111
114
test_exception (" R r 0 1 - Ja lastS" , " corrupt tzdb weekday: invalid name" );
112
115
test_exception (" R r 0 1 - Ja S" , " corrupt tzdb weekday: invalid name" );
113
116
test_exception (" R r 0 1 - Ja Su" , " corrupt tzdb on: expected '>=' or '<='" );
114
- test_exception (" R r 0 1 - Ja Su>" , " corrupt tzdb: expected character '='" );
115
- test_exception (" R r 0 1 - Ja Su<" , " corrupt tzdb: expected character '='" );
117
+ test_exception (
118
+ " R r 0 1 - Ja Su>" , std::string{" corrupt tzdb: expected character '=', got '" } + (char )EOF + " ' instead" );
119
+ test_exception (
120
+ " R r 0 1 - Ja Su<" , std::string{" corrupt tzdb: expected character '=', got '" } + (char )EOF + " ' instead" );
116
121
test_exception (" R r 0 1 - Ja Su>=+" , " corrupt tzdb: expected a non-zero digit" );
117
122
test_exception (" R r 0 1 - Ja Su>=0" , " corrupt tzdb: expected a non-zero digit" );
118
123
test_exception (" R r 0 1 - Ja Su>=32" , " corrupt tzdb day: value too large" );
0 commit comments