diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-07-12 17:50:44 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-07-12 17:50:44 +0900 |
| commit | a16a53b5ebc0fb6a7dc448130ea8f34575d85a3d (patch) | |
| tree | 890a25f96916c8eea4906f423f8ffcfc9d41f01c /test/init_mrbtest.c | |
| parent | 4f66de36c4531783da624a6ff0b8bfb22d083efd (diff) | |
| parent | 03866f25f86a4f0d0f924b664414fedaac31319d (diff) | |
| download | mruby-a16a53b5ebc0fb6a7dc448130ea8f34575d85a3d.tar.gz mruby-a16a53b5ebc0fb6a7dc448130ea8f34575d85a3d.zip | |
Merge pull request #2458 from take-cheeze/min_dep_test
Support minimum dependency test.
Diffstat (limited to 'test/init_mrbtest.c')
| -rw-r--r-- | test/init_mrbtest.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/init_mrbtest.c b/test/init_mrbtest.c index 3ce42f661..3a61a6f39 100644 --- a/test/init_mrbtest.c +++ b/test/init_mrbtest.c @@ -6,15 +6,26 @@ extern const uint8_t mrbtest_assert_irep[]; extern const uint8_t mrbtest_irep[]; void mrbgemtest_init(mrb_state* mrb); +void mrb_init_test_driver(mrb_state* mrb); +void mrb_t_pass_result(mrb_state *mrb_dst, mrb_state *mrb_src); void mrb_init_mrbtest(mrb_state *mrb) { + mrb_state *core_test; + mrb_load_irep(mrb, mrbtest_assert_irep); - mrb_load_irep(mrb, mrbtest_irep); + + core_test = mrb_open_core(mrb_default_allocf, NULL); + mrb_init_test_driver(core_test); + mrb_load_irep(core_test, mrbtest_assert_irep); + mrb_load_irep(core_test, mrbtest_irep); + mrb_t_pass_result(mrb, core_test); + #ifndef DISABLE_GEMS mrbgemtest_init(mrb); #endif + if (mrb->exc) { mrb_print_error(mrb); exit(EXIT_FAILURE); |
