michael@0: load(libdir + "asserts.js"); michael@0: michael@0: function f(a=42) { michael@0: return a; michael@0: function a() { return 19; } michael@0: } michael@0: assertEq(f()(), 19); michael@0: function h(a=b, b=43) { michael@0: return [a, b]; michael@0: function b() { return 42; } michael@0: } michael@0: var res = h(); michael@0: assertEq(res[0], res[1]); michael@0: assertEq(res[0](), 42); michael@0: function i(b=FAIL) { michael@0: function b() {} michael@0: } michael@0: i(); michael@0: i(42); michael@0: function j(a=(b=42), b=8) { michael@0: return b; michael@0: function b() {} michael@0: } michael@0: assertEq(j(), 42);