Update of /cvsroot/openvrml/openvrml/tests
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16869/tests
Modified Files:
Makefile.am
Added Files:
node_metatype_id.cpp
Removed Files:
node_class_id.cpp
Log Message:
Changes to tests for parity with the change from node_class to node_metatype.
--- NEW FILE: node_metatype_id.cpp ---
# include <boost/test/unit_test.hpp>
# include <openvrml/browser.h>
using namespace std;
using namespace openvrml;
void construct_from_urn()
{
node_metatype_id id("urn:foo:bar");
}
void construct_from_url()
{
node_metatype_id id("http://example.com");
}
void construct_from_url_with_fragment_id()
{
node_metatype_id id("http://example.com#Foo");
}
void construct_nested_proto_id()
{
node_metatype_id id("http://example.com#Foo#Bar");
}
void construct_from_relative_url()
{
BOOST_CHECK_THROW(node_metatype_id id("../foo/bar"),
std::invalid_argument);
}
void construct_from_arbitrary_string()
{
BOOST_CHECK_THROW(node_metatype_id id("string"), std::invalid_argument);
}
boost::unit_test::test_suite * init_unit_test_suite(int, char * [])
{
using boost::unit_test::test_suite;
test_suite * const suite = BOOST_TEST_SUITE("node_metatype_id");
suite->add(BOOST_TEST_CASE(&construct_from_urn));
suite->add(BOOST_TEST_CASE(&construct_from_url));
suite->add(BOOST_TEST_CASE(&construct_from_url_with_fragment_id));
suite->add(BOOST_TEST_CASE(&construct_nested_proto_id));
suite->add(BOOST_TEST_CASE(&construct_from_relative_url));
suite->add(BOOST_TEST_CASE(&construct_from_arbitrary_string));
return suite;
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/openvrml/openvrml/tests/Makefile.am,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Makefile.am 9 Apr 2006 08:42:54 -0000 1.12
--- Makefile.am 25 Jul 2006 15:32:22 -0000 1.13
***************
*** 9,13 ****
browser \
parse_anchor \
! node_class_id \
node_interface_set
--- 9,13 ----
browser \
parse_anchor \
! node_metatype_id \
node_interface_set
***************
*** 30,35 ****
-lboost_unit_test_framework
! node_class_id_SOURCES = node_class_id.cpp
! node_class_id_LDADD = \
$(top_builddir)/src/libopenvrml/libopenvrml.la \
-lboost_unit_test_framework
--- 30,35 ----
-lboost_unit_test_framework
! node_metatype_id_SOURCES = node_metatype_id.cpp
! node_metatype_id_LDADD = \
$(top_builddir)/src/libopenvrml/libopenvrml.la \
-lboost_unit_test_framework
--- node_class_id.cpp DELETED ---
|