Sha256: d652b943db511ae2d0d798106f22c4f7d08c75d6a50d444c4b507c78d6f4bd30

Contents?: true

Size: 747 Bytes

Versions: 7

Compression:

Stored size: 747 Bytes

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2009 Apple Inc. and contributors.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

module("SC.SelectionSet.copy");

test("basic copy", function() {
  var content = "1 2 3 4 5 6 7 8 9".w(),
      set     = SC.SelectionSet.create().add(content,4,4).remove(content,6),
      copy    = set.copy();
  
  equals(set.get('length'), 3, 'precond - original set should have length');
  equals(copy.get('length'), 3, 'copy should have same length');
  same(copy, set, 'copy should be the same as original set');
});

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sproutcore-1.4.0.rc.5 lib/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.4.0.rc.4 lib/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.4.0.rc.3 lib/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.4.0.rc.2 lib/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.4.0.rc lib/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1049.pre.2 lib/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1049.pre.1 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js