[gnome-calculator] Tests for modulus with negative numbers



commit aa22b0491ed299cf835454d249aa5ed2bc38e526
Author: PioneerAxon <arth svnit gmail com>
Date:   Tue Dec 18 18:34:06 2012 +0530

    Tests for modulus with negative numbers

 src/test-equation.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/test-equation.vala b/src/test-equation.vala
index f723e41..ed1f58f 100644
--- a/src/test-equation.vala
+++ b/src/test-equation.vala
@@ -402,6 +402,11 @@ private void test_equations ()
     test ("8 mod 7", "1", 0);
     test ("â1 mod 7", "6", 0);
 
+    test ("21 mod 9", "3", 0);
+    test ("21 mod -9", "â6", 0);
+    test ("-21 mod 9", "6", 0);
+    test ("-21 mod -9", "â3", 0);
+
     test ("sgn 0", "0", 0);  
     test ("sgn 3", "1", 0);
     test ("sgn â3", "â1", 0);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]