remove unused imports from tests

This commit is contained in:
narimiran 2019-11-06 13:59:31 +01:00
commit c6a451c584
12 changed files with 10 additions and 18 deletions

View file

@ -4,7 +4,7 @@ discard """
# bug #5079 # bug #5079
import tables, strutils import tables
type Test = ref object type Test = ref object
s: string s: string

View file

@ -12,8 +12,7 @@ foo = bar # No error if assigned directly
# bug #2250 # bug #2250
import import math
math, strutils
type type
Meters = float Meters = float

View file

@ -2,7 +2,7 @@ discard """
output: "passed all tests." output: "passed all tests."
""" """
import math, strutils import strutils
proc c_sprintf(buf, fmt: cstring) {.importc:"sprintf", header: "<stdio.h>", varargs.} proc c_sprintf(buf, fmt: cstring) {.importc:"sprintf", header: "<stdio.h>", varargs.}

View file

@ -22,7 +22,7 @@ end
""" """
import algorithm, math, sequtils, strutils import sequtils, strutils
block t338: block t338:

View file

@ -4,7 +4,7 @@ output: '''
(BracketExpr (Sym "typeDesc") (Sym "User")) (BracketExpr (Sym "typeDesc") (Sym "User"))
''' '''
""" """
import strutils, macros import macros
type type
Model = object of RootObj Model = object of RootObj

View file

@ -1,7 +1,7 @@
discard """ discard """
""" """
import macros, strUtils import macros
proc symToIdent(x: NimNode): NimNode = proc symToIdent(x: NimNode): NimNode =
case x.kind: case x.kind:

View file

@ -1,7 +1,5 @@
import macros import macros
from uri import `/`
macro test*(a: untyped): untyped = macro test*(a: untyped): untyped =
var nodes: tuple[a, b: int] var nodes: tuple[a, b: int]
nodes.a = 4 nodes.a = 4
@ -22,7 +20,6 @@ macro test*(a: untyped): untyped =
test: test:
"hi" "hi"
import strutils
template assertNot(arg: untyped): untyped = template assertNot(arg: untyped): untyped =
assert(not(arg)) assert(not(arg))

View file

@ -2,8 +2,7 @@ discard """
output: "after" output: "after"
""" """
import import macros
macros, strutils
macro test_macro*(s: string, n: untyped): untyped = macro test_macro*(s: string, n: untyped): untyped =
result = newNimNode(nnkStmtList) result = newNimNode(nnkStmtList)

View file

@ -5,8 +5,7 @@ discard """
{a, b}''' {a, b}'''
""" """
import import macros
macros, strutils
macro outterMacro*(n, blck: untyped): untyped = macro outterMacro*(n, blck: untyped): untyped =
let n = callsite() let n = callsite()

View file

@ -1,5 +1,3 @@
import typetraits
template reject(e) = template reject(e) =
static: assert(not compiles(e)) static: assert(not compiles(e))

View file

@ -1,7 +1,7 @@
discard """ discard """
output: "3" output: "3"
""" """
import StrUtils, Math import math
proc FibonacciA(n: int): int64 = proc FibonacciA(n: int): int64 =
var fn = float64(n) var fn = float64(n)

View file

@ -14,7 +14,7 @@ when haveZipLib:
import zipfiles import zipfiles
import import
os, osproc, strutils, parseopt, parsecfg, strtabs, streams, debcreation, os, strutils, parseopt, parsecfg, strtabs, streams, debcreation,
std / sha1 std / sha1
const const