| 1 |
// Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: | |
| 6 |
When the [[Get]] method of O is called with property name P value of P |
| 7 |
returns |
| 8 |
es5id: 8.12.3_A3 |
| 9 |
description: Try to get P property P exist in instance |
| 10 |
---*/ |
| 11 |
|
| 12 |
var __map={shape:"cube", 5:"five", "6":"six"}; |
| 13 |
|
| 14 |
////////////////////////////////////////////////////////////////////////////// |
| 15 |
//CHECK#1 |
| 16 |
if (__map.shape !== "cube"){ |
| 17 |
throw new Test262Error('#1: var __map={shape:"cube", 5:"five", "6":"six"}; __map.shape === "cube". Actual: ' + (__map.shape)); |
| 18 |
} |
| 19 |
// |
| 20 |
////////////////////////////////////////////////////////////////////////////// |
| 21 |
|
| 22 |
////////////////////////////////////////////////////////////////////////////// |
| 23 |
//CHECK#2 |
| 24 |
if (__map["shape"] !== "cube"){ |
| 25 |
throw new Test262Error('#2: var __map={shape:"cube", 5:"five", "6":"six"}; __map["shape"] === "cube". Actual: ' + (__map["shape"])); |
| 26 |
} |
| 27 |
// |
| 28 |
////////////////////////////////////////////////////////////////////////////// |
| 29 |
|
| 30 |
////////////////////////////////////////////////////////////////////////////// |
| 31 |
//CHECK#3 |
| 32 |
if (__map["5"] !== "five"){ |
| 33 |
throw new Test262Error('#3: var __map={shape:"cube", 5:"five", "6":"six"}; __map["5"] === "five". Actual: ' + (__map["5"])); |
| 34 |
} |
| 35 |
// |
| 36 |
////////////////////////////////////////////////////////////////////////////// |
| 37 |
|
| 38 |
////////////////////////////////////////////////////////////////////////////// |
| 39 |
//CHECK#4 |
| 40 |
if (__map[5] !== "five"){ |
| 41 |
throw new Test262Error('#4: var __map={shape:"cube", 5:"five", "6":"six"}; __map[5] === "five". Actual: ' + (__map[5])); |
| 42 |
} |
| 43 |
// |
| 44 |
////////////////////////////////////////////////////////////////////////////// |
| 45 |
|
| 46 |
////////////////////////////////////////////////////////////////////////////// |
| 47 |
//CHECK#5 |
| 48 |
if (__map["6"] !== "six"){ |
| 49 |
throw new Test262Error('#5: var __map={shape:"cube", 5:"five", "6":"six"}; __map["6"] === "six". Actual: ' + (__map["6"])); |
| 50 |
} |
| 51 |
// |
| 52 |
////////////////////////////////////////////////////////////////////////////// |
| 53 |
|
| 54 |
////////////////////////////////////////////////////////////////////////////// |
| 55 |
//CHECK#6 |
| 56 |
if (__map[6] !== "six"){ |
| 57 |
throw new Test262Error('#6: var __map={shape:"cube", 5:"five", "6":"six"}; __map[6] === "six". Actual: ' + (__map[6])); |
| 58 |
} |
| 59 |
// |
| 60 |
////////////////////////////////////////////////////////////////////////////// |
| 61 |
|
| 62 |
reportCompare(0, 0); |