summary refs log tree commit diff stats
path: root/tests/closure/tnestedclosure.nim
diff options
context:
space:
mode:
authorMiran <narimiran@users.noreply.github.com>2018-10-12 17:02:46 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-10-12 17:02:46 +0200
commit7f18d7cbc1fc8ad87c389b8d4d873e1d1169f794 (patch)
tree8c4839495fd6fc10376dc44cc8f9c7e3c625d18f /tests/closure/tnestedclosure.nim
parentd2b04a8bc7a78845d25e8b789184ae54e98073ec (diff)
downloadNim-7f18d7cbc1fc8ad87c389b8d4d873e1d1169f794.tar.gz
Merge tests into a larger file (part 1 of ∞) (#9318)
* merge actiontable tests

* merge arithm tests

* merge array tests

* merge assign tests

* merge bind tests

* merge casestmt tests

* merge closure tests

* merge cnt seq tests

* merge collections tests

* merge concept issues tests

* merge concept tests

* fix failing tests

* smaller outputs

Use `doAssert` where possible.

* fix wrong output

* split `tcomputedgoto`

* revert merging concepts

* fix failing test
Diffstat (limited to 'tests/closure/tnestedclosure.nim')
-rw-r--r--tests/closure/tnestedclosure.nim51
1 files changed, 0 insertions, 51 deletions
diff --git a/tests/closure/tnestedclosure.nim b/tests/closure/tnestedclosure.nim
deleted file mode 100644
index 0628a6977..000000000
--- a/tests/closure/tnestedclosure.nim
+++ /dev/null
@@ -1,51 +0,0 @@
-discard """
-  output: '''foo88
-23 24foo 88
-foo88
-23 24foo 88
-hohoho'''
-"""
-
-# test nested closure
-proc main(param: int) =
-  var foo = 23
-  proc outer(outerParam: string) =
-    var outerVar = 88
-    echo outerParam, outerVar
-    proc inner() =
-      block Test:
-        echo foo, " ", param, outerParam, " ", outerVar
-    inner()
-  outer("foo")
-
-# test simple closure within dummy 'main':
-proc dummy =
-  proc main2(param: int) =
-    var fooB = 23
-    proc outer(outerParam: string) =
-      var outerVar = 88
-      echo outerParam, outerVar
-      proc inner() =
-        block Test:
-          echo fooB, " ", param, outerParam, " ", outerVar
-      inner()
-    outer("foo")
-  main2(24)
-
-dummy()
-
-main(24)
-
-# Jester + async triggered this bug:
-proc cbOuter() =
-  var response = "hohoho"
-  block:
-    proc cbIter() =
-      block:
-        proc fooIter() =
-          echo response
-        fooIter()
-
-    cbIter()
-
-cbOuter()
er Andreas Rumpf <rumpf_a@web.de> 2019-01-17 08:00:44 +0100 [CI] now enables `NIM_COMPILE_TO_CPP=true` to run without allow_failures (#10315)' href='/ahoang/Nim/commit/.travis.yml?h=devel&id=42bac52426bf392fcfa3cfeeee716bec3166b709'>42bac5242 ^
b45483f86 ^
d93749b17 ^
517312467 ^

1d00f7f9d ^
517312467 ^


e5aefbd1d ^
911551aae ^
6a94599d6 ^




ae5a4cea9 ^
363b1c0a4 ^
1d00f7f9d ^





8f6a275f4 ^
fbe7bf3c8 ^
1d00f7f9d ^

c60916a2a ^
a01fd5e93 ^
aa0a9dd78 ^
a01fd5e93 ^
aa0a9dd78 ^
c60916a2a ^
308710c1e ^



2e5c75973 ^
308710c1e ^







cf323104f ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92