From 36d615dd3ab985e504ea589dfd6e45c2e6f30ba6 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 10 Oct 2009 06:23:51 +0200 Subject: [PATCH] add test case covering the string representation of commands --- .../proc/control/command-use1-test.cpp | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/components/proc/control/command-use1-test.cpp b/tests/components/proc/control/command-use1-test.cpp index 09cb23596..447309f0a 100644 --- a/tests/components/proc/control/command-use1-test.cpp +++ b/tests/components/proc/control/command-use1-test.cpp @@ -74,6 +74,7 @@ namespace test { definePrototype(); usePrototype(); preventDuplicates(); + stringRepresentation(); undef(); ASSERT (0 == command1::check_); @@ -295,6 +296,27 @@ namespace test { } + void + stringRepresentation() + { + cout << string (Command::get("test.command1.1")) << endl; + cout << string (Command::get("test.command1.2")) << endl; + cout << string (Command::get("test.command1.3")) << endl; + cout << string (Command::get("test.command1.4")) << endl; + cout << string (Command() ) << endl; + + Command com = Command::get("test.command1.4").newInstance(); + + cout << string (com) << endl; + com.bind(123); + cout << string (com) << endl; + com(); + cout << string (com) << endl; + com.undo(); + cout << string (com) << endl; + } + + void undef() {