Skip to content

Commit 1bb71ab

Browse files
committed
include trace, add another test case
1 parent 93212c8 commit 1bb71ab

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

test/Object/assign.baseline

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ObjectCopy succeeded
2+
ObjectCopy: Can't copy: Don't have PathTypeHandler
3+
ObjectCopy: Can't copy: type handler has accessors
4+
ObjectCopy: Can't copy: type handler has accessors
5+
ObjectCopy: Can't copy: Protoytypes don't match
6+
ObjectCopy: Can't copy: from obj has non-enumerable properties
7+
ObjectCopy succeeded
8+
pass

test/Object/assign.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,21 @@ var tests = [
8787
assert.areEqual(newObj.b, undefined);
8888
assert.areEqual(newObj.a, orig.a);
8989
}
90+
},
91+
{
92+
name: "proto accessor",
93+
body: function ()
94+
{
95+
Object.defineProperty(Object.prototype, 'b', {
96+
get: function() { return "asdf"; }
97+
});
98+
let orig = {};
99+
orig.a = 1;
100+
101+
let newObj = Object.assign({}, orig);
102+
assert.areEqual(newObj.b, "asdf");
103+
assert.areEqual(newObj.a, orig.a);
104+
}
90105
}
91106
];
92107

test/Object/rlexe.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@
439439
<test>
440440
<default>
441441
<files>assign.js</files>
442-
<compile-flags>-args summary -endargs</compile-flags>
442+
<compile-flags>-args summary -endargs -trace:ObjectCopy</compile-flags>
443+
<baseline>assign.baseline</baseline>
443444
</default>
444445
</test>
445446
</regress-exe>

0 commit comments

Comments
 (0)