|
From: <tbr...@us...> - 2012-03-20 14:22:25
|
Revision: 209
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=209&view=rev
Author: tbrowder2
Date: 2012-03-20 14:22:14 +0000 (Tue, 20 Mar 2012)
Log Message:
-----------
renaming for clarity
Added Paths:
-----------
trunk/tests/xmlwrappstring/test_xmlwrappstring_compose.cc
trunk/tests/xmlwrappstring/test_xmlwrappstring_format.cc
Removed Paths:
-------------
trunk/tests/xmlwrappstring/test_ustring_compose.cc
trunk/tests/xmlwrappstring/test_ustring_format.cc
Deleted: trunk/tests/xmlwrappstring/test_ustring_compose.cc
===================================================================
--- trunk/tests/xmlwrappstring/test_ustring_compose.cc 2012-03-20 14:21:06 UTC (rev 208)
+++ trunk/tests/xmlwrappstring/test_ustring_compose.cc 2012-03-20 14:22:14 UTC (rev 209)
@@ -1,36 +0,0 @@
-#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;
-}
-
Deleted: trunk/tests/xmlwrappstring/test_ustring_format.cc
===================================================================
--- trunk/tests/xmlwrappstring/test_ustring_format.cc 2012-03-20 14:21:06 UTC (rev 208)
+++ trunk/tests/xmlwrappstring/test_ustring_format.cc 2012-03-20 14:22:14 UTC (rev 209)
@@ -1,30 +0,0 @@
-#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;
-}
Copied: trunk/tests/xmlwrappstring/test_xmlwrappstring_compose.cc (from rev 208, trunk/tests/xmlwrappstring/test_ustring_compose.cc)
===================================================================
--- trunk/tests/xmlwrappstring/test_xmlwrappstring_compose.cc (rev 0)
+++ trunk/tests/xmlwrappstring/test_xmlwrappstring_compose.cc 2012-03-20 14:22:14 UTC (rev 209)
@@ -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;
+}
+
Copied: trunk/tests/xmlwrappstring/test_xmlwrappstring_format.cc (from rev 208, trunk/tests/xmlwrappstring/test_ustring_format.cc)
===================================================================
--- trunk/tests/xmlwrappstring/test_xmlwrappstring_format.cc (rev 0)
+++ trunk/tests/xmlwrappstring/test_xmlwrappstring_format.cc 2012-03-20 14:22:14 UTC (rev 209)
@@ -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;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|