remove unused imports from tests
This commit is contained in:
parent
cc3e9ca164
commit
c6a451c584
12 changed files with 10 additions and 18 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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.}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ end
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
import algorithm, math, sequtils, strutils
|
import sequtils, strutils
|
||||||
|
|
||||||
|
|
||||||
block t338:
|
block t338:
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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))
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
import typetraits
|
|
||||||
|
|
||||||
template reject(e) =
|
template reject(e) =
|
||||||
static: assert(not compiles(e))
|
static: assert(not compiles(e))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue