* fix #17952: fix both false positives and false negatives for reInvalidSpec * handle megatest properly * fix for tests/stdlib/tbase64.nim
This commit is contained in:
parent
062571ae3c
commit
fb677bf5c9
6 changed files with 69 additions and 43 deletions
|
|
@ -193,28 +193,28 @@ proc setActive*(t: PTextEntry) =
|
|||
if not t.isNil and not t.inputClient.isNil:
|
||||
input_helpers.setActive(t.inputClient)
|
||||
|
||||
when false:
|
||||
proc newMessageArea*(container: PGuiContainer; position: TVector2f): PMessageArea =
|
||||
new(result)
|
||||
result.messages = @[]
|
||||
result.pos = position
|
||||
container.add(result)
|
||||
proc add*(m: PMessageArea, text: string): PText =
|
||||
result = messageProto.copy()
|
||||
result.setString(text)
|
||||
m.messages.add(result)
|
||||
let nmsgs = len(m.messages)
|
||||
var pos = vec2f(m.pos.x, m.pos.y)
|
||||
for i in countdown(nmsgs - 1, max(nmsgs - 30, 0)):
|
||||
setPosition(m.messages[i], pos)
|
||||
pos.y -= 16.0
|
||||
|
||||
discard """proc newMessageArea*(container: PGuiContainer; position: TVector2f): PMessageArea =
|
||||
new(result)
|
||||
result.messages = @[]
|
||||
result.pos = position
|
||||
container.add(result)
|
||||
proc add*(m: PMessageArea, text: string): PText =
|
||||
result = messageProto.copy()
|
||||
result.setString(text)
|
||||
m.messages.add(result)
|
||||
let nmsgs = len(m.messages)
|
||||
var pos = vec2f(m.pos.x, m.pos.y)
|
||||
for i in countdown(nmsgs - 1, max(nmsgs - 30, 0)):
|
||||
setPosition(m.messages[i], pos)
|
||||
pos.y -= 16.0
|
||||
proc draw*(window: PRenderWindow; m: PMessageArea) =
|
||||
let nmsgs = len(m.messages)
|
||||
if nmsgs == 0: return
|
||||
for i in countdown(nmsgs - 1, max(nmsgs - 30, 0)):
|
||||
window.draw(m.messages[i])
|
||||
|
||||
proc draw*(window: PRenderWindow; m: PMessageArea) =
|
||||
let nmsgs = len(m.messages)
|
||||
if nmsgs == 0: return
|
||||
for i in countdown(nmsgs - 1, max(nmsgs - 30, 0)):
|
||||
window.draw(m.messages[i])
|
||||
"""
|
||||
proc newMessageArea*(container: PGuiContainer; position: TVector2f): PMessageArea =
|
||||
new(result)
|
||||
result.messages = @[]
|
||||
|
|
|
|||
|
|
@ -29,11 +29,12 @@ task "test2", "Build release test build test release build":
|
|||
if shell("nim", ReleaseDefines, ReleaseTestDefines, "compile", ExeName) == 0:
|
||||
shell "."/ExeName
|
||||
|
||||
discard """task "dirserver", "build the directory server":
|
||||
withDir "server":
|
||||
if shell("nim", ServerDefines, "compile", "dirserver") != 0:
|
||||
echo "Failed to build the dirserver"
|
||||
quit 1"""
|
||||
when false:
|
||||
task "dirserver", "build the directory server":
|
||||
withDir "server":
|
||||
if shell("nim", ServerDefines, "compile", "dirserver") != 0:
|
||||
echo "Failed to build the dirserver"
|
||||
quit 1
|
||||
|
||||
task "zoneserver", "build the zone server":
|
||||
withDir "enet_server":
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
##.
|
||||
import system except `+`
|
||||
|
||||
discard """
|
||||
errormsg: "undeclared identifier: '+'"
|
||||
line: 9
|
||||
"""
|
||||
# Testament requires that the initial """ occurs before the 40th byte
|
||||
# in the file. No kidding...
|
||||
|
||||
|
||||
echo 4+5
|
||||
|
|
|
|||
|
|
@ -1,9 +1,17 @@
|
|||
discard """
|
||||
nimoutFull: true
|
||||
nimout: '''
|
||||
staticAlialProc instantiated with 358
|
||||
staticAlialProc instantiated with 368
|
||||
0: Foo
|
||||
1: Bar
|
||||
0: Foo
|
||||
1: Bar
|
||||
0: Foo
|
||||
1: Bar
|
||||
0: Foo
|
||||
1: Bar
|
||||
Hint: ***SLOW, DEBUG BUILD***; -d:release makes code run faster. [BuildMode]
|
||||
'''
|
||||
output: '''
|
||||
16
|
||||
|
|
@ -15,8 +23,11 @@ heyho
|
|||
Val1
|
||||
Val1
|
||||
'''
|
||||
matrix: "--hint:XDeclaredButNotUsed:off --hint:cc:off --hint:link:off --hint:SuccessX:off --hint:conf:off"
|
||||
"""
|
||||
|
||||
# pending https://github.com/nim-lang/Nim/pull/17852 use `--hints:none --hint:SuccessX:off`, or improve `isSuccess`
|
||||
|
||||
import macros
|
||||
|
||||
template ok(x) = doAssert(x)
|
||||
|
|
@ -247,9 +258,6 @@ echo t.foo, u.bar
|
|||
#------------------------------------------------------------------------------
|
||||
# issue #9679
|
||||
|
||||
discard """
|
||||
output: ''''''
|
||||
"""
|
||||
type
|
||||
Foo*[T] = object
|
||||
bar*: int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue