Skip to content

Commit

Permalink
API test fixes for duk_push_proxy() flags
Browse files Browse the repository at this point in the history
  • Loading branch information
svaarala committed Aug 15, 2017
1 parent fdbcb97 commit 3c48feb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions tests/api/test-all-public-symbols.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ static duk_ret_t test_func(duk_context *ctx, void *udata) {
(void) duk_push_number(ctx, 0.0);
(void) duk_push_object(ctx);
(void) duk_push_pointer(ctx, NULL);
(void) duk_push_proxy(ctx, 0);
(void) duk_push_sprintf(ctx, "dummy");
(void) duk_push_string(ctx, "dummy");
(void) duk_push_this(ctx);
Expand Down
4 changes: 2 additions & 2 deletions tests/api/test-proxy-apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static duk_ret_t test_passthrough(duk_context *ctx, void *udata) {
duk_push_c_function(ctx, my_function, 1 /*nargs*/); /* target */
duk_push_object(ctx); /* handler */

duk_push_proxy(ctx);
duk_push_proxy(ctx, 0);

duk_push_uint(ctx, 123);
duk_call(ctx, 1);
Expand All @@ -53,7 +53,7 @@ static duk_ret_t test_trap(duk_context *ctx, void *udata) {
duk_push_c_function(ctx, my_apply_trap, 3 /*nargs*/);
duk_put_prop_string(ctx, -2, "apply");

duk_push_proxy(ctx);
duk_push_proxy(ctx, 0);

duk_push_uint(ctx, 123);
duk_call(ctx, 1);
Expand Down
4 changes: 2 additions & 2 deletions tests/api/test-proxy-construct.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static duk_ret_t test_passthrough(duk_context *ctx, void *udata) {
duk_push_c_function(ctx, my_constructor, 1 /*nargs*/); /* target */
duk_push_object(ctx); /* handler */

duk_push_proxy(ctx);
duk_push_proxy(ctx, 0);

duk_push_uint(ctx, 123);
duk_new(ctx, 1 /*nargs*/);
Expand All @@ -54,7 +54,7 @@ static duk_ret_t test_trap(duk_context *ctx, void *udata) {
duk_push_c_function(ctx, my_construct_trap, 3 /*nargs*/);
duk_put_prop_string(ctx, -2, "construct");

duk_push_proxy(ctx);
duk_push_proxy(ctx, 0);

duk_push_uint(ctx, 123);
duk_new(ctx, 1 /*nargs*/);
Expand Down
2 changes: 1 addition & 1 deletion tests/api/test-push-proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static duk_ret_t test_basic(duk_context *ctx, void *udata) {
duk_eval_string(ctx, "({ foo: 123 })");
duk_eval_string(ctx, "({ get: function myget() { return 321; } })");
printf("top before: %ld\n", (long) duk_get_top(ctx));
ret = duk_push_proxy(ctx);
ret = duk_push_proxy(ctx, 0);
printf("top after: %ld\n", (long) duk_get_top(ctx));
printf("duk_push_proxy() returned %ld\n", (long) ret);

Expand Down

0 comments on commit 3c48feb

Please sign in to comment.