1 #ifndef BLANK_TEST_IO_TOKENTEST_HPP
2 #define BLANK_TEST_IO_TOKENTEST_HPP
4 #include "io/Token.hpp"
5 #include "io/Tokenizer.hpp"
8 #include <cppunit/extensions/HelperMacros.h>
16 : public CppUnit::TestFixture {
18 CPPUNIT_TEST_SUITE(TokenTest);
20 CPPUNIT_TEST(testTypeIO);
21 CPPUNIT_TEST(testTokenIO);
22 CPPUNIT_TEST(testTokenizer);
23 CPPUNIT_TEST(testTokenizerBrokenComment);
24 CPPUNIT_TEST(testReader);
25 CPPUNIT_TEST(testReaderEmpty);
26 CPPUNIT_TEST(testReaderMalformed);
28 CPPUNIT_TEST_SUITE_END();
37 void testTokenizerBrokenComment();
40 void testReaderEmpty();
41 void testReaderMalformed();
43 static void AssertStreamOutput(
44 Token::Type, std::string expected);
45 static void AssertStreamOutput(
46 const Token &, std::string expected);
48 static void AssertHasMore(Tokenizer &);
49 static void AssertToken(
50 Token::Type expected_type, const Token &actual_token);
51 static void AssertToken(
52 Token::Type expected_type, std::string expected_value,
53 const Token &actual_token);