Author: wyoung
Date: Tue Nov 20 04:29:25 2007
New Revision: 1869
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1869&view=rev
Log:
Added a test case to test_manip.cpp for Null<std::string> Passes
without changes to the library, despite a Wishlist item that said it
shouldn't. No doubt this fix is a freebie resulting from previous
work on Null<>, SQLTypeAdapter and the manipulators.
Modified:
trunk/Wishlist
trunk/test/test_manip.cpp
Modified: trunk/Wishlist
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/Wishlist?rev=1869&r1=1868&r2=1869&view=diff
==============================================================================
--- trunk/Wishlist (original)
+++ trunk/Wishlist Tue Nov 20 04:29:25 2007
@@ -30,11 +30,6 @@
o The manipulator changes sometime during 2.3 broke the column
formatting of the examples that dump tables. A setw(x) call
results in x spaces, not x - strlen(whatevercamebefore).
-
- o Extend the manipulators to handle nullable versions of the
- types we already support. Should just be a matter of duplicating
- the existing type-specific manipulator functions, and wrapping
- the types in Null<>.
o Go back over mailing list thread to fold in any other changes
suggested for RefCountedPointer. Most especially, use
Modified: trunk/test/test_manip.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/test/test_manip.cpp?rev=1869&r1=1868&r2=1869&view=diff
==============================================================================
--- trunk/test/test_manip.cpp (original)
+++ trunk/test/test_manip.cpp Tue Nov 20 04:29:25 2007
@@ -38,6 +38,14 @@
(s.at(0) == '\'') &&
(s.at(orig_len + 1) == '\'') &&
(s.compare(1, orig_len, orig_str) == 0);
+}
+
+
+template <class T>
+static bool
+is_quoted(const std::string& s, mysqlpp::Null<T> orig_str, size_t orig_len)
+{
+ return is_quoted(s, orig_str.data, orig_len);
}
@@ -139,6 +147,7 @@
failures += test((const char*)s, len) == false;
failures += test(std::string(s), len) == false;
failures += test(mysqlpp::SQLTypeAdapter(s), len) == false;
+ failures += test(mysqlpp::Null<std::string>(s), len) == false;
return failures;
}
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits