Sha256: 473abde5a8b3ff7ffb4b843dd2fec485e49bb8893aad3777dd9cca76040efc22
Contents?: true
Size: 1.21 KB
Versions: 5
Compression:
Stored size: 1.21 KB
Contents
// ======================================================================== // SC.isEqual Tests // ======================================================================== /*globals module test */ module("isEqual"); test("undefined and null", function() { ok( SC.isEqual(undefined, undefined), "undefined is equal to undefined" ); ok( !SC.isEqual(undefined, null), "undefined is not equal to null" ); ok( SC.isEqual(null, null), "null is equal to null" ); ok( !SC.isEqual(null, undefined), "null is not equal to undefined" ); }) test("strings should be equal",function(){ ok( !SC.isEqual("Hello", "Hi"), "different Strings are unequal" ); ok( SC.isEqual("Hello", "Hello"), "same Strings are equal" ); }); test("numericals should be equal",function(){ ok( SC.isEqual(24, 24), "same numbers are equal" ); ok( !SC.isEqual(24, 21), "different numbers are inequal" ); }); test("array should be equal",function(){ // NOTE: We don't test for array contents -- that would be too expensive. ok( !SC.isEqual( [1,2], [1,2] ), 'two array instances with the same values should not be equal' ); ok( !SC.isEqual( [1,2], [1] ), 'two array instances with different values should not be equal' ); });
Version data entries
5 entries across 5 versions & 2 rubygems