Changeset 50

Show
Ignore:
Timestamp:
03/16/06 15:44:48 (3 years ago)
Author:
Jan-Klaas Kollhof
Message:

adding more test scripts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/test/test.js

    r47 r50  
    11Module("test", "0.0.1", function(mod){ 
    22     
    3     var moduleNames=['async','codecs','crypto','dom','forms','iter','jsonrpc','lang','operators','sets','strings','testing','urllib','xml','xmlrpc', 'net.sockets']; 
     3    var moduleNames=['testing','core','sets','iter','codecs','crypto','urllib', 'jsonrpc','xmlrpc']; 
    44 
    55    mod.log=function(){ 
  • trunk/test/test_iter.js

    r47 r50  
    6767     
    6868    mod.profile=function(){ 
    69     var iter = imprt('iter').iter; 
     69        var iter = imprt('iter').iter; 
    7070        var filter = imprt('iter').filter; 
    7171         
     
    175175     
    176176    }; 
     177    mod.__main__=function(){ 
     178        mod.test(imprt('testing'), {log:print}) 
     179    };     
    177180}); 
  • trunk/test/test_sets.js

    r47 r50  
    3333     
    3434    mod.__main__=function(){ 
    35          
     35        mod.test(imprt('testing'), {log:print}) 
    3636    }; 
    3737}); 
  • trunk/test/test_testing.js

    r47 r50  
    44         
    55        testing.assert(true); 
     6         
    67        testing.assertTrue(true); 
     8         
    79        testing.assertFalse(false); 
     10         
    811        testing.assertNull(null); 
    912        testing.assertNotNull(undefined); 
     
    1114        testing.assertNotNull({}); 
    1215        testing.assertNotNull(0); 
     16         
    1317        testing.assertUndefined(undefined); 
     18         
    1419        testing.assertNotUndefined(null); 
     20         
    1521        testing.assertNaN(NaN); 
     22         
    1623        testing.assertNotNaN(435); 
    17         testing.assertEquals(1,1); 
     24         
    1825        testing.assertEquals(1,1); 
    1926        testing.assertEquals("a","a"); 
     
    2128        testing.assertEquals(undefined,undefined); 
    2229        testing.assertEquals(mod,mod); 
     30        testing.assertEquals([1,2,3], [1,2,3]); 
     31         
     32        testing.assertNotEquals(1,2); 
     33        testing.assertNotEquals("1",1); 
     34        testing.assertNotEquals("1",1); 
     35        testing.assertNotEquals("", false); 
     36        testing.assertNotEquals(null, undefined); 
     37        testing.assertNotEquals([1,2,3], [2,3]); 
     38         
     39         
    2340        testing.assertIs(mod,mod); 
    24         testing.assertNotEquals(1,2); 
    25         testing.assertNotEquals(mod,{}); 
     41        testing.assertIs(null,null); 
     42        testing.assertIs(undefined,undefined); 
     43        testing.assertIs("ab","ab"); 
     44        testing.assertIs(123,123); 
     45        var a=b=[123]; 
     46        testing.assertIs(a,b); 
     47        var a=b={}; 
     48        testing.assertIs(a,b); 
     49         
    2650        testing.assertIsNot(null,undefined); 
    2751        testing.assertIsNot(mod,{}); 
     52        testing.assertIsNot([123],[123]); 
     53        testing.assertIsNot({},{}); 
     54         
     55    }; 
    2856     
    29     }; 
     57    mod.__main__=function(){ 
     58        mod.test(imprt('testing'), {log:print}) 
     59    };     
    3060});