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_T4.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_T4.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_T4.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_T4.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_T4.js
new file mode 100644
index 000000000..dcd19b500
--- /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_T4.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_T4;
+* @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(undefined);
+*/
+
+var __str = String(undefined);
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __str !== "string") {
+ $ERROR('#1: __str = String(undefined); typeof __str === "string". Actual: typeof __str ==='+typeof __str );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__str !== "undefined") {
+ $ERROR('#2: __str = String(undefined); __str === "undefined". Actual: __str ==='+__str );
+}
+//
+//////////////////////////////////////////////////////////////////////////////