summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/15_Native/15.5_String_Objects/15.5.1_The_String_Constructor_Called_as_a_Function/S15.5.1.1_A1_T7.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/15_Native/15.5_String_Objects/15.5.1_The_String_Constructor_Called_as_a_Function/S15.5.1.1_A1_T7.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/15_Native/15.5_String_Objects/15.5.1_The_String_Constructor_Called_as_a_Function/S15.5.1.1_A1_T7.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/15_Native/15.5_String_Objects/15.5.1_The_String_Constructor_Called_as_a_Function/S15.5.1.1_A1_T7.js b/external/contributions/Google/sputnik_conformance_modified/15_Native/15.5_String_Objects/15.5.1_The_String_Constructor_Called_as_a_Function/S15.5.1.1_A1_T7.js
new file mode 100644
index 000000000..8934c90ed
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/15_Native/15.5_String_Objects/15.5.1_The_String_Constructor_Called_as_a_Function/S15.5.1.1_A1_T7.js
@@ -0,0 +1,27 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.5.1.1_A1_T7;
+* @section: 15.5.1.1;
+* @assertion: When String is called as a function rather than as a constructor, it performs a type conversion;
+* @description: Call String({});
+*/
+
+var __str = String({});
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __str !== "string") {
+ $ERROR('#1: __str = String({}); typeof __str === "string". Actual: typeof __str ==='+typeof __str );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__str !== "[object "+"Object"+"]") {
+ $ERROR('#2: __str = String({}); __str === "[object Object]". Actual: __str ==='+__str );
+}
+//
+//////////////////////////////////////////////////////////////////////////////