diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-01-20 17:18:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-01-20 17:18:09 +0200 |
commit | b0524a0b18eec9d5e5c3f6ce30b6cecdd02a6306 (patch) | |
tree | 4b1efc586782507e0647e884d6a13c6605298508 /tests/build/parser/driver.cxx | |
parent | 47751abc43dab40e0ac4a1523994fd533e6a3b22 (diff) |
Diagnostic infrastructure revamp
Diffstat (limited to 'tests/build/parser/driver.cxx')
-rw-r--r-- | tests/build/parser/driver.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/build/parser/driver.cxx b/tests/build/parser/driver.cxx index 8e4a60b..681db38 100644 --- a/tests/build/parser/driver.cxx +++ b/tests/build/parser/driver.cxx @@ -23,6 +23,9 @@ parse (const char*); int main () { + ostream cnull (nullptr); + diag_stream = &cnull; + target_types.insert (file::static_type); target_types.insert (exe::static_type); target_types.insert (obj::static_type); @@ -78,22 +81,19 @@ main () assert (!parse ("test/ foo/:\n{\n}")); } -ostream cnull (nullptr); - static bool parse (const char* s) { istringstream is (s); is.exceptions (istream::failbit | istream::badbit); - parser p (cnull); - //parser p (cerr); + parser p; try { p.parse (is, path (), scopes[path::current ()]); } - catch (const parser_error&) + catch (const failed&) { return false; } |