clean up deprecated stuff and unused imports in tests (#13059)

This commit is contained in:
Miran 2020-01-07 09:49:08 +01:00 • committed by GitHub
commit 1551fff853
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 16 deletions

View file

@ -2,7 +2,7 @@ discard """
action: run
"""
import math, random, strutils
import random, strutils
const consolePrefix = "jsCallbacks"
asm """
@ -33,8 +33,8 @@ proc runCallbacks ():cstring {.importc.}
proc `*` (s:string, n:Natural) : string = s.repeat(n)
proc outer (i:Natural) : (string, int) =
let c = $char(random(93) + 33)
let n = random(40)
let c = $char(rand(93) + 33)
let n = rand(40)
let s = c * n
proc inner(): cstring = ("[$1]" % $n) & s & " <--"
regCallback(inner)
@ -92,4 +92,4 @@ block issue7048:
let f = foo(p)
p = addr s2
doAssert len(p[]) == 5
doAssert f() == 3
doAssert f() == 3