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/dojo/tests/_base/json.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/dojo/tests/_base/json.js')
-rw-r--r-- | includes/js/dojo/tests/_base/json.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/includes/js/dojo/tests/_base/json.js b/includes/js/dojo/tests/_base/json.js deleted file mode 100644 index 3a9a24c..0000000 --- a/includes/js/dojo/tests/_base/json.js +++ /dev/null @@ -1,37 +0,0 @@ -if(!dojo._hasResource["tests._base.json"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["tests._base.json"] = true; -dojo.provide("tests._base.json"); - -tests.register("tests._base.json", - [ - //Not testing dojo.toJson() on its own since Rhino will output the object properties in a different order. - //Still valid json, but just in a different order than the source string. - - // take a json-compatible object, convert it to a json string, then put it back into json. - function toAndFromJson(t){ - var testObj = {a:"a", b:1, c:"c", d:"d", e:{e1:"e1", e2:2}, f:[1,2,3], g:"g",h:{h1:{h2:{h3:"h3"}}}}; - - var mirrorObj = dojo.fromJson(dojo.toJson(testObj)); - t.assertEqual("a", mirrorObj.a); - t.assertEqual(1, mirrorObj.b); - t.assertEqual("c", mirrorObj.c); - t.assertEqual("d", mirrorObj.d); - t.assertEqual("e1", mirrorObj.e.e1); - t.assertEqual(2, mirrorObj.e.e2); - t.assertEqual(1, mirrorObj.f[0]); - t.assertEqual(2, mirrorObj.f[1]); - t.assertEqual(3, mirrorObj.f[2]); - t.assertEqual("g", mirrorObj.g); - t.assertEqual("h3", mirrorObj.h.h1.h2.h3); - var badJson; - try{ - badJson = dojo.fromJson("bad json"); // this should throw an exception, and not set badJson - }catch(e){ - } - t.assertEqual(undefined,badJson); - } - ] -); - - -} |