diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-05-14 23:04:13 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-05-14 23:04:13 +0900 |
| commit | 8085817cb5737ca0c2a4afb5e3d013a395e12eb4 (patch) | |
| tree | 633371b8956a39b5c570d745bdfa963e42111158 /test/init_mrbtest.c | |
| parent | 0c6ff97b8e88e6f848ba73a2bf799de98d27a526 (diff) | |
| download | mruby-8085817cb5737ca0c2a4afb5e3d013a395e12eb4.tar.gz mruby-8085817cb5737ca0c2a4afb5e3d013a395e12eb4.zip | |
make test restructuring
Diffstat (limited to 'test/init_mrbtest.c')
| -rw-r--r-- | test/init_mrbtest.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/init_mrbtest.c b/test/init_mrbtest.c new file mode 100644 index 000000000..5d977da34 --- /dev/null +++ b/test/init_mrbtest.c @@ -0,0 +1,16 @@ +#include "mruby.h" +#include "mruby/irep.h" +#include "mruby/dump.h" +#include "mruby/string.h" +#include "mruby/proc.h" + +extern const char mrbtest_irep[]; + +void +mrb_init_mrbtest(mrb_state *mrb) +{ + int n = mrb_read_irep(mrb, mrbtest_irep); + + mrb_run(mrb, mrb_proc_new(mrb, mrb->irep[n]), mrb_top_self(mrb)); +} + |
