mirror of
https://github.com/tc39/test262.git
synced 2025-07-29 17:04:31 +02:00
Fix false negative in for-in test
As originally written, this test would spuriously pass when the deleted property was incorrectly visited by enumation but correctly removed from the object. In such cases, the accumulator string would take the form "aa1baundefinedca3" And satisfy all conditions intended to highlight implementation errors. Refactor the test to avoid false negative by using an object with a null prototype and verifying the exact contents of the accumulator string.
This commit is contained in:
parent
3c88e9b619
commit
384a4e1368
@ -28,10 +28,14 @@ for (var __key in __obj){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
assert(
|
assert(
|
||||||
__accum === "aa1ca3" || __accum === "ca3aa1",
|
__accum === "aa1ca3" || __accum === "ca3aa1",
|
||||||
"Unexpected value: '" + __accum + "'"
|
"Unexpected value: '" + __accum + "'"
|
||||||
);
|
);
|
||||||
|
=======
|
||||||
|
assert.sameValue(__accum, "aa1ca3");
|
||||||
|
>>>>>>> eeb002c698 (Fix false negative in for-in test)
|
||||||
|
|
||||||
// erasator is the hash map terminator
|
// erasator is the hash map terminator
|
||||||
function erasator_T_1000(hash_map, charactr){
|
function erasator_T_1000(hash_map, charactr){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user