aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/test
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/test')
-rw-r--r--libbuild2/test/script/lexer.test.cxx2
-rw-r--r--libbuild2/test/script/token.cxx6
-rw-r--r--libbuild2/test/script/token.hxx2
3 files changed, 5 insertions, 5 deletions
diff --git a/libbuild2/test/script/lexer.test.cxx b/libbuild2/test/script/lexer.test.cxx
index c728d68..9c64616 100644
--- a/libbuild2/test/script/lexer.test.cxx
+++ b/libbuild2/test/script/lexer.test.cxx
@@ -56,7 +56,7 @@ namespace build2
{
// Print each token on a separate line without quoting operators.
//
- t.printer (cout, t, false);
+ t.printer (cout, t, print_mode::normal);
cout << endl;
}
}
diff --git a/libbuild2/test/script/token.cxx b/libbuild2/test/script/token.cxx
index df5493f..efeb17b 100644
--- a/libbuild2/test/script/token.cxx
+++ b/libbuild2/test/script/token.cxx
@@ -12,11 +12,11 @@ namespace build2
namespace script
{
void
- token_printer (ostream& os, const token& t, bool d)
+ token_printer (ostream& os, const token& t, print_mode m)
{
// Only quote non-name tokens for diagnostics.
//
- const char* q (d ? "'" : "");
+ const char* q (m == print_mode::diagnostics ? "'" : "");
switch (t.type)
{
@@ -27,7 +27,7 @@ namespace build2
case token_type::plus: os << q << '+' << q; break;
case token_type::minus: os << q << '-' << q; break;
- default: build2::script::token_printer (os, t, d);
+ default: build2::script::token_printer (os, t, m);
}
}
}
diff --git a/libbuild2/test/script/token.hxx b/libbuild2/test/script/token.hxx
index 5bb2319..dead796 100644
--- a/libbuild2/test/script/token.hxx
+++ b/libbuild2/test/script/token.hxx
@@ -37,7 +37,7 @@ namespace build2
};
void
- token_printer (ostream&, const token&, bool);
+ token_printer (ostream&, const token&, print_mode);
}
}
}