blob: 53e76ed1f30b52fd9ac0bd2f30e9d7ef010c6368 [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
function call(site)
{
return site;
}
var expr = "return call`Cocoa`";
var firstFunction = Function(expr);
var secondFunction = Function(expr);
var first = firstFunction();
var second = secondFunction();
shouldBe(first !== second, true);
shouldBe(first, firstFunction());
shouldBe(first, new firstFunction());
shouldBe(second, secondFunction());
shouldBe(second, new secondFunction());