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.6.0.1 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.6.0.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.6.0 lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js
sproutcore-1.6.0-java lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/flatten.js