Date: Wednesday, March 22, 2006 @ 19:23:19
Author: gilles
Path: /cvsroot/carob/carob/test/30-ResultSet
Modified: TestBigDecimal.cpp (1.6 -> 1.7)
Re-enabled min int64 -1 test as bug has been fixed
--------------------+
TestBigDecimal.cpp | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
Index: carob/test/30-ResultSet/TestBigDecimal.cpp
diff -u carob/test/30-ResultSet/TestBigDecimal.cpp:1.6
carob/test/30-ResultSet/TestBigDecimal.cpp:1.7
--- carob/test/30-ResultSet/TestBigDecimal.cpp:1.6 Fri Mar 10 22:21:41 2006
+++ carob/test/30-ResultSet/TestBigDecimal.cpp Wed Mar 22 19:23:19 2006
@@ -100,6 +100,9 @@
//MIN LLONG -1
statementPtr->executeUpdate(
L"UPDATE product SET cost = -9223372036854775809 WHERE id= " +
toWString(id++));
+ //MIN LLONG +1
+ statementPtr->executeUpdate(
+ L"UPDATE product SET cost = -9223372036854775807 WHERE id= " +
toWString(id++));
}
void TestBigDecimal::testGetAsString()
@@ -290,10 +293,9 @@
logInfo(fctName, L"ConversionException catched (this is ok)" +
ce.description());
}
drsPtr->next();
-//TODO:-max_long -1 should throw an exception !!!
-/* try
+ try
{
- logInfo(fctName, L"Trying getAsInt64 on ming long long
-1="+drsPtr->getAsString(3));
+ logInfo(fctName, L"Trying getAsInt64 on min long long
-1="+drsPtr->getAsString(3));
drsPtr->getAsInt64(3);
CPPUNIT_ASSERT(false);
}
@@ -301,7 +303,10 @@
{
logInfo(fctName, L"ConversionException catched (this is ok)" +
ce.description());
}
-*/
+ drsPtr->next();
+ logInfo(fctName, toWString(numeric_limits<long long>::min()+1) + L" -
getAsInt64=" + drsPtr->getAsString(3));
+ CPPUNIT_ASSERT(drsPtr->getAsInt64(3) == numeric_limits<long long>::min()+1);
+
connectionPtr->deleteStatement(statementPtr);
}
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits