From 6a8a409f1b8694e380e27afddff3cd9c29452b8c Mon Sep 17 00:00:00 2001 From: Araq Date: Sun, 31 Jul 2011 00:21:32 +0200 Subject: preparation for new 'is' operator; breaks bootstrapping again, sorry (use generated C code) --- tests/accept/run/teventemitter.nim | 2 +- tests/accept/run/tisopr.nim | 26 -------------------------- tests/accept/run/tofopr.nim | 26 ++++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 27 deletions(-) delete mode 100755 tests/accept/run/tisopr.nim create mode 100755 tests/accept/run/tofopr.nim (limited to 'tests/accept') diff --git a/tests/accept/run/teventemitter.nim b/tests/accept/run/teventemitter.nim index 166a0cb30..763f41943 100644 --- a/tests/accept/run/teventemitter.nim +++ b/tests/accept/run/teventemitter.nim @@ -4,7 +4,7 @@ type TEventArgs = object of TObject type TEventEmitter = object of TObject - events*: TTable[string, TDoublyLinkedList[proc(e : TEventArgs)]] + events*: TTable[string, TDoublyLinkedList[proc(e: TEventArgs)]] proc on*(emitter: var TEventEmitter, event: string, func: proc(e: TEventArgs)) = if not hasKey(emitter.events, event): var list: TDoublyLinkedList[proc(e: TEventArgs)] diff --git a/tests/accept/run/tisopr.nim b/tests/accept/run/tisopr.nim deleted file mode 100755 index 7e7a8f650..000000000 --- a/tests/accept/run/tisopr.nim +++ /dev/null @@ -1,26 +0,0 @@ -discard """ - file: "tisopr.nim" - output: "falsetrue" -""" -# Test is operator - -type - TMyType = object - len: int - data: string - - TOtherType = object of TMyType - -proc p(x: TMyType): bool = - return x is TOtherType - -var - m: TMyType - n: TOtherType - -write(stdout, p(m)) -write(stdout, p(n)) - -#OUT falsetrue - - diff --git a/tests/accept/run/tofopr.nim b/tests/accept/run/tofopr.nim new file mode 100755 index 000000000..f9c21ad16 --- /dev/null +++ b/tests/accept/run/tofopr.nim @@ -0,0 +1,26 @@ +discard """ + file: "tofopr.nim" + output: "falsetrue" +""" +# Test is operator + +type + TMyType = object + len: int + data: string + + TOtherType = object of TMyType + +proc p(x: TMyType): bool = + return x of TOtherType + +var + m: TMyType + n: TOtherType + +write(stdout, p(m)) +write(stdout, p(n)) + +#OUT falsetrue + + -- cgit 1.4.1-2-gfad0