From: <vac...@us...> - 2008-11-16 19:51:19
|
Revision: 91 http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=91&view=rev Author: vaclavslavik Date: 2008-11-16 19:51:16 +0000 (Sun, 16 Nov 2008) Log Message: ----------- update tests to pass with recent libxml2/libxslt (see #1748889) Modified Paths: -------------- trunk/tests/attributes/data/09.xml trunk/tests/attributes/data/10.xml trunk/tests/document/data/14.out Modified: trunk/tests/attributes/data/09.xml =================================================================== --- trunk/tests/attributes/data/09.xml 2008-11-16 01:42:02 UTC (rev 90) +++ trunk/tests/attributes/data/09.xml 2008-11-16 19:51:16 UTC (rev 91) @@ -1,2 +1,2 @@ -<!DOCTYPE root SYSTEM "data/09.dtd"> +<!DOCTYPE root SYSTEM "09.dtd"> <root one="1"/> Modified: trunk/tests/attributes/data/10.xml =================================================================== --- trunk/tests/attributes/data/10.xml 2008-11-16 01:42:02 UTC (rev 90) +++ trunk/tests/attributes/data/10.xml 2008-11-16 19:51:16 UTC (rev 91) @@ -1,3 +1,3 @@ <?xml version="1.0" ?> -<!DOCTYPE example SYSTEM "data/10.dtd"> +<!DOCTYPE example SYSTEM "10.dtd"> <example>See?</example> Modified: trunk/tests/document/data/14.out =================================================================== --- trunk/tests/document/data/14.out 2008-11-16 01:42:02 UTC (rev 90) +++ trunk/tests/document/data/14.out 2008-11-16 19:51:16 UTC (rev 91) @@ -2,6 +2,6 @@ <?xml version="1.0"?> <root xmlns:xi="http://www.w3.org/2001/XInclude"> <child> - <subchild xml:base="data/14inc.xml"><innerchild self="yes"/></subchild> + <subchild><innerchild self="yes"/></subchild> </child> </root> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vac...@us...> - 2010-04-10 08:39:22
|
Revision: 179 http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=179&view=rev Author: vaclavslavik Date: 2010-04-10 08:39:16 +0000 (Sat, 10 Apr 2010) Log Message: ----------- Test that xml::exception is thrown, not just any std::exception. Modified Paths: -------------- trunk/tests/document/test_document.cxx trunk/tests/tree/test_tree.cxx trunk/tests/xslt/test_xslt.cxx Modified: trunk/tests/document/test_document.cxx =================================================================== --- trunk/tests/document/test_document.cxx 2010-03-17 12:26:33 UTC (rev 178) +++ trunk/tests/document/test_document.cxx 2010-04-10 08:39:16 UTC (rev 179) @@ -305,19 +305,19 @@ BOOST_CHECK_THROW ( doc.push_back(xml::node("noway")), - std::exception + xml::exception ); BOOST_CHECK_THROW ( doc.insert(xml::node("noway")), - std::exception + xml::exception ); BOOST_CHECK_THROW ( doc.insert(doc.end(), xml::node("noway")), - std::exception + xml::exception ); } @@ -349,13 +349,13 @@ BOOST_CHECK_THROW ( doc.replace(n, xml::node("noway")), - std::exception + xml::exception ); BOOST_CHECK_THROW ( doc.replace(doc.begin(), xml::node(xml::node::comment(" no way "))), - std::exception + xml::exception ); } @@ -388,7 +388,7 @@ BOOST_CHECK_THROW ( doc.erase(doc.begin(), doc.end()), - std::exception + xml::exception ); } Modified: trunk/tests/tree/test_tree.cxx =================================================================== --- trunk/tests/tree/test_tree.cxx 2010-03-17 12:26:33 UTC (rev 178) +++ trunk/tests/tree/test_tree.cxx 2010-04-10 08:39:16 UTC (rev 179) @@ -108,7 +108,7 @@ BOOST_CHECK_THROW ( xml::tree_parser parser(test_file_path("tree/data/bad.xml").c_str()), - std::exception + xml::exception ); } @@ -135,7 +135,7 @@ BOOST_CHECK_THROW ( xml::tree_parser parser(XMLDATA_BAD.c_str(), XMLDATA_BAD.size()), - std::exception + xml::exception ); } @@ -203,7 +203,7 @@ BOOST_CHECK_THROW ( xml::tree_parser parser( XMLDATA_BAD_NS.c_str(), XMLDATA_BAD_NS.size()), - std::exception + xml::exception ); } Modified: trunk/tests/xslt/test_xslt.cxx =================================================================== --- trunk/tests/xslt/test_xslt.cxx 2010-03-17 12:26:33 UTC (rev 178) +++ trunk/tests/xslt/test_xslt.cxx 2010-04-10 08:39:16 UTC (rev 179) @@ -47,7 +47,7 @@ BOOST_CHECK_THROW ( xslt::stylesheet style1(test_file_path("xslt/data/01a.xsl").c_str()), - std::exception + xml::exception ); } @@ -61,7 +61,7 @@ BOOST_CHECK_THROW ( xslt::stylesheet style1(test_file_path("xslt/data/01c.xsl").c_str()), - std::exception + xml::exception ); } @@ -152,7 +152,7 @@ BOOST_CHECK_THROW ( style.apply(parser.get_document()), - std::exception + xml::exception ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tbr...@us...> - 2012-03-20 13:48:04
|
Revision: 201 http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=201&view=rev Author: tbrowder2 Date: 2012-03-20 13:47:53 +0000 (Tue, 20 Mar 2012) Log Message: ----------- add ustring tests from the glibmm project Modified Paths: -------------- trunk/tests/Makefile.am Added Paths: ----------- trunk/tests/ustring/ trunk/tests/ustring/test_ustring_compose.cc trunk/tests/ustring/test_ustring_format.cc Modified: trunk/tests/Makefile.am =================================================================== --- trunk/tests/Makefile.am 2012-03-20 13:35:13 UTC (rev 200) +++ trunk/tests/Makefile.am 2012-03-20 13:47:53 UTC (rev 201) @@ -2,9 +2,10 @@ TESTS = test AM_CPPFLAGS = -I$(top_srcdir)/include -LIBS = $(top_builddir)/src/libxmlwrapp.la \ - $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) \ - $(BOOST_IOSTREAMS_LIBS) $(BOOST_IOSTREAMS_LDFLAGS) +LIBS = $(top_builddir)/src/libxmlwrapp.la \ + $(top_builddir)/src/libustring.la \ + $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) \ + $(BOOST_IOSTREAMS_LIBS) $(BOOST_IOSTREAMS_LDFLAGS) noinst_PROGRAMS = test @@ -15,7 +16,9 @@ document/test_document.cc \ event/test_event.cc \ node/test_node.cc \ - tree/test_tree.cc + tree/test_tree.cc \ + ustring/test_ustring_compose.cc \ + ustring/test_ustring_format.cc \ if WITH_XSLT LIBS += $(top_builddir)/src/libxsltwrapp.la Added: trunk/tests/ustring/test_ustring_compose.cc =================================================================== --- trunk/tests/ustring/test_ustring_compose.cc (rev 0) +++ trunk/tests/ustring/test_ustring_compose.cc 2012-03-20 13:47:53 UTC (rev 201) @@ -0,0 +1,36 @@ +#include <glibmm.h> + +#include <iostream> + +//Use this line if you want debug output: +//std::ostream& ostr = std::cout; + +//This seems nicer and more useful than putting an ifdef around the use of ostr: +std::stringstream debug; +std::ostream& ostr = debug; + +int main(int, char**) +{ + Glib::init(); + + //TODO: Check the output? + const char *constant_string = "constant string"; + ostr << Glib::ustring::compose("Compose strings: %1", constant_string) << std::endl; + ostr << Glib::ustring::compose("Compose strings: %1 and %2", constant_string, "string_literal") << std::endl; + + ostr << Glib::ustring::compose("Compose strings: %1 and %2", 123, 123.4567) << std::endl; + + ostr << Glib::ustring::compose("Compose strings: %1 and %2", (int)123, (float)123.4567) << std::endl; + + ostr << Glib::ustring::compose("Compose strings: %1 and %2", Glib::ustring("foo"), std::string("goo")) << std::endl; + + int i = 1; + ostr << Glib::ustring::compose("Compose strings: %1 and %2", 'f', &i) << std::endl; + + ostr << Glib::ustring::compose("%1 is lower than 0x%2.", 12, Glib::ustring::format(std::hex, 16)) << std::endl; + + //TODO: More tests. + + return EXIT_SUCCESS; +} + Property changes on: trunk/tests/ustring/test_ustring_compose.cc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: trunk/tests/ustring/test_ustring_format.cc =================================================================== --- trunk/tests/ustring/test_ustring_format.cc (rev 0) +++ trunk/tests/ustring/test_ustring_format.cc 2012-03-20 13:47:53 UTC (rev 201) @@ -0,0 +1,30 @@ +#include <glibmm.h> + +#include <iostream> + +int main(int, char**) +{ + Glib::init(); + + char carr[10] = "Užduotys"; + char * const cptr = carr; + + /* + std::wostringstream wsout; + wsout << carr; + const std::wstring& wstr = wsout.str(); + const gunichar * const data = reinterpret_cast<const gunichar *>( + wstr.data()); + + for(int i = 0; wstr.size() > i; ++i) + std::cout << data[i] << std::endl; + */ + + //Check both the const char* and char* versions. + Glib::ustring::format(carr); + + //This threw an exception before we added a ustring::FormatStream::stream(char*) overload. + Glib::ustring::format(cptr); + + return EXIT_SUCCESS; +} Property changes on: trunk/tests/ustring/test_ustring_format.cc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tbr...@us...> - 2012-03-20 14:21:17
|
Revision: 208 http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=208&view=rev Author: tbrowder2 Date: 2012-03-20 14:21:06 +0000 (Tue, 20 Mar 2012) Log Message: ----------- renaming for clarity Modified Paths: -------------- trunk/tests/Makefile.am Added Paths: ----------- trunk/tests/xmlwrappstring/ Removed Paths: ------------- trunk/tests/ustring/ Modified: trunk/tests/Makefile.am =================================================================== --- trunk/tests/Makefile.am 2012-03-20 14:16:52 UTC (rev 207) +++ trunk/tests/Makefile.am 2012-03-20 14:21:06 UTC (rev 208) @@ -3,7 +3,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include LIBS = $(top_builddir)/src/libxmlwrapp.la \ - $(top_builddir)/src/libustring.la \ + $(top_builddir)/src/libxmlwrappstring.la \ $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) \ $(BOOST_IOSTREAMS_LIBS) $(BOOST_IOSTREAMS_LDFLAGS) @@ -17,8 +17,8 @@ event/test_event.cc \ node/test_node.cc \ tree/test_tree.cc \ - ustring/test_ustring_compose.cc \ - ustring/test_ustring_format.cc \ + xmlwrappstring/test_xmlwrappstring_compose.cc \ + xmlwrappstring/test_xmlwrappstring_format.cc \ if WITH_XSLT LIBS += $(top_builddir)/src/libxsltwrapp.la This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |