| [ Index ] |
PHP Cross Reference of Limb3 |
[Summary view] [Print] [Text view]
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 4 <head> 5 <title>Limb3 JS Tests</title> 6 <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 7 <script src="../lib/prototype.js" type="text/javascript"></script> 8 <script src="../lib/unittest.js" type="text/javascript"></script> 9 10 <script src="../../shared/limb.js" type="text/javascript"></script> 11 <link rel="stylesheet" href="../test.css" type="text/css" /> 12 </head> 13 <body> 14 <h1>Limb test</h1> 15 16 <!-- Log output --> 17 <div id="testlog"> </div> 18 19 <!-- Tests follow --> 20 <script type="text/javascript" language="javascript" charset="utf-8"> 21 // <![CDATA[ 22 23 new Test.Unit.Runner({ 24 tearDown: function() 25 { 26 if(MyNamespace) 27 { 28 if(MyNamespace.MySubNamespace) 29 MyNamespace.MySubNamespace = undefined; 30 31 MyNamespace = undefined; 32 } 33 }, 34 35 testCreateNamespace: function() 36 { 37 Limb.namespace('MyNamespace'); 38 this.assert(typeof(MyNamespace) == 'object', 'Namespace not created'); 39 40 Limb.namespace('MyNamespace.MySubNamespace'); 41 this.assert(typeof(MyNamespace) == 'object', 'Namespace not created'); 42 this.assert(typeof(MyNamespace.MySubNamespace) == 'object', 'Subnamespace not created'); 43 }, 44 45 testDefineVariable: function() 46 { 47 Limb.define('myVar', 5); 48 this.assertEqual(5, myVar, 'Vatiable not defined'); 49 50 Limb.namespace('MyNamespace'); 51 Limb.define('MyNamespace.myVar', 10); 52 this.assertEqual(10, MyNamespace.myVar, 'Vatiable in namespace not defined'); 53 54 Limb.define('MyNamespace.MySubNamespace.myVar', 15); 55 this.assertEqual(15, MyNamespace.MySubNamespace.myVar, 'Limb.define not created not existent namespace'); 56 } 57 }); 58 59 // ]]> 60 </script> 61 </body> 62 </html>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Sat Nov 22 03:48:54 2008 | Cross-referenced by PHPXref 0.7 |