From 3c48feb00828b77d913f7e32c92bc61b38c393da Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Wed, 16 Aug 2017 00:03:32 +0300 Subject: [PATCH] API test fixes for duk_push_proxy() flags --- tests/api/test-all-public-symbols.c | 1 + tests/api/test-proxy-apply.c | 4 ++-- tests/api/test-proxy-construct.c | 4 ++-- tests/api/test-push-proxy.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/api/test-all-public-symbols.c b/tests/api/test-all-public-symbols.c index c6dc3f207c..8301585fdb 100644 --- a/tests/api/test-all-public-symbols.c +++ b/tests/api/test-all-public-symbols.c @@ -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); diff --git a/tests/api/test-proxy-apply.c b/tests/api/test-proxy-apply.c index 4ac8c1bf64..3db61cb744 100644 --- a/tests/api/test-proxy-apply.c +++ b/tests/api/test-proxy-apply.c @@ -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); @@ -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); diff --git a/tests/api/test-proxy-construct.c b/tests/api/test-proxy-construct.c index 1fc34efca2..295b6ea520 100644 --- a/tests/api/test-proxy-construct.c +++ b/tests/api/test-proxy-construct.c @@ -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*/); @@ -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*/); diff --git a/tests/api/test-push-proxy.c b/tests/api/test-push-proxy.c index 5bd2e37ad4..849c14269b 100644 --- a/tests/api/test-push-proxy.c +++ b/tests/api/test-push-proxy.c @@ -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);