Author: wyoung
Date: Tue Feb 12 05:54:09 2008
New Revision: 2186
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2186&view=rev
Log:
OS X work-around in test/string.cpp: test for whether float conversion
works with period as decimal separator in European locales where comma
is normally used can fail. We just trap this error and complain about
it, which isn't even seen if you're using dtest.
Modified:
trunk/test/string.cpp
Modified: trunk/test/string.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/test/string.cpp?rev=2186&r1=2185&r2=2186&view=diff
==============================================================================
--- trunk/test/string.cpp (original)
+++ trunk/test/string.cpp Tue Feb 12 05:54:09 2008
@@ -67,8 +67,15 @@
if (!test_equality(mysqlpp::String("621.200"), 621.2)) return false;
std::locale old_locale = std::locale::global(std::locale::classic());
if (!test_equality(mysqlpp::String("621.200"), 621.2)) return false;
- std::locale::global(std::locale("de_DE"));
- if (!test_equality(mysqlpp::String("621.200"), 621.2)) return false;
+ try {
+ std::locale::global(std::locale("de_DE"));
+ if (!test_equality(mysqlpp::String("621.200"), 621.2)) return
false;
+ }
+ catch (std::runtime_error& e) {
+ std::cerr << "WARNING: skipping European locale string "
+ "conversion test:" << std::endl;
+ std::cerr << "\t" << e.what() << std::endl;
+ }
std::locale::global(old_locale);
// Check that we choke on silly float-like values
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits