Mercurial > code
diff C++/Tests/Parser/TestParser.h @ 224:ca69910b1407
Parser: add tests (and fix #270)
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 09 May 2014 09:15:52 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C++/Tests/Parser/TestParser.h Fri May 09 09:15:52 2014 +0200 @@ -0,0 +1,39 @@ +/* + * TestParser.h -- test the config file parser + * + * Copyright (c) 2013, 2014 David Demelier <markand@malikania.fr> + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _TEST_PARSER_H_ +#define _TEST_PARSER_H_ + +#include <cppunit/extensions/HelperMacros.h> +#include <cppunit/TestFixture.h> + +class TestParser : public CppUnit::TestFixture { +private: + CPPUNIT_TEST_SUITE(TestParser); + CPPUNIT_TEST(simple); + CPPUNIT_TEST(multi); + CPPUNIT_TEST(multiNoredef); + CPPUNIT_TEST_SUITE_END(); + +public: + void simple(); + void multi(); + void multiNoredef(); +}; + +#endif // !_TEST_PARSER_H_ \ No newline at end of file