Write additional parser tests, update some of the existing tests to work with throw_on_error

This commit is contained in:
ado
2023-08-04 16:48:07 +02:00
parent 5173e7afbc
commit c981ed6644
5 changed files with 316 additions and 69 deletions

View File

@@ -19,6 +19,12 @@ inline void assert_string_error_defined() {
"'string_error' needs to be enabled to use 'error_msg'");
}
template <bool ThrowOnError>
inline void assert_throw_on_error_not_defined() {
static_assert(!ThrowOnError, "cannot handle errors manually if "
"'throw_on_error' is enabled");
}
#if __unix__
inline ssize_t get_line(char** lineptr, size_t* n, FILE* stream) {
return getline(lineptr, n, stream);