当前位置: 首页>>代码示例>>C++>>正文


C++ TEST_SAFE_CALL函数代码示例

本文整理汇总了C++中TEST_SAFE_CALL函数的典型用法代码示例。如果您正苦于以下问题:C++ TEST_SAFE_CALL函数的具体用法?C++ TEST_SAFE_CALL怎么用?C++ TEST_SAFE_CALL使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了TEST_SAFE_CALL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: test

void test(duk_context *ctx) {
	TEST_SAFE_CALL(test_basic);
	TEST_SAFE_CALL(test_null_ptr);
	TEST_SAFE_CALL(test_slice);
	TEST_SAFE_CALL(test_uncovered_buffer);
	TEST_SAFE_CALL(test_invalid_index);
}
开发者ID:OakLabsInc,项目名称:duktape,代码行数:7,代码来源:test-get-buffer-data.c

示例2: test

void test(duk_context *ctx) {
	TEST_SAFE_CALL(test_1);
	TEST_SAFE_CALL(test_2a);
	TEST_SAFE_CALL(test_2b);
	TEST_SAFE_CALL(test_2c);
	TEST_SAFE_CALL(test_3a);
}
开发者ID:GarethNelson,项目名称:duktape,代码行数:7,代码来源:test-dup.c

示例3: test

void test(duk_context *ctx) {
	TEST_SAFE_CALL(test_basic);
	TEST_SAFE_CALL(test_recursive_finalizer);
	TEST_SAFE_CALL(test_get_nonobject);
	TEST_SAFE_CALL(test_set_nonobject);
	TEST_SAFE_CALL(test_finalizer_loop);
}
开发者ID:GarethNelson,项目名称:duktape,代码行数:7,代码来源:test-get-set-finalizer.c

示例4: test

void test(duk_context *ctx) {
	TEST_SAFE_CALL(test_1);
	TEST_SAFE_CALL(test_2);
	TEST_SAFE_CALL(test_3);
	TEST_SAFE_CALL(test_4);
	TEST_SAFE_CALL(test_5);
}
开发者ID:GarethNelson,项目名称:duktape,代码行数:7,代码来源:test-errhandler.c

示例5: test

void test(duk_context *ctx) {
	/*printf("SIZE_MAX=%lf\n", (double) SIZE_MAX);*/

	TEST_SAFE_CALL(test_1a);
	TEST_SAFE_CALL(test_1b);
	TEST_SAFE_CALL(test_2);
	TEST_SAFE_CALL(test_3);
}
开发者ID:JoshEngebretson,项目名称:duktape,代码行数:8,代码来源:test-push-buffer.c

示例6: test

void test(duk_context *ctx) {
	TEST_SAFE_CALL(test_1);
	TEST_SAFE_CALL(check_1);
	TEST_SAFE_CALL(check_2);
	TEST_SAFE_CALL(check_3);
	TEST_SAFE_CALL(check_4);
	TEST_SAFE_CALL(require_1);
	TEST_SAFE_CALL(require_2);
	TEST_SAFE_CALL(require_3);
	TEST_SAFE_CALL(require_4);
}
开发者ID:fatcerberus,项目名称:duktape,代码行数:11,代码来源:test-check-require-stack-top.c

示例7: test

void test(duk_context *ctx) {
	TEST_SAFE_CALL(test_1);
	TEST_SAFE_CALL(test_2);
	TEST_SAFE_CALL(test_3a);
	TEST_SAFE_CALL(test_3b);
	TEST_SAFE_CALL(test_3c);
	TEST_SAFE_CALL(test_3d);
	TEST_SAFE_CALL(test_3e);
	TEST_SAFE_CALL(test_3f);
	TEST_SAFE_CALL(test_3g);
}
开发者ID:OakLabsInc,项目名称:duktape,代码行数:11,代码来源:test-copy.c

示例8: test

void test(duk_context *ctx) {
	TEST_SAFE_CALL(test_1);

	/* When we return the object is finalized once more as part of
	 * heap destruction but no longer rescued.
	 */
}
开发者ID:GarethNelson,项目名称:duktape,代码行数:7,代码来源:test-dev-finalizer-rescue-unwind.c

示例9: TEST_F

TEST_F(FooTest, test_require_buffer)
{
    duk_smart_ptr duk_instance(duk_create_heap_default(), [](duk_context* f) { duk_destroy_heap(f); });
	test_function_vector t_vector = {test_basic,test_invalid_type,test_invalid_index1,test_invalid_index2,test_buffer_object};
    for (auto f : t_vector)
    {
        auto pf = *(f.target<duk_safe_call_function>());
        TEST_SAFE_CALL(duk_instance.get(), pf);
    }
}
开发者ID:black13,项目名称:duktape_games,代码行数:10,代码来源:test-require-buffer.cpp

示例10: test

void test(duk_context *ctx) {
	TEST_SAFE_CALL(test_1a);
	TEST_PCALL(test_1b);
	TEST_PCALL(test_1c);
	TEST_SAFE_CALL(test_1d);
	TEST_SAFE_CALL(test_1e);
	TEST_SAFE_CALL(test_1f);

	TEST_SAFE_CALL(test_2a);
	TEST_PCALL(test_2b);
	TEST_PCALL(test_2c);
	TEST_SAFE_CALL(test_2d);
	TEST_SAFE_CALL(test_2e);

	TEST_SAFE_CALL(test_3a);
	TEST_PCALL(test_3b);
	TEST_SAFE_CALL(test_3c);
	TEST_SAFE_CALL(test_3d);
}
开发者ID:BrandonTheHamm,项目名称:duktape,代码行数:19,代码来源:test-del-prop.c

示例11: TEST_F

TEST_F(FooTest, test_require_buffer_data)
{
    duk_smart_ptr duk_instance(duk_create_heap_default(), [](duk_context* f) { duk_destroy_heap(f); });
	test_function_vector t_vector = {test_1,test_2,test_3,test_4};

    for (auto f : t_vector)
    {
        auto pf = *(f.target<duk_safe_call_function>());
        TEST_SAFE_CALL(duk_instance.get(), pf);
    }
}
开发者ID:black13,项目名称:duktape_games,代码行数:11,代码来源:test-require-buffer-data.cpp

示例12: test

void test(duk_context *ctx) {
	TEST_SAFE_CALL(test_gc);
	TEST_SAFE_CALL(test_is_prototype_of);
	TEST_SAFE_CALL(test_error_augment);
	TEST_SAFE_CALL(test_hasprop);
	TEST_SAFE_CALL(test_getprop);
	TEST_SAFE_CALL(test_putprop);
	TEST_SAFE_CALL(test_instanceof);
	printf("still here\n"); fflush(stdout);
}
开发者ID:GarethNelson,项目名称:duktape,代码行数:10,代码来源:test-dev-prototype-loop.c

示例13: test

void test(duk_context *ctx) {
	TEST_SAFE_CALL(test_trivial);
	TEST_SAFE_CALL(test_basic);
	TEST_SAFE_CALL(test_suspend_resume_throw_trivial);
	TEST_SAFE_CALL(test_suspend_resume_throw_basic);
	TEST_SAFE_CALL(test_suspend_resume_reterr_trivial);
	TEST_SAFE_CALL(test_suspend_resume_reterr_basic);
}
开发者ID:fatcerberus,项目名称:duktape,代码行数:8,代码来源:test-suspend-resume.c

示例14: test

void test(duk_context *ctx) {

	/* dummy just to offset the object index from 0 */
	duk_push_string(ctx, "foo");

	TEST_SAFE_CALL(test_1);
	TEST_SAFE_CALL(test_2);
	TEST_SAFE_CALL(test_3);
	TEST_SAFE_CALL(test_4);
	TEST_SAFE_CALL(test_5);
	TEST_SAFE_CALL(test_6);
	TEST_SAFE_CALL(test_7);
	TEST_SAFE_CALL(test_8);
	TEST_SAFE_CALL(test_9);

	duk_pop(ctx);  /* dummy */

	printf("final top: %d\n", duk_get_top(ctx));
}
开发者ID:andoma,项目名称:duktape,代码行数:19,代码来源:test-pcall-prop.c

示例15: test

void test(duk_context *ctx) {
	TEST_SAFE_CALL(test_1a);
	TEST_PCALL(test_1b);
	TEST_PCALL(test_1c);
	TEST_SAFE_CALL(test_1d);
	TEST_SAFE_CALL(test_1e);
	TEST_SAFE_CALL(test_1f);

	TEST_SAFE_CALL(test_2a);
	TEST_PCALL(test_2b);
	TEST_PCALL(test_2c);
	TEST_SAFE_CALL(test_2d);
	/* FIXME: currently error message contains the actual DUK_INVALID_INDEX
	 * value, nonportable */
	TEST_SAFE_CALL(test_2e);

	TEST_SAFE_CALL(test_3a);
	TEST_PCALL(test_3b);
	TEST_SAFE_CALL(test_3c);
	/* FIXME: currently error message contains the actual DUK_INVALID_INDEX
	 * value, nonportable */
	TEST_SAFE_CALL(test_3d);
}
开发者ID:BpLife,项目名称:duktape,代码行数:23,代码来源:test-del-prop.c


注:本文中的TEST_SAFE_CALL函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。