Date: Tuesday, January 9, 2007 @ 21:11:24
Author: marc
Path: /cvsroot/carob/carob/test/40-Parameter-PreparedStatement
Modified: TestParameterStatement.cpp (1.17 -> 1.18)
Fixed testBigDecimal to use locale.numpunct.decimal_point() instead of
hardwired & french ","
----------------------------+
TestParameterStatement.cpp | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
Index: carob/test/40-Parameter-PreparedStatement/TestParameterStatement.cpp
diff -u
carob/test/40-Parameter-PreparedStatement/TestParameterStatement.cpp:1.17
carob/test/40-Parameter-PreparedStatement/TestParameterStatement.cpp:1.18
--- carob/test/40-Parameter-PreparedStatement/TestParameterStatement.cpp:1.17
Wed Dec 20 19:38:41 2006
+++ carob/test/40-Parameter-PreparedStatement/TestParameterStatement.cpp
Tue Jan 9 21:11:24 2007
@@ -285,8 +285,6 @@
BigDecimal testVals[15];
int nbTestVals = 0;
- testVals[nbTestVals++] = BigDecimal(L"-123,456");
- testVals[nbTestVals++] = BigDecimal(L"123,456");
testVals[nbTestVals++] = BigDecimal(-123456789);
testVals[nbTestVals++] = BigDecimal(123456789);
testVals[nbTestVals++] = BigDecimal(static_cast<int64_t>(-123456789L));
@@ -299,6 +297,14 @@
testVals[nbTestVals++] = BigDecimal(numeric_limits<int64_t>::max());
testVals[nbTestVals++] = BigDecimal(static_cast<int64_t>(numeric_limits<long
long>::min()));
testVals[nbTestVals++] = BigDecimal(static_cast<int64_t>(numeric_limits<long
long>::max()));
+
+ // to ease debugging call locale methods slowly one by one & setup
intermediate variables
+ std::locale userloc(std::locale(""));
+ const std::numpunct<wchar_t>&
usernpfacet(std::use_facet<std::numpunct<wchar_t> >(userloc));
+ const wchar_t dec_point(usernpfacet.decimal_point());
+
+ testVals[nbTestVals++] = BigDecimal(std::wstring(L"-123") + dec_point +
L"456");
+ testVals[nbTestVals++] = BigDecimal(std::wstring(L"123") + dec_point +
L"456");
//TODO change testVals array size when adding new values
for (int i=0; i<nbTestVals; i++)
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits