buffet: Provide results definition in command definition.
That allows us to provide typed results for supported commands.
BUG=chromium:435607
TEST=cros_workon_make --test buffet
Change-Id: I61b5a5b294b4d869366c821adf1ef7f6db31c7ea
Reviewed-on: https://chromium-review.googlesource.com/231322
Reviewed-by: Anton Muhin <antonm@chromium.org>
Commit-Queue: Anton Muhin <antonm@chromium.org>
Tested-by: Anton Muhin <antonm@chromium.org>
diff --git a/buffet/commands/command_definition_unittest.cc b/buffet/commands/command_definition_unittest.cc
index f0adab1..0b06086 100644
--- a/buffet/commands/command_definition_unittest.cc
+++ b/buffet/commands/command_definition_unittest.cc
@@ -8,7 +8,9 @@
TEST(CommandDefinition, Test) {
auto params = std::make_shared<buffet::ObjectSchema>();
- buffet::CommandDefinition def("powerd", params);
+ auto results = std::make_shared<buffet::ObjectSchema>();
+ buffet::CommandDefinition def("powerd", params, results);
EXPECT_EQ("powerd", def.GetCategory());
EXPECT_EQ(params, def.GetParameters());
+ EXPECT_EQ(results, def.GetResults());
}