diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
commit | 1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch) | |
tree | 3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/collections/tests/_base.js | |
parent | 104d59099e048688c4dbac37d72137006e396558 (diff) | |
download | semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2 |
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/collections/tests/_base.js')
-rw-r--r-- | includes/js/dojox/collections/tests/_base.js | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/includes/js/dojox/collections/tests/_base.js b/includes/js/dojox/collections/tests/_base.js deleted file mode 100644 index f58a82c..0000000 --- a/includes/js/dojox/collections/tests/_base.js +++ /dev/null @@ -1,84 +0,0 @@ -if(!dojo._hasResource["dojox.collections.tests._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["dojox.collections.tests._base"] = true; -dojo.provide("dojox.collections.tests._base"); -dojo.require("dojox.collections"); - -tests.register("dojox.collections.tests._base", [ - function testDictionaryEntry(t){ - var d=new dojox.collections.DictionaryEntry("foo","bar"); - t.assertEqual("bar", d.valueOf()); - t.assertEqual("bar", d.toString()); - }, - - function testIterator(t){ - var itr=new dojox.collections.Iterator(["foo","bar","baz","zoo"]); - t.assertEqual("foo", itr.element); // test initialization - t.assertTrue(!itr.atEnd()); - t.assertEqual("foo", itr.get()); // make sure the first get doesn't advance. - t.assertEqual("bar", itr.get()); - t.assertEqual("baz", itr.get()); - t.assertEqual("zoo", itr.get()); - t.assertTrue(itr.atEnd()); - t.assertEqual(null, itr.get()); - - itr.reset(); - t.assertTrue(!itr.atEnd()); - t.assertEqual("foo", itr.element); - - // test map - var a=itr.map(function(elm){ - return elm+"-mapped"; - }); - itr=new dojox.collections.Iterator(a); - t.assertEqual("foo-mapped", itr.element); // test initialization - t.assertTrue(!itr.atEnd()); - t.assertEqual("foo-mapped", itr.get()); // make sure the first get doesn't advance. - t.assertEqual("bar-mapped", itr.get()); - t.assertEqual("baz-mapped", itr.get()); - t.assertEqual("zoo-mapped", itr.get()); - t.assertTrue(itr.atEnd()); - t.assertEqual(null, itr.get()); - }, - - function testDictionaryIterator(t){ - /* - in the context of any of the Dictionary-based collections, the - element would normally return a DictionaryEntry. However, since - the DictionaryIterator is really an iterator of pure objects, - we will just test with an object here. This means all property - names are lost in the translation, but...that's why there's a - DictionaryEntry object :) - */ - var itr=new dojox.collections.DictionaryIterator({ - first:"foo", second:"bar", third:"baz", fourth:"zoo" - }); - t.assertEqual("foo", itr.element); // test initialization - t.assertTrue(!itr.atEnd()); - t.assertEqual("foo", itr.get()); // make sure the first get doesn't advance. - t.assertEqual("bar", itr.get()); - t.assertEqual("baz", itr.get()); - t.assertEqual("zoo", itr.get()); - t.assertTrue(itr.atEnd()); - t.assertEqual(null, itr.get()); - - itr.reset(); - t.assertTrue(!itr.atEnd()); - t.assertEqual("foo", itr.element); - - // test map - var a=itr.map(function(elm){ - return elm+"-mapped"; - }); - itr=new dojox.collections.Iterator(a); - t.assertEqual("foo-mapped", itr.element); // test initialization - t.assertTrue(!itr.atEnd()); - t.assertEqual("foo-mapped", itr.get()); // make sure the first get doesn't advance. - t.assertEqual("bar-mapped", itr.get()); - t.assertEqual("baz-mapped", itr.get()); - t.assertEqual("zoo-mapped", itr.get()); - t.assertTrue(itr.atEnd()); - t.assertEqual(null, itr.get()); - } -]); - -} |