// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2009 Apple Inc. and contributors. // License: Licensed under MIT license (see license.js) // ========================================================================== var set, array, array2; module("SC.SelectionSet#add", { setup: function() { set = SC.SelectionSet.create(); array = '0 1 2 3 4 5 6 7 8 9'.w(); array2 = 'a b c d e f g h i k l m'.w(); } }); /* validates that the selection set has the expected content. pass index sets with sources set appropriately. The order of the array is not important. */ function validate(set, expected, defaultSource) { var sources = set.get('sources'), len = expected.length, idx, cur, actual ; equals(sources.length, expected.length, 'should have same number of sources (actual sources: %@)'.fmt(sources)); for(idx=0;idx