Sha256: f62f29fb858a3d1ee029a0ff85a9bbd42d81167e63249196854d0a49fdae4548
Contents?: true
Size: 1.05 KB
Versions: 41
Compression:
Stored size: 1.05 KB
Contents
// ========================================================================== // Project: SproutCore Costello - Property Observing Library // Copyright: ©2006-2011 Strobe Inc. and contributors. // Portions ©2008-2011 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("indexOf"); test("should return index of object", function() { var expected = T.expected(3), obj = T.newObject(3), len = 3, idx; for(idx=0;idx<len;idx++) { equals(obj.indexOf(expected[idx]), idx, 'obj.indexOf(%@) should match idx'.fmt(expected[idx])); } }); test("should return -1 when requesting object not in index", function() { var obj = T.newObject(3), foo = {}; equals(obj.indexOf(foo), -1, 'obj.indexOf(foo) should be < 0'); }); });
Version data entries
41 entries across 41 versions & 1 rubygems