Revision: 1757
          http://svn.sourceforge.net/vexi/?rev=1757&view=rev
Author:   mkpg2
Date:     2007-03-27 00:30:24 -0700 (Tue, 27 Mar 2007)

Log Message:
-----------
Feature. Get test from suite by name.

Modified Paths:
--------------
    vunit/trunk/org.vexi.vunit/src/vexi/test/vunit.t
    vunit/trunk/org.vexi.vunit/src_dev/test_tests.t

Modified: vunit/trunk/org.vexi.vunit/src/vexi/test/vunit.t
===================================================================
--- vunit/trunk/org.vexi.vunit/src/vexi/test/vunit.t    2007-03-26 16:41:20 UTC 
(rev 1756)
+++ vunit/trunk/org.vexi.vunit/src/vexi/test/vunit.t    2007-03-27 07:30:24 UTC 
(rev 1757)
@@ -31,8 +31,16 @@
                    r.addTest(arguments[i]);
                }
          };
-         r.getTest = function(i){
-           return r._tests[i];
+         r.getTest = function(arg){
+               if(typeof(arg)=="number")
+                   return r._tests[arg];
+               else{
+                   for(var i=0; r._tests.length>i; i++){
+                       if(r._tests[i].name==arg)
+                               return r._tests[i];
+                   }
+                       return null;
+               }
          };
          r.nbtests ++= function(){
                return r._tests.length;
@@ -51,7 +59,6 @@
                        if(v.length>4 and v.substr(0,4)=="test"){
                                var name = v.substr(4,v.length-4);
                                var tcase = newTestCase(name, obj[v]);
-                               vexi.log.info("adding: " + name);
                                r.addTest(tcase);
                        }
                }
@@ -66,6 +73,7 @@
        var rootTest = newTestSuite("All Tests");
        
        // FEATURE - don't resolve unless used somehow (stop us building the 
template unnecessarily
+       //var testListener = vexi..org.vexi.vunit.listeners..text;
        var testListener = vexi..org.vexi.vunit.listeners..graphical;
        
        var executeTest = function(test){

Modified: vunit/trunk/org.vexi.vunit/src_dev/test_tests.t
===================================================================
--- vunit/trunk/org.vexi.vunit/src_dev/test_tests.t     2007-03-26 16:41:20 UTC 
(rev 1756)
+++ vunit/trunk/org.vexi.vunit/src_dev/test_tests.t     2007-03-27 07:30:24 UTC 
(rev 1757)
@@ -81,6 +81,7 @@
                          
    <ui:box>
           var vunit = vexi..vexi.test.vunit;
+          //vunit..setTestListener(vexi..org.vexi.vunit.listeners..text);
        vexi.thread = function(){
                        vunit..runTests("test tests");                          
        
                };


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to