gcalctool r2398 - trunk/gcalctool



Author: rancell
Date: Sat Feb 28 06:14:26 2009
New Revision: 2398
URL: http://svn.gnome.org/viewvc/gcalctool?rev=2398&view=rev

Log:
Added trigonometric unit tests

Modified:
   trunk/gcalctool/unittest.c

Modified: trunk/gcalctool/unittest.c
==============================================================================
--- trunk/gcalctool/unittest.c	(original)
+++ trunk/gcalctool/unittest.c	Sat Feb 28 06:14:26 2009
@@ -130,10 +130,18 @@
     test("Sin(0)", "0", 0);
     test("Sin(45) - 1/Sqrt(2)", "0", 0);
     test("Sin(20) + Sin(-20)", "0", 0);
+    test("Sin(90)", "1", 0);
+    test("Sin(180)", "0", 0);
+   
     test("Cos(0)", "1", 0);
     test("Cos(45) - 1/Sqrt(2)", "0", 0);
     test("Cos(20) - Cos(-20)", "0", 0);
+    test("Cos(90)", "0", 0);
+    test("Cos(180)", "-1", 0);
+
     test("Tan(0)", "0", 0);
+    test("Tan(10) - Sin(10)/Cos(10)", "0", 0);
+    test("Tan(90)", "", 0);
 
     test("Acos(0)", "90", 0);
     test("Acos(1)", "0", 0);



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