#ifndef TREE_TEST_H_ #define TREE_TEST_H_ #include <cppunit/extensions/HelperMacros.h> #include <compare> #include <tree> class ForwardTreeTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE ( ForwardTreeTest ); CPPUNIT_TEST ( testTreeStdStructure ); CPPUNIT_TEST_SUITE_END ( ); public: struct RankedArityChecker { bool operator ()( char symbol, unsigned wantedRank ) const { switch ( symbol ) { case 'a': return wantedRank == 2; case 'b': return wantedRank == 1; default: return wantedRank == 0; } } }; void print_tree ( std::forward_tree < char >::const_children_iterator biter, std::forward_tree < char >::const_children_iterator eiter, std::string indent ); void setUp ( ); void tearDown ( ); void testTreeStdStructure(); }; #endif // TREE_TEST_H_