Author: coke
Date: Thu Jul 24 07:00:23 2008
New Revision: 29722

Modified:
   trunk/languages/tcl/lib/skipped_tests.tcl
   trunk/languages/tcl/lib/test_more.tcl

Log:
[tcl] In addition to providing a list of spec tests to skip, also provide
a list of spec tests run as TODO. This gives us a chance to actually notice
when things start working. Need to go through the current list of skips and
change those that can be run over to TODOs. Setup list.test with the new 
TODO-ability.



Modified: trunk/languages/tcl/lib/skipped_tests.tcl
==============================================================================
--- trunk/languages/tcl/lib/skipped_tests.tcl   (original)
+++ trunk/languages/tcl/lib/skipped_tests.tcl   Thu Jul 24 07:00:23 2008
@@ -1,11 +1,21 @@
 # skipped_tests - these are all the tests that the partcl implementation
-# cannot pass. Some of the tests cause harness failures (see RT#40716),
-# others simply require some functionality that we haven't implemented yet.
+# not only cannot pass, but cannot compile, or causes a parrot segfault, etc.
+#
+# todo_tests - these are the tests that are known to fail because they
+# require a feature we haven't implemented yet. 
 #
 # stored as a dictionary, with the reason as a key, and the list of tests
 # that require the feature (or cause the listed error) as values.
 
-set skipped_tests [dict create \
+set todo_tests [dict create \
+  {list to string improvements} {
+    list-1.12 list-1.13 list-1.26
+  } {parsing errors} {
+    list-1.15 list-1.16
+  }
+]
+
+set skip_tests [dict create \
   {[binary]} {
     string-5.14 string-5.15 string-5.16 string-12.21
     stringComp-5.14 stringComp-5.15 stringComp-5.16 stringComp-9.7

Modified: trunk/languages/tcl/lib/test_more.tcl
==============================================================================
--- trunk/languages/tcl/lib/test_more.tcl       (original)
+++ trunk/languages/tcl/lib/test_more.tcl       Thu Jul 24 07:00:23 2008
@@ -121,29 +121,45 @@
 
 # A placeholder that simulates the real tcltest's exported test proc.
 proc test {num description args} {
-    global skipped_tests
+    global skip_tests
+    global todo_tests
     global abort_after
-    if {![info exists skipped_tests]} {
+    if {![info exists skip_tests]} {
         # get listing of all the tests we can't run.
         source lib/skipped_tests.tcl
     }
 
     set full_desc "$num $description"
 
-    set should_skip [dict filter $skipped_tests script {K V} {
+    set should_skip [dict filter $skip_tests script {K V} {
         set val [lsearch -exact $V $num]
         expr {$val != -1}
     }]
 
-    set reason [dict keys $should_skip]
+    set skip_reason [dict keys $should_skip]
 
-    if {[string length $reason]} {
-        pass $full_desc [list SKIP $reason]
+    set should_todo [dict filter $todo_tests script {K V} {
+        set val [lsearch -exact $V $num]
+        expr {$val != -1}
+    }]
+
+    set todo_reason [dict keys $should_todo]
+
+    if {[string length $skip_reason]} {
+        pass $full_desc [list SKIP $skip_reason]
     } elseif {[llength $args] == 2} {
-        eval_is [lindex $args 0] [lindex $args 1] $full_desc
+        if {[string length $todo_reason]} {
+          eval_is [lindex $args 0] [lindex $args 1] $full_desc "TODO 
{$todo_reason}"
+       } else {
+          eval_is [lindex $args 0] [lindex $args 1] $full_desc
+       }
     } elseif {[llength $args] == 3} {
         # XXX : we're just skipping the constraint here...
-        eval_is [lindex $args 1] [lindex $args 2] $full_desc
+        if {[string length $todo_reason]} {
+          eval_is [lindex $args 1] [lindex $args 2] $full_desc "TODO 
{$todo_reason}"
+       } else {
+          eval_is [lindex $args 1] [lindex $args 2] $full_desc
+       }
     } else {
         # Skip test if too many or two few args.
         pass $full_desc [list SKIP {can't deal with this version of test yet}]

Reply via email to