Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

reflect/test/unit_test.cpp File Reference

#include <iostream>
#include <vector>
#include <string>
#include <boost/test/included/unit_test_framework.hpp>
#include "../object_visitor.hpp"
#include "../jscript_object_navigator.hpp"
#include "../jscript_object_nav_errors.h"
#include "../member_visitor.hpp"
#include "root.hpp"
#include "foo.hpp"
#include "bar.hpp"

Go to the source code of this file.

Namespaces

namespace  reflect_test

Data Structures

class  reflect_test::test_simple
class  reflect_test::test_composite
class  reflect_test::test_navigation
class  reflect_test::test_dump

Defines

#define TEST_OBJ_NAME(_obj_, _path_, _name_)
#define TEST_BAD_PARSE(_obj_, _path_, _msg_, _name_)

Functions

test_suite * init_unit_test_suite (int argc, char *argv[])


Define Documentation

#define TEST_OBJ_NAME _obj_,
_path_,
_name_   ) 
 

Value:

{ \
        ph::common::object_base *o = nav.navigate(_obj_, _path_); \
        BOOST_CHECK(output.is_empty()); \
        BOOST_REQUIRE_MESSAGE(o, "could not find [" _path_ "]"); \
        std::string name; \
        BOOST_CHECK_MESSAGE(ph::common::get_visitable_obj_name(o, &name), \
                "[" _path_ "] object does not have a name."); \
        BOOST_CHECK_MESSAGE(name == _name_, \
                "[" _path_ "] was named [" + name + "] not [" _name_ "]"); \
}

Definition at line 51 of file reflect/test/unit_test.cpp.

Referenced by reflect_test::test_navigation::test(), and reflect_test::test_composite::test().

#define TEST_BAD_PARSE _obj_,
_path_,
_msg_,
_name_   ) 
 

Value:

{ \
        BOOST_CHECK(nav.navigate(_obj_, _path_) == 0); \
        BOOST_CHECK_MESSAGE(output.is_equal( \
                "Syntax Error. " _msg_ " [" _name_ "]\n"), "Syntax Error. " _msg_ " [" _name_ "]"); \
}

Definition at line 63 of file reflect/test/unit_test.cpp.

Referenced by reflect_test::test_navigation::test(), and reflect_test::test_composite::test().


Function Documentation

test_suite* init_unit_test_suite int  argc,
char *  argv[]
 

Definition at line 342 of file reflect/test/unit_test.cpp.


Generated on Wed Apr 5 22:03:29 2006 for cppxmlobj by  doxygen 1.4.3