[grisbi-cvs] grisbi/src gsb_real_cunit.c,1.5,1.6
Mickaƫl Remars
mykeul at users.sourceforge.net
Wed May 20 21:03:09 CEST 2009
- Previous message: [grisbi-cvs] grisbi/po cs.po, 1.33, 1.34 da.po, 1.40, 1.41 de.po, 1.85, 1.86 el.po, 1.4, 1.5 es.po, 1.78, 1.79 fa.po, 1.27, 1.28 fr.po, 1.157, 1.158 grisbi.pot, 1.75, 1.76 he.po, 1.33, 1.34 it.po, 1.33, 1.34 nl.po, 1.32, 1.33 pl.po, 1.38, 1.39 pt_BR.po, 1.35, 1.36 ro.po, 1.33, 1.34 ru.po, 1.32, 1.33 zh_CN.po, 1.27, 1.28
- Next message: [grisbi-cvs] grisbi/src gsb_real_cunit.c,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15466/src
Modified Files:
gsb_real_cunit.c
Log Message:
Added a few more tests on gsb_real_add(), most of them fail with current version of the function
Index: gsb_real_cunit.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_real_cunit.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- gsb_real_cunit.c 19 May 2009 18:24:58 -0000 1.5
+++ gsb_real_cunit.c 20 May 2009 19:03:07 -0000 1.6
@@ -191,6 +191,46 @@
gsb_real r = gsb_real_add(a, b);
CU_ASSERT_EQUAL(41415, r.mantissa);
CU_ASSERT_EQUAL(4, r.exponent);
+
+ a.mantissa = 0x7FFFFFFE;
+ a.exponent = 0;
+ b.mantissa = 1;
+ b.exponent = 0;
+ r = gsb_real_add(a, b);
+ CU_ASSERT_EQUAL(0x7FFFFFFF, r.mantissa);
+ CU_ASSERT_EQUAL(0, r.exponent);
+
+ a.mantissa = 0x7FFFFFFF;
+ a.exponent = 0;
+ b.mantissa = 2;
+ b.exponent = 0;
+ r = gsb_real_add(a, b);
+ CU_ASSERT_EQUAL(0x80000000, r.mantissa);
+ CU_ASSERT_EQUAL(0, r.exponent);
+
+ a.mantissa = 0x80000001;
+ a.exponent = 0;
+ b.mantissa = -2;
+ b.exponent = 0;
+ r = gsb_real_add(a, b);
+ CU_ASSERT_EQUAL(0x80000000, r.mantissa);
+ CU_ASSERT_EQUAL(0, r.exponent);
+
+ a.mantissa = 0x80000000;
+ a.exponent = 0;
+ b.mantissa = 100;
+ b.exponent = 0;
+ r = gsb_real_add(a, b);
+ CU_ASSERT_EQUAL(0x80000000, r.mantissa);
+ CU_ASSERT_EQUAL(0, r.exponent);
+
+ a.mantissa = 100;
+ a.exponent = 0;
+ b.mantissa = 0x80000000;
+ b.exponent = 0;
+ r = gsb_real_add(a, b);
+ CU_ASSERT_EQUAL(0x80000000, r.mantissa);
+ CU_ASSERT_EQUAL(0, r.exponent);
}
CU_pSuite gsb_real_cunit_create_suite ( void )
- Previous message: [grisbi-cvs] grisbi/po cs.po, 1.33, 1.34 da.po, 1.40, 1.41 de.po, 1.85, 1.86 el.po, 1.4, 1.5 es.po, 1.78, 1.79 fa.po, 1.27, 1.28 fr.po, 1.157, 1.158 grisbi.pot, 1.75, 1.76 he.po, 1.33, 1.34 it.po, 1.33, 1.34 nl.po, 1.32, 1.33 pl.po, 1.38, 1.39 pt_BR.po, 1.35, 1.36 ro.po, 1.33, 1.34 ru.po, 1.32, 1.33 zh_CN.po, 1.27, 1.28
- Next message: [grisbi-cvs] grisbi/src gsb_real_cunit.c,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list