2020// ADDITIONAL_COMPILE_FLAGS: -I %{libcxx-dir}/src/experimental/include
2121
2222#include < chrono>
23+ #include < cstdio>
2324#include < fstream>
24- #include < string>
2525#include < string_view>
26+ #include < string>
2627#include < variant>
2728
2829#include " assert_macros.h"
@@ -96,7 +97,7 @@ static void test_invalid() {
9697 test_exception (" R r 0 mix" , " corrupt tzdb: expected whitespace" );
9798 test_exception (" R r 0 1" , " corrupt tzdb: expected whitespace" );
9899
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 " );
100101
101102 test_exception (" R r 0 1 -" , " corrupt tzdb: expected whitespace" );
102103
@@ -106,13 +107,17 @@ static void test_invalid() {
106107
107108 test_exception (" R r 0 1 - Ja +" , " corrupt tzdb weekday: invalid name" );
108109 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" );
110113 test_exception (" R r 0 1 - Ja last" , " corrupt tzdb weekday: invalid name" );
111114 test_exception (" R r 0 1 - Ja lastS" , " corrupt tzdb weekday: invalid name" );
112115 test_exception (" R r 0 1 - Ja S" , " corrupt tzdb weekday: invalid name" );
113116 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" );
116121 test_exception (" R r 0 1 - Ja Su>=+" , " corrupt tzdb: expected a non-zero digit" );
117122 test_exception (" R r 0 1 - Ja Su>=0" , " corrupt tzdb: expected a non-zero digit" );
118123 test_exception (" R r 0 1 - Ja Su>=32" , " corrupt tzdb day: value too large" );
0 commit comments