[Gnucash-changes] Add another test to test-numeric to show a
division overflow.
Derek Atkins
warlord at cvs.gnucash.org
Sat Jun 26 14:06:20 EDT 2004
Log Message:
-----------
Add another test to test-numeric to show a division overflow.
Modified Files:
--------------
gnucash/src/engine/test:
test-numeric.c
Revision Data
-------------
Index: test-numeric.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-numeric.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/engine/test/test-numeric.c -Lsrc/engine/test/test-numeric.c -u -r1.10 -r1.11
--- src/engine/test/test-numeric.c
+++ src/engine/test/test-numeric.c
@@ -543,6 +543,15 @@
}
}
+
+ a = gnc_numeric_create(782592055622866ULL,89025);
+ b = gnc_numeric_create(2222554708930978ULL,85568);
+ /* XXX: I'm not 100% sure that this is the value we should get, but
+ * we probably should NOT get ERROR -2 / 0 */
+ check_binary_op (gnc_numeric_create(2578135489ULL, 7617691200ULL),
+ gnc_numeric_div(a, b, GNC_DENOM_AUTO,
+ GNC_DENOM_SIGFIGS(6) | GNC_RND_ROUND),
+ a, b, "expected %s got %s = %s / %s for div round");
}
/* ======================================================= */
More information about the gnucash-changes
mailing list