clean up deprecated stuff and unused imports in tests (#13059)
This commit is contained in:
parent
6a7a19eb15
commit
1551fff853
8 changed files with 15 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ discard """
|
|||
|
||||
# This file tests the JavaScript generator
|
||||
|
||||
import
|
||||
dom, strutils
|
||||
import strutils
|
||||
|
||||
var
|
||||
inputElement = "1123"
|
||||
|
|
@ -51,4 +50,3 @@ block:
|
|||
var s: seq[int]
|
||||
s.add(2)
|
||||
doAssert(s == @[2])
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ true
|
|||
## same as tjsffi, but this test uses the old names: importc and
|
||||
## importcpp. This test is for backwards compatibility.
|
||||
|
||||
import macros, jsffi, jsconsole
|
||||
import jsffi, jsconsole
|
||||
|
||||
# Tests for JsObject
|
||||
# Test JsObject []= and []
|
||||
|
|
@ -299,7 +299,6 @@ block:
|
|||
|
||||
test()
|
||||
|
||||
import macros
|
||||
|
||||
block:
|
||||
{.emit:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue