1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 : * vim: set ts=8 sw=4 et tw=99:
3 : */
4 :
5 : #include "tests.h"
6 :
7 4 : BEGIN_TEST(testFunctionProperties)
8 : {
9 2 : jsvalRoot x(cx);
10 1 : EVAL("(function f() {})", x.addr());
11 :
12 1 : JSObject *obj = JSVAL_TO_OBJECT(x.value());
13 2 : jsvalRoot y(cx);
14 :
15 1 : CHECK(JS_GetProperty(cx, obj, "arguments", y.addr()));
16 1 : CHECK_SAME(y, JSVAL_NULL);
17 :
18 1 : CHECK(JS_GetProperty(cx, obj, "caller", y.addr()));
19 1 : CHECK_SAME(y, JSVAL_NULL);
20 :
21 1 : return true;
22 : }
23 2 : END_TEST(testFunctionProperties)
|