7125b636f80379d42c6132e2f4e4dc175adbcabc
[ghc.git] / libraries / base / tests / all.T
1
2 test('readFloat', exit_code(1), compile_and_run, [''])
3 test('enumDouble', normal, compile_and_run, [''])
4 test('enumRatio', normal, compile_and_run, [''])
5 test('tempfiles', normal, compile_and_run, [''])
6 test('fixed', normal, compile_and_run, [''])
7 test('quotOverflow', normal, compile_and_run, [''])
8 test('assert', exit_code(1), compile_and_run, ['-fno-ignore-asserts'])
9 test('CPUTime001', normal, compile_and_run, [''])
10 test('readLitChar',   normal, compile_and_run, [''])
11 test('unicode001',
12      when(platform('i386-unknown-openbsd'), expect_fail),
13      compile_and_run,
14      [''])
15 test('unicode002',
16      when(platform('i386-unknown-openbsd'), expect_fail),
17      compile_and_run,
18      [''])
19 test('data-fixed-show-read', normal, compile_and_run, [''])
20 test('showDouble', normal, compile_and_run, [''])
21 test('readDouble001', normal, compile_and_run, [''])
22 test('readInteger001', normal, compile_and_run, [''])
23 test('readFixed001', normal, compile_and_run, [''])
24 test('lex001', normal, compile_and_run, [''])
25 test('take001', extra_run_opts('1'), compile_and_run, [''])
26 test('inits', normal, compile_and_run, [''])
27 test('genericNegative001', extra_run_opts('-1'), compile_and_run, [''])
28 test('ix001', normal, compile_and_run, [''])
29
30 # need to add -K64m to the compiler opts, so that GHCi gets it too
31 test('ioref001',
32      [when(fast(), skip),extra_run_opts('+RTS -K64m -RTS')],
33      compile_and_run,
34      ['+RTS -K64m -RTS'])
35
36 test('echo001', set_stdin("echo001.hs"), compile_and_run, [''])
37
38 test('hTell001', normal, compile_and_run, [''])
39
40 test('hTell002', normal, compile_and_run, [''])
41
42 test('performGC001', normal, compile_and_run, [''])
43
44 # optimisation screws up this test because some of the traces get commoned up
45 test('trace001', normal, compile_and_run, [''])
46
47 test('hGetBuf002', normal, compile_and_run, [''])
48 test('hGetBuf003', normal, compile_and_run, [''])
49 test('hPutBuf001', normal, compile_and_run, [''])
50 test('hPutBuf002', [], compile_and_run, [''])
51
52 test('char001',         normal, compile_and_run, [''])
53 test('char002',         normal, compile_and_run, [''])
54
55 test('cstring001',      normal, compile_and_run, [''])
56
57 test('length001',
58      # length001 depends on a RULE being applied, and without -O takes
59      # excessive amounts of stack space. So we specifically set a low
60      # stack limit and mark it as failing under a few conditions.
61      [extra_run_opts('+RTS -K8m -RTS'),
62      expect_fail_for(['normal', 'threaded1', 'llvm'])],
63      compile_and_run, [''])
64
65 test('ratio001',        normal, compile_and_run, [''])
66
67 test('rand001',         reqlib('random'), compile_and_run, [''])
68 test('reads001',                normal, compile_and_run, [''])
69 test('show001',         normal, compile_and_run, [''])
70 test('text001',         normal, compile_and_run, [''])
71
72 test('tup001',          normal, compile_and_run, [''])
73
74 test('addr001',         normal, compile_and_run, [''])
75 test('dynamic001',      normal, compile_and_run, [''])
76 test('dynamic002',      normal, compile_and_run, [''])
77 test('dynamic003',      extra_run_opts('+RTS -K32m -RTS'), compile_and_run, [''])
78 test('dynamic004',      omit_ways(['normal', 'threaded1', 'ghci']), compile_and_run, [''])
79 test('dynamic005',      normal, compile_and_run, [''])
80
81 enum_setups = [when(fast(), skip)]
82 test('enum01',          enum_setups, compile_and_run, [''])
83 test('enum02',          enum_setups, compile_and_run, [''])
84 test('enum03',          enum_setups, compile_and_run, [''])
85 test('enum04',          normal, compile_and_run, [''])
86
87 test('exceptionsrun001',        normal, compile_and_run, [''])
88 test('exceptionsrun002',        normal, compile_and_run, [''])
89 test('foldableArray',   normal, compile_and_run, [''])
90 test('list001'  ,       when(fast(), skip), compile_and_run, [''])
91 test('list002', when(fast(), skip), compile_and_run, [''])
92 test('list003', when(fast(), skip), compile_and_run, [''])
93 test('isSuffixOf', normal, compile_and_run, [''])
94
95 test('memo001', [extra_run_opts('+RTS -A10k -RTS')], multimod_compile_and_run,
96      ['memo001', ''])
97
98 test('memo002', [extra_run_opts('20')], multimod_compile_and_run,
99      ['memo002', ''])
100
101 test('stableptr001',
102      [when(fast(), skip), extra_run_opts('+RTS -K8m -RTS')],
103      compile_and_run, [''])
104 test('stableptr003', normal, compile_and_run, [''])
105 test('stableptr004', extra_run_opts('+RTS -K4m -RTS'), compile_and_run, [''])
106 test('stableptr005', normal, compile_and_run, [''])
107
108 test('weak001', normal, compile_and_run, [''])
109
110 test('T2528', normal, compile_and_run, [''])
111
112 # In the 65001 codepage, we can't even cat the expected output on msys:
113 #     $ cat 4006.stdout
114 #     It works here
115 #     cat: write error: Permission denied
116 # Seems to be a known problem, e.g.
117 #     http://mingw-users.1079350.n2.nabble.com/Bug-re-Unicode-on-the-console-td3121717.html
118 # May 2014: seems to work on msys2
119 test('T4006', normal, compile_and_run, [''])
120
121 test('T5943', normal, compile_and_run, [''])
122 test('T5962', normal, compile_and_run, [''])
123 test('T7034', normal, compile_and_run, [''])
124
125 test('qsem001', normal, compile_and_run, [''])
126 test('qsemn001', normal, compile_and_run, [''])
127
128 test('T7457', normal, compile_and_run, [''])
129
130 test('T7773', when(opsys('mingw32'), skip), compile_and_run, [''])
131 # Andreas says that T7773 will not (and should not) work on Windows
132
133 # Tests for kind-polymorphic Category
134 test('CatPairs', normal, compile, [''])
135 test('CatEntail', normal, compile, [''])
136
137 # When running with WAY=ghci, T7653 uses a lot of memory.
138 test('T7653', high_memory_usage, compile_and_run, [''])
139 test('T7787', normal, compile_and_run, [''])
140
141 test('topHandler01', when(opsys('mingw32'), skip), compile_and_run, [''])
142 test('topHandler02',
143      [when(opsys('mingw32'), skip),
144       omit_ways(['ghci']),
145       signal_exit_code(2)
146      ], compile_and_run, [''])
147 test('topHandler03',
148      [when(opsys('mingw32'), skip), ignore_stderr,
149       signal_exit_code(15)
150      ], compile_and_run, [''])
151 test('topHandler04',
152      [when(opsys('mingw32'), skip),
153       exit_code(1)
154      ], compile_and_run, [''])
155
156
157 test('T8766',
158         [ stats_num_field('bytes allocated',
159                           [ (wordsize(64), 16828144, 5)
160         # with GHC-7.6.3: 83937384 (but faster execution than the next line)
161         # before:         58771216 (without call-arity-analysis)
162         # expected value: 16828144 (2014-01-14)
163                           , (wordsize(32), 8433644, 5) ])
164         , only_ways(['normal'])],
165       compile_and_run,
166       ['-O'])
167
168 test('T9111', normal, compile, [''])
169 test('T9395', normal, compile_and_run, [''])
170 # Fails for debug way due to annotation linting timeout
171 test('T9532', omit_ways(['debug']), compile_and_run, [''])
172 test('T9586', normal, compile, [''])
173 test('T9681', normal, compile_fail, [''])
174 # Test no runtime crash. Report success and kill with `timeout` (exit code 99)
175 # after a few seconds. From https://phabricator.haskell.org/D1075:
176 #
177 #   "I used a fairly conservative timeout. IF there is a regression it will
178 #   crash as soon as the timeout's C call is done. The tricky bit is
179 #   guesstimating how much time it needs to run to guarantee it's reached the
180 #   C call.
181 #   Probably something like 1s is already enough, but I don't know enough to
182 #   make an educated guess how long it needs to be guaranteed to reach the C
183 #   call."
184 test('T8089',
185      [exit_code(99), run_timeout_multiplier(0.01)],
186      compile_and_run, [''])
187 test('T9826',normal, compile_and_run,[''])
188 test('T9848',
189         [ stats_num_field('bytes allocated',
190                           [ (wordsize(64), 51840, 20)
191                           , (wordsize(32), 47348, 20) ])
192         , only_ways(['normal'])],
193       compile_and_run,
194       ['-O'])
195 test('T10149', normal, compile_and_run, [''])
196 test('T11334a', normal, compile_and_run, [''])
197 test('T11555', normal, compile_and_run, [''])
198 test('T12852', when(opsys('mingw32'), skip), compile_and_run, [''])
199 test('lazySTexamples', normal, compile_and_run, [''])
200 test('T11760', normal, compile_and_run, ['-threaded -with-rtsopts=-N2'])
201 test('T13191',
202         [ stats_num_field('bytes allocated',
203                           [ (wordsize(64), 185943272, 5) ])
204         # with GHC-8.1 before liftA2 change: 325065128
205         # GHC-8.1 with custom liftA2:        185943272
206         , only_ways(['normal'])],
207       compile_and_run,
208       ['-O'])