summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/08_Types/8.6_The_Object_Type/8.6.2_Internal_Properties_and_Methods/S8.6.2_A5_T2.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/08_Types/8.6_The_Object_Type/8.6.2_Internal_Properties_and_Methods/S8.6.2_A5_T2.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/08_Types/8.6_The_Object_Type/8.6.2_Internal_Properties_and_Methods/S8.6.2_A5_T2.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/08_Types/8.6_The_Object_Type/8.6.2_Internal_Properties_and_Methods/S8.6.2_A5_T2.js b/external/contributions/Google/sputnik_conformance_modified/08_Types/8.6_The_Object_Type/8.6.2_Internal_Properties_and_Methods/S8.6.2_A5_T2.js
new file mode 100644
index 000000000..7a02b801e
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/08_Types/8.6_The_Object_Type/8.6.2_Internal_Properties_and_Methods/S8.6.2_A5_T2.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S8.6.2_A5_T2;
+* @section: 8.6.2, 13.1, 13.2;
+* @assertion: [[Call]] executes code associated with the object;
+* @description: Call function-property of object, property defined
+* as seat['move']=function(){position++};
+*/
+
+this.position=0;
+var seat = {};
+seat['move']=function(){position++};
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+seat.move();
+if (position !==1) {
+ $ERROR('#1: this.position=0; seat = {}; seat[\'move\']=function(){position++}; seat.move(); position === 1. Actual: ' + (position));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+seat['move']();
+if (position !==2) {
+ $ERROR('#2: this.position=0; seat = {}; seat[\'move\']=function(){position++}; seat.move(); seat[\'move\'](); position === 2. Actual: ' + (position));
+}
+//
+//////////////////////////////////////////////////////////////////////////////