Skip to content

Commit 7494473

Browse files
Test modified to be correct Javascript.
1 parent eddaec8 commit 7494473

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

tests/test032.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
var Foo = {
2-
value : function() { return this.x + this.y; }
3-
};
4-
5-
var a = { prototype: Foo, x: 1, y: 2 };
6-
var b = new Foo();
7-
b.x = 2;
8-
b.y = 3;
1+
2+
function Foo (x,y)
3+
{
4+
this.x = x;
5+
this.y = y;
6+
}
7+
8+
Foo.prototype.value = function() { return this.x + this.y; }
9+
10+
var a = new Foo(1,2);
11+
var b = new Foo(2,3);
912

1013
var result1 = a.value();
1114
var result2 = b.value();

0 commit comments

Comments
 (0)