changeset 723:05e7104e1bea draft

New tests added into d2i.clj.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Tue, 12 Apr 2016 11:33:14 +0200
parents 62b69e70e618
children 4b4a67896fe3
files ChangeLog src/tests/d2i.clj
diffstat 2 files changed, 50 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Apr 11 12:39:09 2016 +0200
+++ b/ChangeLog	Tue Apr 12 11:33:14 2016 +0200
@@ -1,3 +1,8 @@
+2016-04-12  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/tests/d2i.clj:
+	New tests added into d2i.clj.
+
 2016-04-11  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/tests/d2i.clj:
--- a/src/tests/d2i.clj	Mon Apr 11 12:39:09 2016 +0200
+++ b/src/tests/d2i.clj	Tue Apr 12 11:33:14 2016 +0200
@@ -94,6 +94,51 @@
         ["testConversionForPositive2147483645ToInt()"  2147483645] ; 2^31-3
         ["testConversionForPositive2147483646ToInt()"  2147483646] ; 2^31-2
         ["testConversionForPositive2147483647ToInt()"  2147483647] ; 2^31-1
+
+        ["testConversionForNegative1ToInt()"                   -1]
+        ["testConversionForNegative2ToInt()"                   -2]
+        ["testConversionForNegative3ToInt()"                   -3]
+        ["testConversionForNegative4ToInt()"                   -4]
+        ["testConversionForNegative5ToInt()"                   -5]
+        ["testConversionForNegative6ToInt()"                   -6]
+        ["testConversionForNegative7ToInt()"                   -7]
+
+        ["testConversionForNegative125ToInt()"               -127] ; -(2^7-3)
+        ["testConversionForNegative126ToInt()"               -126] ; -(2^7-2)
+        ["testConversionForNegative127ToInt()"               -127] ; -(2^7-1)
+        ["testConversionForNegative128ToInt()"               -128] ; -(2^7)
+        ["testConversionForNegative129ToInt()"               -129] ; -(2^7+1)
+        ["testConversionForNegative130ToInt()"               -130] ; -(2^7+2)
+        ["testConversionForNegative131ToInt()"               -131] ; -(2^7+3)
+
+        ["testConversionForNegative253ToInt()"               -253] ; -(2^8-3)
+        ["testConversionForNegative254ToInt()"               -254] ; -(2^8-2)
+        ["testConversionForNegative255ToInt()"               -255] ; -(2^8-1)
+        ["testConversionForNegative256ToInt()"               -256] ; -(2^8)
+        ["testConversionForNegative257ToInt()"               -257] ; -(2^8+1)
+        ["testConversionForNegative258ToInt()"               -258] ; -(2^8+2)
+        ["testConversionForNegative259ToInt()"               -259] ; -(2^8+3)
+
+        ["testConversionForNegative32765ToInt()"           -32765] ; -(2^15-3)
+        ["testConversionForNegative32766ToInt()"           -32766] ; -(2^15-2)
+        ["testConversionForNegative32767ToInt()"           -32767] ; -(2^15-1)
+        ["testConversionForNegative32768ToInt()"           -32768] ; -(2^15)
+        ["testConversionForNegative32769ToInt()"           -32769] ; -(2^15+1)
+        ["testConversionForNegative32770ToInt()"           -32770] ; -(2^15+2)
+        ["testConversionForNegative32771ToInt()"           -32771] ; -(2^15+3)
+
+        ["testConversionForNegative65533ToInt()"           -65533] ; -(2^16-3)
+        ["testConversionForNegative65534ToInt()"           -65534] ; -(2^16-2)
+        ["testConversionForNegative65535ToInt()"           -65535] ; -(2^16-1)
+        ["testConversionForNegative65536ToInt()"           -65536] ; -(2^16)
+        ["testConversionForNegative65537ToInt()"           -65537] ; -(2^16+1)
+        ["testConversionForNegative65538ToInt()"           -65538] ; -(2^16+2)
+        ["testConversionForNegative65539ToInt()"           -65539] ; -(2^16+3)
+
+        ["testConversionForNegative2147483645ToInt()" -2147483645] ; -(2^31-3)
+        ["testConversionForNegative2147483646ToInt()" -2147483646] ; -(2^31-2)
+        ["testConversionForNegative2147483647ToInt()" -2147483647] ; -(2^31-1)
+        ["testConversionForNegative2147483648ToInt()" -2147483648] ; -(2^31)
     ])