summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/15_Native/15.5_String_Objects/15.5.2_The_String_Constructor/S15.5.2.1_A3.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/15_Native/15.5_String_Objects/15.5.2_The_String_Constructor/S15.5.2.1_A3.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/15_Native/15.5_String_Objects/15.5.2_The_String_Constructor/S15.5.2.1_A3.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/15_Native/15.5_String_Objects/15.5.2_The_String_Constructor/S15.5.2.1_A3.js b/external/contributions/Google/sputnik_conformance_modified/15_Native/15.5_String_Objects/15.5.2_The_String_Constructor/S15.5.2.1_A3.js
new file mode 100644
index 000000000..b05069eba
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/15_Native/15.5_String_Objects/15.5.2_The_String_Constructor/S15.5.2.1_A3.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.5.2.1_A3;
+* @section: 15.5.2.1;
+* @assertion: The [[Class]] property of the newly constructed object is set to "String";
+* @description: Creating string object with "new String(string)" and changing toString property to Object.prototype.toString;
+*/
+
+var __str__obj = new String("seamaid");
+
+__str__obj.toString = Object.prototype.toString;
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__str__obj.toString() !== "[object "+"String"+"]") {
+ $ERROR('#1: var __str__obj = new String("seamaid"); __str__obj.toString = Object.prototype.toString; __str__obj.toString() === "[object String]". Actual: __str__obj.toString() ==='+__str__obj.toString() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+