~ubuntu-branches/ubuntu/trusty/enigmail/trusty-security

« back to all changes in this revision

Viewing changes to services/sync/tests/unit/test_utils_deepCopy.js

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2011-08-12 12:25:06 UTC
  • mfrom: (0.12.4 upstream)
  • Revision ID: package-import@ubuntu.com-20110812122506-zko6c7zfexvyg71q
Tags: 2:1.2.1-0ubuntu1
* New upstream release
* Drop fix_install_rdf_xml_errors.diff - fixed upstream
* Refresh port_to_latest_thunderbird.diff
* Add a proper get-orig-source target which pulls the build system from
  lp:~mozillateam/mozilla-build-system/beta, now that we don't have the old
  build-system.tar.gz from xulrunner

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Cu.import("resource://services-sync/util.js");
2
 
 
3
 
function run_test() {
4
 
  let thing = {o: {foo: "foo", bar: ["bar"]}, a: ["foo", {bar: "bar"}]};
5
 
  let ret = Utils.deepCopy(thing);
6
 
  do_check_neq(ret, thing)
7
 
  do_check_neq(ret.o, thing.o);
8
 
  do_check_neq(ret.o.bar, thing.o.bar);
9
 
  do_check_neq(ret.a, thing.a);
10
 
  do_check_neq(ret.a[1], thing.a[1]);
11
 
  do_check_eq(ret.o.foo, thing.o.foo);
12
 
  do_check_eq(ret.o.bar[0], thing.o.bar[0]);
13
 
  do_check_eq(ret.a[0], thing.a[0]);
14
 
  do_check_eq(ret.a[1].bar, thing.a[1].bar);
15
 
}