aboutsummaryrefslogtreecommitdiffstats
path: root/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T6.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T6.js')
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T6.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T6.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T6.js
new file mode 100644
index 000000000..c61a0aa65
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.5_String_Objects/15.5.4_Properties_of_the_String_Prototype_Object/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T6.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.5.4.8_A1_T6;
+* @section: 15.5.4.8;
+* @assertion: String.prototype.lastIndexOf(searchString, position);
+* @description: Call lastIndexOf(searchString, position) function with x argument of new String object, where x is undefined variable;
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+//since ToString(undefined) evaluates to "" lastIndexOf(undefined) evaluates to lastIndexOf("",0)
+if (new String("undefined").lastIndexOf(x) !== 0) {
+ $ERROR('#1: var x; new String("undefined").lastIndexOf(x) === 0. Actual: '+new String("undefined").lastIndexOf(x) );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+var x;