Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. @Test
  2. fun twelveTest() {
  3.  
  4. for(i in 0..100){
  5. val size = Random.nextInt(1000)
  6. val ans = ArrayList<String>()
  7. val table = HashMap<String, Int>()
  8. for(i in 0..size){
  9. val key = randomString(Random.nextInt(100,1000))
  10. val value = Random.nextInt()
  11. if(value >= 0)
  12. ans.add(key)
  13. table[key] = value
  14. }
  15. assertEquals(ans.toList().sorted(), twelve(table).sorted())
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement