diff --git a/core/vm.c b/core/vm.c index b10c1f31..e93f4574 100644 --- a/core/vm.c +++ b/core/vm.c @@ -363,9 +363,8 @@ int gst_continue(Gst *vm) { temp = gst_wrap_thread(vm->thread->parent); } if (temp.type == GST_THREAD) { - if (temp.data.thread->status == GST_THREAD_DEAD || - temp.data.thread->status == GST_THREAD_ERROR) - gst_error(vm, "cannot enter dead thread"); + if (temp.data.thread->status != GST_THREAD_PENDING) + gst_error(vm, "can only enter pending thread"); } gst_frame_ret(stack) = pc[1]; vm->thread->status = GST_THREAD_PENDING; diff --git a/gsttests/basic.gst b/gsttests/basic.gst index 3ffcaead..9ee0bb99 100644 --- a/gsttests/basic.gst +++ b/gsttests/basic.gst @@ -104,4 +104,5 @@ # report -(print num-tests-passed " of " num-tests-run " tests passed") \ No newline at end of file +(print "\n" num-tests-passed " of " num-tests-run " tests passed\n") +(if (not (= num-tests-passed num-tests-run)) (exit! 1)) \ No newline at end of file