This is a unit test for WeakTokenSet. It creates some random strings and adds them to a WeakTokenSet. Then some (or even all) of them are removed, and it is verified that those removed have been garbage collected in the set's weak references, while the others are still present.
The test is repeated 8 times. It uses a random seed, thus there is a chance to test something different with each execution. Assertion failure messages contain the seed value, so the failure can be reproduced by installing that seed.
This is a unit test for WeakTokenSet. It creates some random strings and adds them to a WeakTokenSet. Then some (or even all) of them are removed, and it is verified that those removed have been garbage collected in the set's weak references, while the others are still present.
The test is repeated 8 times. It uses a random seed, thus there is a chance to test something different with each execution. Assertion failure messages contain the seed value, so the failure can be reproduced by installing that seed.