mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
401 B
26 lines
401 B
/*
|
|
* Wrapper for running an API test case.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include "duktape.h"
|
|
|
|
extern void test(duk_context *ctx);
|
|
|
|
int main(int argc, char *argv[]) {
|
|
duk_context *ctx = NULL;
|
|
|
|
/* FIXME: resource limits */
|
|
|
|
ctx = duk_create_heap_default();
|
|
if (!ctx) {
|
|
fprintf(stderr, "cannot allocate heap for testcase\n");
|
|
exit(1);
|
|
}
|
|
|
|
test(ctx);
|
|
|
|
duk_destroy_heap(ctx);
|
|
}
|
|
|
|
|