aboutsummaryrefslogtreecommitdiff
path: root/build2/test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-16 10:35:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-16 18:15:18 +0200
commitece4003beebd23082a5fd7a324de40c5572161d1 (patch)
tree44597a24266b31e55b27b7393d2d20c729603d95 /build2/test
parentd2b324a72fdf16fcd68e6ba7ca0280aa95de4b71 (diff)
Add support for passing parameters to (meta-) operations
Diffstat (limited to 'build2/test')
-rw-r--r--build2/test/operation.cxx5
-rw-r--r--build2/test/script/lexer6
-rw-r--r--build2/test/script/lexer.cxx4
3 files changed, 9 insertions, 6 deletions
diff --git a/build2/test/operation.cxx b/build2/test/operation.cxx
index 87e3083..1f59fc1 100644
--- a/build2/test/operation.cxx
+++ b/build2/test/operation.cxx
@@ -12,8 +12,11 @@ namespace build2
namespace test
{
static operation_id
- test_pre (meta_operation_id mo)
+ test_pre (const values& params, meta_operation_id mo, const location& l)
{
+ if (!params.empty ())
+ fail (l) << "unexpected parameters for operation test";
+
// Run update as a pre-operation, unless we are disfiguring.
//
return mo != disfigure_id ? update_id : 0;
diff --git a/build2/test/script/lexer b/build2/test/script/lexer
index 207cfef..4851e13 100644
--- a/build2/test/script/lexer
+++ b/build2/test/script/lexer
@@ -49,7 +49,7 @@ namespace build2
const path& name,
lexer_mode m,
const char* escapes = nullptr)
- : base_lexer (is, name, nullptr, nullptr, false)
+ : base_lexer (is, name, nullptr, false)
{
mode (m, '\0', escapes);
}
@@ -67,10 +67,10 @@ namespace build2
void
reset_quoted (size_t q) {quoted_ = q;}
- protected:
virtual token
- next_impl () override;
+ next () override;
+ protected:
token
next_line ();
diff --git a/build2/test/script/lexer.cxx b/build2/test/script/lexer.cxx
index e060869..c7f9193 100644
--- a/build2/test/script/lexer.cxx
+++ b/build2/test/script/lexer.cxx
@@ -139,7 +139,7 @@ namespace build2
}
token lexer::
- next_impl ()
+ next ()
{
token r;
@@ -158,7 +158,7 @@ namespace build2
r = next_description ();
break;
default:
- r = base_lexer::next_impl ();
+ r = base_lexer::next ();
break;
}