aboutsummaryrefslogtreecommitdiff
path: root/tests/build/parser
diff options
context:
space:
mode:
Diffstat (limited to 'tests/build/parser')
-rw-r--r--tests/build/parser/buildfile2
-rw-r--r--tests/build/parser/driver.cxx10
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/build/parser/buildfile b/tests/build/parser/buildfile
index 2672a02..c924dcb 100644
--- a/tests/build/parser/buildfile
+++ b/tests/build/parser/buildfile
@@ -1,2 +1,2 @@
exe{driver}: cxx{driver ../../../build/{lexer parser scope target native \
- prerequisite context diagnostics trace utility path timestamp}}
+ prerequisite context diagnostics utility path timestamp}}
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;
}