[Kst] kdeextragear-2/kst/tests

George Staikos staikos at kde.org
Mon Nov 22 05:49:29 CET 2004


CVS commit by staikos: 

add copyright and note about license, and add more tests


  M +13 -1     testeqparser.cpp   1.2


--- kdeextragear-2/kst/tests/testeqparser.cpp  #1.1:1.2
@@ -1,2 +1,7 @@
+/*
+ *  Copyright 2004, The University of Toronto
+ *  Licensed under GPL.
+ */
+
 #include <enodes.h>
 #include <stdio.h>
@@ -74,4 +78,12 @@ int main() {
         test("x^(1/2)*2", 2.0, 2.0*sqrt(2.0));
         test("(1/2)*x^2+3*x-5", 1.0, -1.5);
+        // Evaluated as 2^(3^(4))
+        test("2^3^4", 0.0, 2417851639229258349412352.0);
+        test("sin(x)^2", 0.5*3.14159265358979323, 1.0);
+        test("(2)^(3)", 0.0, 8);
+        test("(2*3)^(3*4)", 0.0, 2176782336.0);
+        
+
+        // Constants
 
         // Functions





More information about the Kst mailing list