tests: Trim .nim files trailing whitespace

via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
This commit is contained in:
Adam Strzelecki 2015-09-04 23:04:32 +02:00
commit e80465dacf
372 changed files with 4486 additions and 4486 deletions

View file

@ -3,9 +3,9 @@ discard """
"""
type
TA = object {.pure, final.}
TA = object {.pure, final.}
x: string
var
a: TA
a.x = "abc"

View file

@ -1,9 +1,9 @@
# Test 13: forward types
type
PSym = ref TSym
TSym = object
next: PSym
var s: PSym
# Test 13: forward types
type
PSym = ref TSym
TSym = object
next: PSym
var s: PSym

View file

@ -1,22 +1,22 @@
# Test for a hard to fix internal error
# occurred in the SDL library
{.push dynlib: "SDL.dll", callconv: cdecl.}
type
PSDL_semaphore = ptr TSDL_semaphore
TSDL_semaphore {.final.} = object
sem: pointer #PSem_t;
when not defined(USE_NAMED_SEMAPHORES):
sem_data: int
when defined(BROKEN_SEMGETVALUE):
# This is a little hack for MacOS X -
# It's not thread-safe, but it's better than nothing
sem_value: cint
type
PSDL_Sem = ptr TSDL_Sem
TSDL_Sem = TSDL_Semaphore
proc SDL_CreateSemaphore(initial_value: int32): PSDL_Sem {.
importc: "SDL_CreateSemaphore".}
# Test for a hard to fix internal error
# occurred in the SDL library
{.push dynlib: "SDL.dll", callconv: cdecl.}
type
PSDL_semaphore = ptr TSDL_semaphore
TSDL_semaphore {.final.} = object
sem: pointer #PSem_t;
when not defined(USE_NAMED_SEMAPHORES):
sem_data: int
when defined(BROKEN_SEMGETVALUE):
# This is a little hack for MacOS X -
# It's not thread-safe, but it's better than nothing
sem_value: cint
type
PSDL_Sem = ptr TSDL_Sem
TSDL_Sem = TSDL_Semaphore
proc SDL_CreateSemaphore(initial_value: int32): PSDL_Sem {.
importc: "SDL_CreateSemaphore".}

View file

@ -18,7 +18,7 @@ type
MessageReceivedHandler*: TEventHandler
Socket: TSocket
Thread: TThread[TIRC]
proc initIRC*(): TIRC =
result.Socket = socket()
result.EventEmitter = initEventEmitter()
@ -26,8 +26,8 @@ proc initIRC*(): TIRC =
proc IsConnected*(irc: var TIRC): bool =
return running(irc.Thread)
proc sendRaw*(irc: var TIRC, message: string) =
irc.Socket.send(message & "\r\L")
proc handleData(irc: TIRC) {.thread.} =
@ -40,14 +40,14 @@ proc handleData(irc: TIRC) {.thread.} =
if len(tup) == 1:
#Connected
connected = True
#Parse data here
else:
#Disconnected
connected = False
return
proc Connect*(irc: var TIRC, nick: string, host: string, port: int = 6667) =
connect(irc.Socket ,host ,TPort(port),TDomain.AF_INET)
send(irc.Socket,"USER " & nick & " " & nick & " " & nick & " " & nick &"\r\L")
@ -57,8 +57,8 @@ proc Connect*(irc: var TIRC, nick: string, host: string, port: int = 6667) =
irc.Thread = thread
when isMainModule:
var irc = initIRC()
irc.Connect("AmryBot[Nim]","irc.freenode.net",6667)

View file

@ -21,7 +21,7 @@ type
TTreeIterator* [T,D] = ref object {.inheritable.}
TKeysIterator* [T,D] = ref object of TTreeIterator[T,D] #this not
var
it: TKeysIterator[int, string] = nil

View file

@ -6,7 +6,7 @@ import typetraits
type
TRecord = (tuple) or (object)
TFoo[T, U] = object
x: int