Libraryless. Click here for Pure Java version (5235L/29K).
1 | svoid test_tempSetCustomRandomizerForThisThread() { |
2 | repeat 2 { |
3 | { |
4 | temp tempSetCustomRandomizerForThisThread(predictableRandom()); |
5 | assertEqualsVerbose(60, random(100)); |
6 | assertEqualsVerbose(48, random(100)); |
7 | } |
8 | |
9 | // check that we're back to the default randomizer |
10 | assertEquals(ThreadLocalRandom.current(), defaultRandomizer()); |
11 | } |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034191 |
Snippet name: | test_tempSetCustomRandomizerForThisThread (OK) |
Eternal ID of this version: | #1034191/2 |
Text MD5: | 6167e27e15140f8d1e6e2da2fa694d8f |
Transpilation MD5: | b0021498571511a3ef1ce027f45cfeed |
Author: | stefan |
Category: | javax / randomizers |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-27 14:32:14 |
Source code size: | 379 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 130 / 198 |
Version history: | 1 change(s) |
Referenced in: | [show references] |