From: Rafał Długołęcki Date: Sat, 2 May 2015 16:34:32 +0000 (+0200) Subject: Fix Parameter test. Separate Test class. X-Git-Tag: v0.2~32 X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=d6d77f047dd89d928f457a11d5546f7168ca9156;p=command.git Fix Parameter test. Separate Test class. --- diff --git a/tests/parameter/TestParameter.h b/tests/parameter/TestParameter.h new file mode 100644 index 0000000..9736133 --- /dev/null +++ b/tests/parameter/TestParameter.h @@ -0,0 +1,10 @@ +#include "parameter.h" + + +class TestParameter : public command::Parameter { +public: + TestParameter(std::string description) : Parameter(description) { } + + virtual void handle() { } + virtual bool understand(const std::string & argVal) { } +}; \ No newline at end of file diff --git a/tests/parameter/is_descriptive.cpp b/tests/parameter/is_descriptive.cpp index 0b9c733..dfaf603 100644 --- a/tests/parameter/is_descriptive.cpp +++ b/tests/parameter/is_descriptive.cpp @@ -1,21 +1,13 @@ #include #include -#include "parameter.h" +#include "TestParameter.h" using namespace std; using namespace command; #define STRING "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" -class TestParameter : public Parameter { -public: - TestParameter(std::string description) : Parameter(description) { } - - virtual void handle() { } - virtual bool understand(std::string argVal) { } -}; - int main() { TestParameter parameter(STRING);