X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Ftest_router_flexml.cpp;h=039eca55aa3519e21666ab46fe68665f765f7b9e;hb=6ed3503878603e0bae8ab0ee62bf900b3a60f2ca;hp=23d93390d839b9b9e844c74d06d06928fcdceb0c;hpb=35f51b468b01c18772b50d15a4586a15fe4f6b50;p=metaproxy-moved-to-github.git
diff --git a/src/test_router_flexml.cpp b/src/test_router_flexml.cpp
index 23d9339..039eca5 100644
--- a/src/test_router_flexml.cpp
+++ b/src/test_router_flexml.cpp
@@ -1,4 +1,4 @@
-/* $Id: test_router_flexml.cpp,v 1.4 2005-10-31 11:59:08 marc Exp $
+/* $Id: test_router_flexml.cpp,v 1.6 2005-12-08 15:34:08 adam Exp $
Copyright (c) 2005, Index Data.
%LICENSE%
@@ -22,10 +22,10 @@ public:
};
-BOOST_AUTO_TEST_CASE( test_router_flexml_1 )
+BOOST_AUTO_UNIT_TEST( test_router_flexml_1 )
{
- try{
-
+ try
+ {
std::string xmlconf = "\n"
"\n"
"\n"
@@ -46,18 +46,65 @@ BOOST_AUTO_TEST_CASE( test_router_flexml_1 )
"\n";
yp2::RouterFleXML rflexml(xmlconf);
-
-
- BOOST_CHECK (true);
-
- //BOOST_CHECK_EQUAL(filter.name(), std::string("filter1"));
-
}
catch ( ... ) {
BOOST_CHECK (false);
}
}
+BOOST_AUTO_UNIT_TEST( test_router_flexml_2 )
+{
+ bool got_xml_error = false;
+ try
+ {
+ std::string xmlconf_invalid = "\n"
+ "\n"
+ "\n"
+ "\n";
+
+ yp2::RouterFleXML rflexml(xmlconf_invalid);
+ }
+ catch ( yp2::RouterFleXML::XMLError &e) {
+ got_xml_error = true;
+ }
+ catch ( ... ) {
+ ;
+ }
+ BOOST_CHECK(got_xml_error);
+}
+
+BOOST_AUTO_UNIT_TEST( test_router_flexml_3 )
+{
+ try
+ {
+ std::string xmlconf = "\n"
+ "\n"
+ " \n"
+ " \n"
+ " \n"
+ " 210\n"
+ " \n"
+ " \n"
+ " mylog.log\n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ "\n";
+
+ yp2::RouterFleXML rflexml(xmlconf);
+ }
+ catch ( ... ) {
+ BOOST_CHECK (false);
+ }
+}
+
+
+
/*
* Local variables:
* c-basic-offset: 4