# "setUp, tearDown, --isolated": state_test.j with a setUp that resets the# shared list, so both tests pass in one process.use io;
use testing;
def seen aslistofstringinit [];
funcsetUp() { # before every test$seen = [];
}
functearDown() { # after every testio.printf(" after: %d seen\n", len($seen));
}
functestB() { $seen[] = "b"; testing.assertEqual(len($seen), 1); }
functestA() { $seen[] = "a"; testing.assertEqual(len($seen), 1); }