diff options
author | David Fugate <dfugate@microsoft.com> | 2011-06-28 10:36:30 -0700 |
---|---|---|
committer | David Fugate <dfugate@microsoft.com> | 2011-06-28 10:36:30 -0700 |
commit | 0005b0b87b55ee11277e414c4063ae97b3c793e1 (patch) | |
tree | fc37bea04c3ff1cf21dff9ee02f51f2757958cd9 /external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.2_Object_Objects/15.2.1_The_Object_Constructor_Called_as_a_Function/S15.2.1.1_A1_T3.js | |
parent | 55855b285e67bc29e567c515459726cb1a110163 (diff) | |
parent | e69a5fa68f7b946e385786ab13981385b769db64 (diff) |
Merged remote changes
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.2_Object_Objects/15.2.1_The_Object_Constructor_Called_as_a_Function/S15.2.1.1_A1_T3.js')
-rw-r--r-- | external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.2_Object_Objects/15.2.1_The_Object_Constructor_Called_as_a_Function/S15.2.1.1_A1_T3.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.2_Object_Objects/15.2.1_The_Object_Constructor_Called_as_a_Function/S15.2.1.1_A1_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.2_Object_Objects/15.2.1_The_Object_Constructor_Called_as_a_Function/S15.2.1.1_A1_T3.js new file mode 100644 index 000000000..beddc9d4b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.2_Object_Objects/15.2.1_The_Object_Constructor_Called_as_a_Function/S15.2.1.1_A1_T3.js @@ -0,0 +1,34 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.2.1.1_A1_T3; +* @section: 15.2.1.1, 15.2.2.1; +* @assertion: When the Object(value) is called and the value is null, undefined or not supplied, +* create and return a new Object object if the object constructor had been called with the same arguments (15.2.2.1); +* @description: Creating Object() and checking its properties; +*/ + +var __obj = Object(); + +var n__obj = new Object(); + +if (__obj.toString() !== n__obj.toString()){ + $ERROR('#1'); +} + +if (__obj.constructor !== n__obj.constructor) { + $ERROR('#2'); +} + +if (__obj.prototype !== n__obj.prototype) { + $ERROR('#3'); +} + +if (__obj.toLocaleString() !== n__obj.toLocaleString()) { + $ERROR('#4'); +} + +if (typeof __obj !== typeof n__obj) { + $ERROR('#5'); +} |