21 #include "ExampleTest.h"
22 #include <robottestingframework/dll/Plugin.h>
23 #include <robottestingframework/TestAssert.h>
26 using namespace robottestingframework;
27 using namespace yarp::os;
32 ExampleTest::ExampleTest() : yarp::robottestingframework::TestCase(
"ExampleTest") {
35 ExampleTest::~ExampleTest() { }
37 bool ExampleTest::setup(yarp::os::Property &property) {
41 if(property.check(
"name"))
42 setName(property.find(
"name").asString());
44 string example =
property.check(
"example", Value(
"default value")).asString();
46 ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format(
"Use '%s' for the example param!",
51 void ExampleTest::tearDown() {
55 void ExampleTest::run() {
58 ROBOTTESTINGFRAMEWORK_TEST_CHECK(a<b,
"a smaller then b");
59 ROBOTTESTINGFRAMEWORK_TEST_CHECK(a>b,
"a bigger then b");
60 ROBOTTESTINGFRAMEWORK_TEST_CHECK(a==b,
"a equal to b");
This is just an example test, use it as a reference to implement new tests.