update runtime thread tests

Threads are now removed after every "inner" step. Any thread that
reaches its DONE conditions is immediately removed instead of requiring
an extra step to remove it. As such tests that check the number of
threads have been updated to consider this.
This commit is contained in:
Michael "Z" Goddard 2018-10-31 17:56:12 -04:00
parent b833ef8d24
commit 2ffa8eb333
No known key found for this signature in database
GPG key ID: 762CD40DD5349872
5 changed files with 73 additions and 34 deletions

View file

@ -181,8 +181,7 @@ test('stepThreads', t => {
t.strictEquals(s.stepThreads().length, 0);
generateThread(r);
t.strictEquals(r.threads.length, 1);
t.strictEquals(s.stepThreads().length, 0);
r.threads[0].status = Thread.STATUS_RUNNING;
// Threads should be marked DONE and removed in the same step they finish.
t.strictEquals(s.stepThreads().length, 1);
t.end();