Sha256: 54d62e07a9eee78a287cf0d9eee3ce7f3eb5cc650346f8f31d27daa687212ecd
Contents?: true
Size: 1.37 KB
Versions: 17
Compression:
Stored size: 1.37 KB
Contents
// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2009 Apple Inc. and contributors. // License: Licened under MIT license (see license.js) // ========================================================================== /*global module test equals context ok same notest */ module("SC.IndexSet#create"); test("create with no params", function() { var set = SC.IndexSet.create(); equals(set.get('length'), 0, 'should have no indexes'); }); test("create with just index", function() { var set = SC.IndexSet.create(4); equals(set.get('length'),1, 'should have 1 index'); equals(set.contains(4), YES, 'should contain index'); equals(set.contains(5), NO, 'should not contain 5'); }); test("create with index and length", function() { var set = SC.IndexSet.create(4, 2); equals(set.get('length'),2, 'should have 2 indexes'); equals(set.contains(4), YES, 'should contain 4'); equals(set.contains(5), YES, 'should contain 5'); }); test("create with other set", function() { var first = SC.IndexSet.create(4,2); var set = SC.IndexSet.create(first); equals(set.get('length'),2, 'should have same number of indexes (2)'); equals(set.contains(4), YES, 'should contain 4, just like first'); equals(set.contains(5), YES, 'should contain 5, just like first'); });
Version data entries
17 entries across 17 versions & 2 rubygems