Sha256: 88d1bb8c45348ae8811c544f1dcb261b64f43ba9517ceb48b9a0d5ad859535a4

Contents?: true

Size: 864 Bytes

Versions: 24

Compression:

Stored size: 864 Bytes

Contents

// ==========================================================================
// Project:   SproutCore Costello - Property Observing Library
// Copyright: ©2006-2010 Sprout Systems, Inc. and contributors.
//            Portions ©2008-2010 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

/*globals module test ok equals same CoreTest */

sc_require('debug/test_suites/array/base');

SC.ArraySuite.define(function(T) {

  T.module("flatten");

  test("should return flattened arrays", function() {
    var expected = [1,2,3,4,'a'],
        obj      = T.newObject([1,2,[3,[4]],'a']);

    expected.forEach(function(i,idx) {
      equals(obj.flatten().objectAt(idx), i,'obj.flatten().objectAt(%@) should match %@'.fmt(idx,i));
    });
  });
});

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
sproutcore-1.11.0 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.11.0.rc3 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.11.0.rc2 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.11.0.rc1 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.10.3.1 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.10.2 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.10.1 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.10.0 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.10.0.rc.3 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.10.0.rc.2 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.10.0.rc.1 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.9.2 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.9.1 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.9.0 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.8.2.1 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.8.1 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.8.0 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.7.1.beta-java lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.7.1.beta lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.6.0.1-java lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js