Sha256: 71ec8324d1a793eeb0640b3a78712362f288a777ce3c49f579e5c0065407e4c4

Contents?: true

Size: 746 Bytes

Versions: 15

Compression:

Stored size: 746 Bytes

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2009 Apple Inc. and contributors.
// License:   Licened 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

15 entries across 15 versions & 1 rubygems

Version Path
sproutcore-1.0.1046 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1043 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1042 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1037 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1035 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1031 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1030 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1029 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1027 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1028 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1026 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1025 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1024 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1009 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js
sproutcore-1.0.1008 frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js