]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Changes to test scripts to support running on symbian. (CVS 5714)
authordanielk1977 <danielk1977@noemail.net>
Wed, 17 Sep 2008 16:14:10 +0000 (16:14 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Wed, 17 Sep 2008 16:14:10 +0000 (16:14 +0000)
FossilOrigin-Name: 6ef34e9d3118965781c69011deaede1ebbb19b12

manifest
manifest.uuid
test/nan.test
test/trigger8.test

index 46bcc13dfc696b6a122f34c6758611ef1552e69b..d7699b7c1c7c47b79d980c2e07958ca2816eb871 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sa\stype\sidentifier\sto\sargument\ssz\sto\ssqlite3PageMalloc()\sin\spcache.c.\sTicket\s#3383.\s(CVS\s5713)
-D 2008-09-17T11:02:57
+C Changes\sto\stest\sscripts\sto\ssupport\srunning\son\ssymbian.\s(CVS\s5714)
+D 2008-09-17T16:14:10
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in d15a7ebfe5e057a72a49805ffb302dbb601c8329
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -442,7 +442,7 @@ F test/misc7.test 0d763f703a34521e55ab30145b747aafa0e5f794
 F test/misuse.test 30b3a458e5a70c31e74c291937b6c82204c59f33
 F test/mutex1.test dbcf556502389abcca65a80af45b80c141714ccc
 F test/mutex2.test 56f282f436596e9febdc6e0db2c507432b6724bb
-F test/nan.test 14c41572ff52dbc740b1c3303dd313a90dc6084c
+F test/nan.test e90b7fbae9cd2a08f42834c141c6dc0dc348fa2e
 F test/notnull.test 44d600f916b770def8b095a9962dbe3be5a70d82
 F test/null.test a8b09b8ed87852742343b33441a9240022108993
 F test/openv2.test f5dd6b23e4dce828eb211649b600763c42a668df
@@ -575,7 +575,7 @@ F test/trigger4.test 8e90ee98cba940cd5f96493f82e55083806ab8a0
 F test/trigger5.test 619391a3e9fc194081d22cefd830d811e7badf83
 F test/trigger6.test 0e411654f122552da6590f0b4e6f781048a4a9b9
 F test/trigger7.test 72feaf8dbc52cea84de0c3e6ce7559ff19c479af
-F test/trigger8.test 3a09275aa2214fdff56f731b1e775d8dfee4408a
+F test/trigger8.test 83d92c212f36442d26527d6f7701575905a52ae1
 F test/trigger9.test e6e8dbab673666b3c0a63f0fefcff2329fe6bba8
 F test/triggerA.test 208dbda4d2f7c918b02f8a0dfa3acd2a0fe00691
 F test/triggerB.test 56780c031b454abac2340dbb3b71ac5c56c3d7fe
@@ -637,7 +637,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P f8b759f1977915c314be874840ebf18e6bc69b57
-R 8c3fe913436cdf48666844c295a610a7
+P 94fde77b9a4efde5f7fb2a84fedaf38b0ebbac70
+R 5cb1f4f412c11fd992c399fc6668cf38
 U danielk1977
-Z 30cb1003b5d39513a1e8a125fdb27449
+Z f12860bdb96f15ad02a57af76d19c3b1
index 35f9df5fe417311ea52a3bd90e4189a024f463a1..49f28380e0e4366a6b8b7b6b1f79f9694d7d788d 100644 (file)
@@ -1 +1 @@
-94fde77b9a4efde5f7fb2a84fedaf38b0ebbac70
\ No newline at end of file
+6ef34e9d3118965781c69011deaede1ebbb19b12
\ No newline at end of file
index d5645acbcc593cf43c49891d1ed83618cf64ae6e..7740298025048c4b1504343e6f79c8d4cc50673d 100644 (file)
 # correctly generate 0.0, +Inf, and -Inf as appropriate for numbers
 # out of range.
 #
-# $Id: nan.test,v 1.3 2008/05/11 11:07:07 drh Exp $
+# $Id: nan.test,v 1.4 2008/09/17 16:14:10 danielk1977 Exp $
 #
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
-
-do_test nan-1.1 {
+do_test nan-1.1.1 {
   db eval {
     PRAGMA auto_vacuum=OFF;
     PRAGMA page_size=1024;
@@ -37,40 +36,95 @@ do_test nan-1.1 {
   sqlite3_reset $::STMT
   db eval {SELECT x, typeof(x) FROM t1}
 } {{} null}
-do_test nan-1.2 {
+if {$tcl_platform(platform) != "symbian"} {
+  do_test nan-1.1.2 {
+    sqlite3_bind_double $::STMT 1 +Inf
+    sqlite3_step $::STMT
+    sqlite3_reset $::STMT
+    db eval {SELECT x, typeof(x) FROM t1}
+  } {{} null inf real}
+  do_test nan-1.1.3 {
+    sqlite3_bind_double $::STMT 1 -Inf
+    sqlite3_step $::STMT
+    sqlite3_reset $::STMT
+    db eval {SELECT x, typeof(x) FROM t1}
+  } {{} null inf real -inf real}
+  do_test nan-1.1.4 {
+    sqlite3_bind_double $::STMT 1 -NaN
+    sqlite3_step $::STMT
+    sqlite3_reset $::STMT
+    db eval {SELECT x, typeof(x) FROM t1}
+  } {{} null inf real -inf real {} null}
+  do_test nan-1.1.5 {
+    sqlite3_bind_double $::STMT 1 NaN0
+    sqlite3_step $::STMT
+    sqlite3_reset $::STMT
+    db eval {SELECT x, typeof(x) FROM t1}
+  } {{} null inf real -inf real {} null {} null}
+  do_test nan-1.1.5 {
+    sqlite3_bind_double $::STMT 1 -NaN0
+    sqlite3_step $::STMT
+    sqlite3_reset $::STMT
+    db eval {SELECT x, typeof(x) FROM t1}
+  } {{} null inf real -inf real {} null {} null {} null}
+  do_test nan-1.1.6 {
+    db eval {
+      UPDATE t1 SET x=x-x;
+      SELECT x, typeof(x) FROM t1;
+    }
+  } {{} null {} null {} null {} null {} null {} null}
+}
+
+# The following block of tests, nan-1.2.*, are the same as the nan-1.1.*
+# tests above, except that the SELECT queries used to validate data 
+# convert floating point values to text internally before returning them
+# to Tcl. This allows the tests to be run on platforms where Tcl has
+# problems converting "inf" and "-inf" from floating point to text format.
+# It also tests the internal float->text conversion routines a bit.
+#
+do_test nan-1.2.1 {
+  db eval {
+    DELETE FROM T1;
+  }
+  sqlite3_bind_double $::STMT 1 NaN
+  sqlite3_step $::STMT
+  sqlite3_reset $::STMT
+  db eval {SELECT CAST(x AS text), typeof(x) FROM t1}
+} {{} null}
+do_test nan-1.2.2 {
   sqlite3_bind_double $::STMT 1 +Inf
   sqlite3_step $::STMT
   sqlite3_reset $::STMT
-  db eval {SELECT x, typeof(x) FROM t1}
-} {{} null inf real}
-do_test nan-1.3 {
+  db eval {SELECT CAST(x AS text), typeof(x) FROM t1}
+} {{} null Inf real}
+do_test nan-1.2.3 {
   sqlite3_bind_double $::STMT 1 -Inf
   sqlite3_step $::STMT
   sqlite3_reset $::STMT
-  db eval {SELECT x, typeof(x) FROM t1}
-} {{} null inf real -inf real}
-do_test nan-1.4 {
+  db eval {SELECT CAST(x AS text), typeof(x) FROM t1}
+} {{} null Inf real -Inf real}
+do_test nan-1.2.4 {
   sqlite3_bind_double $::STMT 1 -NaN
   sqlite3_step $::STMT
   sqlite3_reset $::STMT
-  db eval {SELECT x, typeof(x) FROM t1}
-} {{} null inf real -inf real {} null}
-do_test nan-1.5 {
+  db eval {SELECT CAST(x AS text), typeof(x) FROM t1}
+} {{} null Inf real -Inf real {} null}
+do_test nan-1.2.5 {
   sqlite3_bind_double $::STMT 1 NaN0
   sqlite3_step $::STMT
   sqlite3_reset $::STMT
-  db eval {SELECT x, typeof(x) FROM t1}
-} {{} null inf real -inf real {} null {} null}
-do_test nan-1.5 {
+  db eval {SELECT CAST(x AS text), typeof(x) FROM t1}
+} {{} null Inf real -Inf real {} null {} null}
+do_test nan-1.2.5 {
   sqlite3_bind_double $::STMT 1 -NaN0
   sqlite3_step $::STMT
   sqlite3_reset $::STMT
-  db eval {SELECT x, typeof(x) FROM t1}
-} {{} null inf real -inf real {} null {} null {} null}
-do_test nan-1.6 {
+  db eval {SELECT CAST(x AS text), typeof(x) FROM t1}
+} {{} null Inf real -Inf real {} null {} null {} null}
+do_test nan-1.2.6 {
   db eval {
     UPDATE t1 SET x=x-x;
-    SELECT x, typeof(x) FROM t1;
+    SELECT CAST(x AS text), typeof(x) FROM t1;
   }
 } {{} null {} null {} null {} null {} null {} null}
 
@@ -146,38 +200,53 @@ do_test nan-4.2 {
   db eval {SELECT x, typeof(x) FROM t1}
 } {1e+308 real}
 do_test nan-4.3 {
-  db eval {DELETE FROM t1}
-  db eval "INSERT INTO t1 VALUES([string repeat 9 309].0)"
-  db eval {SELECT x, typeof(x) FROM t1}
-} {inf real}
-do_test nan-4.4 {
   db eval {DELETE FROM t1}
   db eval "INSERT INTO t1 VALUES(-[string repeat 9 307].0)"
   db eval {SELECT x, typeof(x) FROM t1}
 } {-1e+307 real}
-do_test nan-4.5 {
+do_test nan-4.4 {
   db eval {DELETE FROM t1}
   db eval "INSERT INTO t1 VALUES(-[string repeat 9 308].0)"
   db eval {SELECT x, typeof(x) FROM t1}
 } {-1e+308 real}
-do_test nan-4.6 {
-  db eval {DELETE FROM t1}
-  db eval "INSERT INTO t1 VALUES(-[string repeat 9 309].0)"
-  db eval {SELECT x, typeof(x) FROM t1}
-} {-inf real}
-do_test nan-4.7 {
+do_test nan-4.5 {
   db eval {DELETE FROM t1}
   set big -[string repeat 0 10000][string repeat 9 308].[string repeat 0 10000]
   db eval "INSERT INTO t1 VALUES($big)"
   db eval {SELECT x, typeof(x) FROM t1}
 } {-1e+308 real}
-do_test nan-4.8 {
+do_test nan-4.6 {
   db eval {DELETE FROM t1}
   set big [string repeat 0 10000][string repeat 9 308].[string repeat 0 10000]
   db eval "INSERT INTO t1 VALUES($big)"
   db eval {SELECT x, typeof(x) FROM t1}
 } {1e+308 real}
 
+if {$tcl_platform(platform) != "symbian"} {
+  # Do not run these tests on Symbian, as the Tcl port doesn't like to
+  # convert from floating point value "-inf" to a string.
+  #
+  do_test nan-4.7 {
+    db eval {DELETE FROM t1}
+    db eval "INSERT INTO t1 VALUES([string repeat 9 309].0)"
+    db eval {SELECT x, typeof(x) FROM t1}
+  } {inf real}
+  do_test nan-4.8 {
+    db eval {DELETE FROM t1}
+    db eval "INSERT INTO t1 VALUES(-[string repeat 9 309].0)"
+    db eval {SELECT x, typeof(x) FROM t1}
+  } {-inf real}
+}
+do_test nan-4.9 {
+  db eval {DELETE FROM t1}
+  db eval "INSERT INTO t1 VALUES([string repeat 9 309].0)"
+  db eval {SELECT CAST(x AS text), typeof(x) FROM t1}
+} {Inf real}
+do_test nan-4.10 {
+  db eval {DELETE FROM t1}
+  db eval "INSERT INTO t1 VALUES(-[string repeat 9 309].0)"
+  db eval {SELECT CAST(x AS text), typeof(x) FROM t1}
+} {-Inf real}
 
 do_test nan-4.10 {
   db eval {DELETE FROM t1}
index b4215fba47c4117c857c5ddc68f5c18ba96e32e7..da292024bd0373fadad42e92526fabf2c16fdc43 100644 (file)
@@ -13,6 +13,7 @@
 # This file implements tests to make sure abusively large triggers
 # (triggers with 100s or 1000s of statements) work.
 #
+# $Id: trigger8.test,v 1.2 2008/09/17 16:14:10 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -21,14 +22,23 @@ ifcapable {!trigger} {
   return
 }
 
+# Set variable $nStatement to the number of statements to include in the
+# body of the trigger. On a workstation with virtually unlimited memory, 
+# use 10000. But on symbian, which allows each application at most a 32MB
+# heap, use 1000.
+#
+set nStatement 10000
+if {$tcl_platform(platform) == "symbian"} {
+  set nStatement 1000
+}
 
 do_test trigger8-1.1 {
   execsql {
     CREATE TABLE t1(x);
     CREATE TABLE t2(y);
   }
-  set sql "CREATE TRIGGER r10000 AFTER INSERT ON t1 BEGIN\n"
-  for {set i 0} {$i<10000} {incr i} {
+  set sql "CREATE TRIGGER r${nStatement} AFTER INSERT ON t1 BEGIN\n"
+  for {set i 0} {$i<$nStatement} {incr i} {
     append sql "  INSERT INTO t2 VALUES($i);\n"
   }
   append sql "END;"
@@ -37,6 +47,6 @@ do_test trigger8-1.1 {
     INSERT INTO t1 VALUES(5);
     SELECT count(*) FROM t2;
   }
-} {10000}
+} $nStatement
 
 finish_test