diff options
author | def <dennis@felsin9.de> | 2015-07-11 14:39:19 +0200 |
---|---|---|
committer | def <dennis@felsin9.de> | 2016-01-25 19:10:37 +0100 |
commit | c50b5b62ef5ae51467754f7c1db49c4cbeaee5f8 (patch) | |
tree | 3c40a179da95227dd7308d57965809f7e2dacb44 /tests | |
parent | 4246f660ea4ba7bab05811662eb53a87cc0cc049 (diff) | |
download | Nim-c50b5b62ef5ae51467754f7c1db49c4cbeaee5f8.tar.gz |
Fix a few deprecation warnings
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cpp/tthread_createthread.nim | 2 | ||||
-rw-r--r-- | tests/generics/tthread_generic.nim | 10 | ||||
-rw-r--r-- | tests/manyloc/keineschweine/server/old_server_utils.nim | 2 | ||||
-rw-r--r-- | tests/manyloc/keineschweine/server/old_sg_server.nim | 2 | ||||
-rw-r--r-- | tests/manyloc/named_argument_bug/tri_engine/gfx/color.nim | 4 | ||||
-rw-r--r-- | tests/misc/tunsigned64mod.nim | 2 | ||||
-rw-r--r-- | tests/misc/tunsignedcmp.nim | 2 | ||||
-rw-r--r-- | tests/misc/tunsignedconv.nim | 2 | ||||
-rw-r--r-- | tests/misc/tunsignedmisc.nim | 2 | ||||
-rw-r--r-- | tests/parallel/tguard1.nim | 2 | ||||
-rw-r--r-- | tests/threads/threadex.nim | 2 | ||||
-rw-r--r-- | tests/threads/tthreadanalysis.nim | 2 | ||||
-rw-r--r-- | tests/threads/tthreadanalysis2.nim | 2 | ||||
-rw-r--r-- | tests/threads/tthreadheapviolation1.nim | 2 | ||||
-rw-r--r-- | tests/threads/ttryrecv.nim | 2 | ||||
-rw-r--r-- | tests/typerel/tnoargopenarray.nim | 2 | ||||
-rw-r--r-- | tests/types/tillegaltyperecursion.nim | 2 |
17 files changed, 16 insertions, 28 deletions
diff --git a/tests/cpp/tthread_createthread.nim b/tests/cpp/tthread_createthread.nim index 2c239005f..363136e9d 100644 --- a/tests/cpp/tthread_createthread.nim +++ b/tests/cpp/tthread_createthread.nim @@ -6,7 +6,7 @@ proc threadMain(a: int) {.thread.} = discard proc main() = - var thread: TThread[int] + var thread: Thread[int] thread.createThread(threadMain, 0) thread.joinThreads() diff --git a/tests/generics/tthread_generic.nim b/tests/generics/tthread_generic.nim index e8946caf6..def1acfe1 100644 --- a/tests/generics/tthread_generic.nim +++ b/tests/generics/tthread_generic.nim @@ -3,20 +3,20 @@ discard """ """ type - TThreadFuncArgs[T] = object of RootObj + ThreadFuncArgs[T] = object of RootObj a: proc(): T {.thread.} b: proc(val: T) {.thread.} -proc handleThreadFunc(arg: TThreadFuncArgs[int]){.thread.} = +proc handleThreadFunc(arg: ThreadFuncArgs[int]){.thread.} = var fn = arg.a var callback = arg.b var output = fn() callback(output) proc `@||->`*[T](fn: proc(): T {.thread.}, - callback: proc(val: T){.thread.}): TThread[TThreadFuncArgs[T]] = - var thr: TThread[TThreadFuncArgs[T]] - var args: TThreadFuncArgs[T] + callback: proc(val: T){.thread.}): Thread[ThreadFuncArgs[T]] = + var thr: Thread[ThreadFuncArgs[T]] + var args: ThreadFuncArgs[T] args.a = fn args.b = callback createThread(thr, handleThreadFunc, args) diff --git a/tests/manyloc/keineschweine/server/old_server_utils.nim b/tests/manyloc/keineschweine/server/old_server_utils.nim index d0fd39ae0..3da6e078c 100644 --- a/tests/manyloc/keineschweine/server/old_server_utils.nim +++ b/tests/manyloc/keineschweine/server/old_server_utils.nim @@ -1,5 +1,5 @@ import - streams, md5, sockets, unsigned, + streams, md5, sockets, sg_packets, zlib_helpers, idgen type TClientType* = enum diff --git a/tests/manyloc/keineschweine/server/old_sg_server.nim b/tests/manyloc/keineschweine/server/old_sg_server.nim index c326720fe..bddc74c6d 100644 --- a/tests/manyloc/keineschweine/server/old_sg_server.nim +++ b/tests/manyloc/keineschweine/server/old_sg_server.nim @@ -1,5 +1,5 @@ import - sockets, times, streams, streams_enh, tables, json, os, unsigned, + sockets, times, streams, streams_enh, tables, json, os, sg_packets, sg_assets, md5, server_utils, client_helpers var dirServer: PServer diff --git a/tests/manyloc/named_argument_bug/tri_engine/gfx/color.nim b/tests/manyloc/named_argument_bug/tri_engine/gfx/color.nim index cdd5aaf03..b84be7a4c 100644 --- a/tests/manyloc/named_argument_bug/tri_engine/gfx/color.nim +++ b/tests/manyloc/named_argument_bug/tri_engine/gfx/color.nim @@ -8,10 +8,6 @@ from strutils import `%`, ffDecimal -from unsigned import - `shr`, - `and` - type TColor* = tuple[r, g, b, a: TR] diff --git a/tests/misc/tunsigned64mod.nim b/tests/misc/tunsigned64mod.nim index 3007405a2..9c9e01c45 100644 --- a/tests/misc/tunsigned64mod.nim +++ b/tests/misc/tunsigned64mod.nim @@ -1,8 +1,6 @@ # bug #1638 -import unsigned - let v1 = 7 let v2 = 7'u64 diff --git a/tests/misc/tunsignedcmp.nim b/tests/misc/tunsignedcmp.nim index a66fbaae1..9ffc0d119 100644 --- a/tests/misc/tunsignedcmp.nim +++ b/tests/misc/tunsignedcmp.nim @@ -5,8 +5,6 @@ true''' """ # bug 1420 -import unsigned - var x = 40'u32 var y = 30'u32 echo x > y # works diff --git a/tests/misc/tunsignedconv.nim b/tests/misc/tunsignedconv.nim index 3032f8de6..956e014da 100644 --- a/tests/misc/tunsignedconv.nim +++ b/tests/misc/tunsignedconv.nim @@ -1,6 +1,4 @@ -import unsigned - # Tests unsigned literals and implicit conversion between uints and ints # Passes if it compiles diff --git a/tests/misc/tunsignedmisc.nim b/tests/misc/tunsignedmisc.nim index e6a497a3d..4b8157ddd 100644 --- a/tests/misc/tunsignedmisc.nim +++ b/tests/misc/tunsignedmisc.nim @@ -1,5 +1,3 @@ -import unsigned - discard """ errormsg: "number 0x123'u8 out of valid range" """ diff --git a/tests/parallel/tguard1.nim b/tests/parallel/tguard1.nim index d96e17589..3e0c131c5 100644 --- a/tests/parallel/tguard1.nim +++ b/tests/parallel/tguard1.nim @@ -1,6 +1,6 @@ when false: - template lock(a, b: ptr TLock; body: stmt) = + template lock(a, b: ptr Lock; body: stmt) = if cast[ByteAddress](a) < cast[ByteAddress](b): pthread_mutex_lock(a) pthread_mutex_lock(b) diff --git a/tests/threads/threadex.nim b/tests/threads/threadex.nim index 545d1f0cc..00d0992a5 100644 --- a/tests/threads/threadex.nim +++ b/tests/threads/threadex.nim @@ -11,7 +11,7 @@ type of mLine: data: string var - producer, consumer: TThread[void] + producer, consumer: Thread[void] chan: TChannel[TMsg] printedLines = 0 diff --git a/tests/threads/tthreadanalysis.nim b/tests/threads/tthreadanalysis.nim index 6ef4de0bf..a6a847a0a 100644 --- a/tests/threads/tthreadanalysis.nim +++ b/tests/threads/tthreadanalysis.nim @@ -8,7 +8,7 @@ discard """ import os var - thr: array [0..5, TThread[tuple[a, b: int]]] + thr: array [0..5, Thread[tuple[a, b: int]]] proc doNothing() = discard diff --git a/tests/threads/tthreadanalysis2.nim b/tests/threads/tthreadanalysis2.nim index 07d77028b..93d169f0b 100644 --- a/tests/threads/tthreadanalysis2.nim +++ b/tests/threads/tthreadanalysis2.nim @@ -8,7 +8,7 @@ discard """ import os var - thr: array [0..5, TThread[tuple[a, b: int]]] + thr: array [0..5, Thread[tuple[a, b: int]]] proc doNothing() = discard diff --git a/tests/threads/tthreadheapviolation1.nim b/tests/threads/tthreadheapviolation1.nim index 02ce7878a..59ecb742c 100644 --- a/tests/threads/tthreadheapviolation1.nim +++ b/tests/threads/tthreadheapviolation1.nim @@ -6,7 +6,7 @@ discard """ var global: string = "test string" - t: TThread[void] + t: Thread[void] proc horrible() {.thread.} = global = "string in thread local heap!" diff --git a/tests/threads/ttryrecv.nim b/tests/threads/ttryrecv.nim index 28529b5ac..fc1f21321 100644 --- a/tests/threads/ttryrecv.nim +++ b/tests/threads/ttryrecv.nim @@ -15,7 +15,7 @@ proc doAction(outC: PComm) {.thread.} = send(outC[], i) var - thr: TThread[PComm] + thr: Thread[PComm] chan: TChannel[int] open(chan) diff --git a/tests/typerel/tnoargopenarray.nim b/tests/typerel/tnoargopenarray.nim index 3e65194ff..20ebe5ecc 100644 --- a/tests/typerel/tnoargopenarray.nim +++ b/tests/typerel/tnoargopenarray.nim @@ -1,7 +1,7 @@ import db_sqlite -var db: TDbConn +var db: DbConn exec(db, sql"create table blabla()") diff --git a/tests/types/tillegaltyperecursion.nim b/tests/types/tillegaltyperecursion.nim index 52fbd622f..6ead902b7 100644 --- a/tests/types/tillegaltyperecursion.nim +++ b/tests/types/tillegaltyperecursion.nim @@ -52,7 +52,7 @@ 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") send(irc.Socket,"NICK " & nick & "\r\L") - var thread: TThread[TIRC] + var thread: Thread[TIRC] createThread(thread, handleData, irc) irc.Thread = thread |