~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to lib/dialyzer/test/small_tests_SUITE.erl

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%% ATTENTION!
 
2
%% This is an automatically generated file. Do not edit.
 
3
%% Use './remake' script to refresh it if needed.
 
4
%% All Dialyzer options should be defined in dialyzer_options
 
5
%% file.
 
6
 
 
7
-module(small_tests_SUITE).
 
8
 
 
9
-include("ct.hrl").
 
10
-include("dialyzer_test_constants.hrl").
 
11
 
 
12
-export([suite/0, init_per_suite/0, init_per_suite/1,
 
13
         end_per_suite/1, all/0]).
 
14
-export([small_tests_SUITE_consistency/1, app_call/1, appmon_place/1, 
 
15
         areq/1, atom_call/1, atom_guard/1, atom_widen/1, 
 
16
         bs_fail_constr/1, bs_utf8/1, cerl_hipeify/1, comm_layer/1, 
 
17
         compare1/1, confusing_warning/1, contract2/1, contract3/1, 
 
18
         contract5/1, disj_norm_form/1, eqeq/1, ets_select/1, 
 
19
         exhaust_case/1, failing_guard1/1, flatten/1, fun_app/1, 
 
20
         fun_ref_match/1, fun_ref_record/1, gencall/1, gs_make/1, 
 
21
         inf_loop2/1, letrec1/1, list_match/1, lzip/1, make_tuple/1, 
 
22
         minus_minus/1, mod_info/1, my_filter/1, my_sofs/1, no_match/1, 
 
23
         no_unused_fun/1, no_unused_fun2/1, non_existing/1, 
 
24
         not_guard_crash/1, or_bug/1, orelsebug/1, orelsebug2/1, 
 
25
         overloaded1/1, port_info_test/1, process_info_test/1, pubsub/1, 
 
26
         receive1/1, record_construct/1, record_pat/1, 
 
27
         record_send_test/1, record_test/1, recursive_types1/1, 
 
28
         recursive_types2/1, recursive_types3/1, recursive_types4/1, 
 
29
         recursive_types5/1, recursive_types6/1, recursive_types7/1, 
 
30
         refine_bug1/1, toth/1, trec/1, try1/1, tuple1/1, 
 
31
         unsafe_beamcode_bug/1, unused_cases/1, unused_clauses/1, 
 
32
         zero_tuple/1]).
 
33
 
 
34
suite() ->
 
35
  [{timetrap, {minutes, 1}}].
 
36
 
 
37
init_per_suite() ->
 
38
  [{timetrap, ?plt_timeout}].
 
39
init_per_suite(Config) ->
 
40
  OutDir = ?config(priv_dir, Config),
 
41
  case dialyzer_common:check_plt(OutDir) of
 
42
    fail -> {skip, "Plt creation/check failed."};
 
43
    ok -> [{dialyzer_options, []}|Config]
 
44
  end.
 
45
 
 
46
end_per_suite(_Config) ->
 
47
  ok.
 
48
 
 
49
all() ->
 
50
  [small_tests_SUITE_consistency,app_call,appmon_place,areq,atom_call,
 
51
   atom_guard,atom_widen,bs_fail_constr,bs_utf8,cerl_hipeify,comm_layer,
 
52
   compare1,confusing_warning,contract2,contract3,contract5,disj_norm_form,
 
53
   eqeq,ets_select,exhaust_case,failing_guard1,flatten,fun_app,fun_ref_match,
 
54
   fun_ref_record,gencall,gs_make,inf_loop2,letrec1,list_match,lzip,
 
55
   make_tuple,minus_minus,mod_info,my_filter,my_sofs,no_match,no_unused_fun,
 
56
   no_unused_fun2,non_existing,not_guard_crash,or_bug,orelsebug,orelsebug2,
 
57
   overloaded1,port_info_test,process_info_test,pubsub,receive1,
 
58
   record_construct,record_pat,record_send_test,record_test,recursive_types1,
 
59
   recursive_types2,recursive_types3,recursive_types4,recursive_types5,
 
60
   recursive_types6,recursive_types7,refine_bug1,toth,trec,try1,tuple1,
 
61
   unsafe_beamcode_bug,unused_cases,unused_clauses,zero_tuple].
 
62
 
 
63
dialyze(Config, TestCase) ->
 
64
  Opts = ?config(dialyzer_options, Config),
 
65
  Dir = ?config(data_dir, Config),
 
66
  OutDir = ?config(priv_dir, Config),
 
67
  dialyzer_common:check(TestCase, Opts, Dir, OutDir).
 
68
 
 
69
small_tests_SUITE_consistency(Config) ->
 
70
  Dir = ?config(data_dir, Config),
 
71
  case dialyzer_common:new_tests(Dir, all()) of
 
72
    []  -> ok;
 
73
    New -> ct:fail({missing_tests,New})
 
74
  end.
 
75
 
 
76
app_call(Config) ->
 
77
  case dialyze(Config, app_call) of
 
78
    'same' -> 'same';
 
79
    Error  -> ct:fail(Error)
 
80
  end.
 
81
 
 
82
appmon_place(Config) ->
 
83
  case dialyze(Config, appmon_place) of
 
84
    'same' -> 'same';
 
85
    Error  -> ct:fail(Error)
 
86
  end.
 
87
 
 
88
areq(Config) ->
 
89
  case dialyze(Config, areq) of
 
90
    'same' -> 'same';
 
91
    Error  -> ct:fail(Error)
 
92
  end.
 
93
 
 
94
atom_call(Config) ->
 
95
  case dialyze(Config, atom_call) of
 
96
    'same' -> 'same';
 
97
    Error  -> ct:fail(Error)
 
98
  end.
 
99
 
 
100
atom_guard(Config) ->
 
101
  case dialyze(Config, atom_guard) of
 
102
    'same' -> 'same';
 
103
    Error  -> ct:fail(Error)
 
104
  end.
 
105
 
 
106
atom_widen(Config) ->
 
107
  case dialyze(Config, atom_widen) of
 
108
    'same' -> 'same';
 
109
    Error  -> ct:fail(Error)
 
110
  end.
 
111
 
 
112
bs_fail_constr(Config) ->
 
113
  case dialyze(Config, bs_fail_constr) of
 
114
    'same' -> 'same';
 
115
    Error  -> ct:fail(Error)
 
116
  end.
 
117
 
 
118
bs_utf8(Config) ->
 
119
  case dialyze(Config, bs_utf8) of
 
120
    'same' -> 'same';
 
121
    Error  -> ct:fail(Error)
 
122
  end.
 
123
 
 
124
cerl_hipeify(Config) ->
 
125
  case dialyze(Config, cerl_hipeify) of
 
126
    'same' -> 'same';
 
127
    Error  -> ct:fail(Error)
 
128
  end.
 
129
 
 
130
comm_layer(Config) ->
 
131
  case dialyze(Config, comm_layer) of
 
132
    'same' -> 'same';
 
133
    Error  -> ct:fail(Error)
 
134
  end.
 
135
 
 
136
compare1(Config) ->
 
137
  case dialyze(Config, compare1) of
 
138
    'same' -> 'same';
 
139
    Error  -> ct:fail(Error)
 
140
  end.
 
141
 
 
142
confusing_warning(Config) ->
 
143
  case dialyze(Config, confusing_warning) of
 
144
    'same' -> 'same';
 
145
    Error  -> ct:fail(Error)
 
146
  end.
 
147
 
 
148
contract2(Config) ->
 
149
  case dialyze(Config, contract2) of
 
150
    'same' -> 'same';
 
151
    Error  -> ct:fail(Error)
 
152
  end.
 
153
 
 
154
contract3(Config) ->
 
155
  case dialyze(Config, contract3) of
 
156
    'same' -> 'same';
 
157
    Error  -> ct:fail(Error)
 
158
  end.
 
159
 
 
160
contract5(Config) ->
 
161
  case dialyze(Config, contract5) of
 
162
    'same' -> 'same';
 
163
    Error  -> ct:fail(Error)
 
164
  end.
 
165
 
 
166
disj_norm_form(Config) ->
 
167
  case dialyze(Config, disj_norm_form) of
 
168
    'same' -> 'same';
 
169
    Error  -> ct:fail(Error)
 
170
  end.
 
171
 
 
172
eqeq(Config) ->
 
173
  case dialyze(Config, eqeq) of
 
174
    'same' -> 'same';
 
175
    Error  -> ct:fail(Error)
 
176
  end.
 
177
 
 
178
ets_select(Config) ->
 
179
  case dialyze(Config, ets_select) of
 
180
    'same' -> 'same';
 
181
    Error  -> ct:fail(Error)
 
182
  end.
 
183
 
 
184
exhaust_case(Config) ->
 
185
  case dialyze(Config, exhaust_case) of
 
186
    'same' -> 'same';
 
187
    Error  -> ct:fail(Error)
 
188
  end.
 
189
 
 
190
failing_guard1(Config) ->
 
191
  case dialyze(Config, failing_guard1) of
 
192
    'same' -> 'same';
 
193
    Error  -> ct:fail(Error)
 
194
  end.
 
195
 
 
196
flatten(Config) ->
 
197
  case dialyze(Config, flatten) of
 
198
    'same' -> 'same';
 
199
    Error  -> ct:fail(Error)
 
200
  end.
 
201
 
 
202
fun_app(Config) ->
 
203
  case dialyze(Config, fun_app) of
 
204
    'same' -> 'same';
 
205
    Error  -> ct:fail(Error)
 
206
  end.
 
207
 
 
208
fun_ref_match(Config) ->
 
209
  case dialyze(Config, fun_ref_match) of
 
210
    'same' -> 'same';
 
211
    Error  -> ct:fail(Error)
 
212
  end.
 
213
 
 
214
fun_ref_record(Config) ->
 
215
  case dialyze(Config, fun_ref_record) of
 
216
    'same' -> 'same';
 
217
    Error  -> ct:fail(Error)
 
218
  end.
 
219
 
 
220
gencall(Config) ->
 
221
  case dialyze(Config, gencall) of
 
222
    'same' -> 'same';
 
223
    Error  -> ct:fail(Error)
 
224
  end.
 
225
 
 
226
gs_make(Config) ->
 
227
  case dialyze(Config, gs_make) of
 
228
    'same' -> 'same';
 
229
    Error  -> ct:fail(Error)
 
230
  end.
 
231
 
 
232
inf_loop2(Config) ->
 
233
  case dialyze(Config, inf_loop2) of
 
234
    'same' -> 'same';
 
235
    Error  -> ct:fail(Error)
 
236
  end.
 
237
 
 
238
letrec1(Config) ->
 
239
  case dialyze(Config, letrec1) of
 
240
    'same' -> 'same';
 
241
    Error  -> ct:fail(Error)
 
242
  end.
 
243
 
 
244
list_match(Config) ->
 
245
  case dialyze(Config, list_match) of
 
246
    'same' -> 'same';
 
247
    Error  -> ct:fail(Error)
 
248
  end.
 
249
 
 
250
lzip(Config) ->
 
251
  case dialyze(Config, lzip) of
 
252
    'same' -> 'same';
 
253
    Error  -> ct:fail(Error)
 
254
  end.
 
255
 
 
256
make_tuple(Config) ->
 
257
  case dialyze(Config, make_tuple) of
 
258
    'same' -> 'same';
 
259
    Error  -> ct:fail(Error)
 
260
  end.
 
261
 
 
262
minus_minus(Config) ->
 
263
  case dialyze(Config, minus_minus) of
 
264
    'same' -> 'same';
 
265
    Error  -> ct:fail(Error)
 
266
  end.
 
267
 
 
268
mod_info(Config) ->
 
269
  case dialyze(Config, mod_info) of
 
270
    'same' -> 'same';
 
271
    Error  -> ct:fail(Error)
 
272
  end.
 
273
 
 
274
my_filter(Config) ->
 
275
  case dialyze(Config, my_filter) of
 
276
    'same' -> 'same';
 
277
    Error  -> ct:fail(Error)
 
278
  end.
 
279
 
 
280
my_sofs(Config) ->
 
281
  case dialyze(Config, my_sofs) of
 
282
    'same' -> 'same';
 
283
    Error  -> ct:fail(Error)
 
284
  end.
 
285
 
 
286
no_match(Config) ->
 
287
  case dialyze(Config, no_match) of
 
288
    'same' -> 'same';
 
289
    Error  -> ct:fail(Error)
 
290
  end.
 
291
 
 
292
no_unused_fun(Config) ->
 
293
  case dialyze(Config, no_unused_fun) of
 
294
    'same' -> 'same';
 
295
    Error  -> ct:fail(Error)
 
296
  end.
 
297
 
 
298
no_unused_fun2(Config) ->
 
299
  case dialyze(Config, no_unused_fun2) of
 
300
    'same' -> 'same';
 
301
    Error  -> ct:fail(Error)
 
302
  end.
 
303
 
 
304
non_existing(Config) ->
 
305
  case dialyze(Config, non_existing) of
 
306
    'same' -> 'same';
 
307
    Error  -> ct:fail(Error)
 
308
  end.
 
309
 
 
310
not_guard_crash(Config) ->
 
311
  case dialyze(Config, not_guard_crash) of
 
312
    'same' -> 'same';
 
313
    Error  -> ct:fail(Error)
 
314
  end.
 
315
 
 
316
or_bug(Config) ->
 
317
  case dialyze(Config, or_bug) of
 
318
    'same' -> 'same';
 
319
    Error  -> ct:fail(Error)
 
320
  end.
 
321
 
 
322
orelsebug(Config) ->
 
323
  case dialyze(Config, orelsebug) of
 
324
    'same' -> 'same';
 
325
    Error  -> ct:fail(Error)
 
326
  end.
 
327
 
 
328
orelsebug2(Config) ->
 
329
  case dialyze(Config, orelsebug2) of
 
330
    'same' -> 'same';
 
331
    Error  -> ct:fail(Error)
 
332
  end.
 
333
 
 
334
overloaded1(Config) ->
 
335
  case dialyze(Config, overloaded1) of
 
336
    'same' -> 'same';
 
337
    Error  -> ct:fail(Error)
 
338
  end.
 
339
 
 
340
port_info_test(Config) ->
 
341
  case dialyze(Config, port_info_test) of
 
342
    'same' -> 'same';
 
343
    Error  -> ct:fail(Error)
 
344
  end.
 
345
 
 
346
process_info_test(Config) ->
 
347
  case dialyze(Config, process_info_test) of
 
348
    'same' -> 'same';
 
349
    Error  -> ct:fail(Error)
 
350
  end.
 
351
 
 
352
pubsub(Config) ->
 
353
  case dialyze(Config, pubsub) of
 
354
    'same' -> 'same';
 
355
    Error  -> ct:fail(Error)
 
356
  end.
 
357
 
 
358
receive1(Config) ->
 
359
  case dialyze(Config, receive1) of
 
360
    'same' -> 'same';
 
361
    Error  -> ct:fail(Error)
 
362
  end.
 
363
 
 
364
record_construct(Config) ->
 
365
  case dialyze(Config, record_construct) of
 
366
    'same' -> 'same';
 
367
    Error  -> ct:fail(Error)
 
368
  end.
 
369
 
 
370
record_pat(Config) ->
 
371
  case dialyze(Config, record_pat) of
 
372
    'same' -> 'same';
 
373
    Error  -> ct:fail(Error)
 
374
  end.
 
375
 
 
376
record_send_test(Config) ->
 
377
  case dialyze(Config, record_send_test) of
 
378
    'same' -> 'same';
 
379
    Error  -> ct:fail(Error)
 
380
  end.
 
381
 
 
382
record_test(Config) ->
 
383
  case dialyze(Config, record_test) of
 
384
    'same' -> 'same';
 
385
    Error  -> ct:fail(Error)
 
386
  end.
 
387
 
 
388
recursive_types1(Config) ->
 
389
  case dialyze(Config, recursive_types1) of
 
390
    'same' -> 'same';
 
391
    Error  -> ct:fail(Error)
 
392
  end.
 
393
 
 
394
recursive_types2(Config) ->
 
395
  case dialyze(Config, recursive_types2) of
 
396
    'same' -> 'same';
 
397
    Error  -> ct:fail(Error)
 
398
  end.
 
399
 
 
400
recursive_types3(Config) ->
 
401
  case dialyze(Config, recursive_types3) of
 
402
    'same' -> 'same';
 
403
    Error  -> ct:fail(Error)
 
404
  end.
 
405
 
 
406
recursive_types4(Config) ->
 
407
  case dialyze(Config, recursive_types4) of
 
408
    'same' -> 'same';
 
409
    Error  -> ct:fail(Error)
 
410
  end.
 
411
 
 
412
recursive_types5(Config) ->
 
413
  case dialyze(Config, recursive_types5) of
 
414
    'same' -> 'same';
 
415
    Error  -> ct:fail(Error)
 
416
  end.
 
417
 
 
418
recursive_types6(Config) ->
 
419
  case dialyze(Config, recursive_types6) of
 
420
    'same' -> 'same';
 
421
    Error  -> ct:fail(Error)
 
422
  end.
 
423
 
 
424
recursive_types7(Config) ->
 
425
  case dialyze(Config, recursive_types7) of
 
426
    'same' -> 'same';
 
427
    Error  -> ct:fail(Error)
 
428
  end.
 
429
 
 
430
refine_bug1(Config) ->
 
431
  case dialyze(Config, refine_bug1) of
 
432
    'same' -> 'same';
 
433
    Error  -> ct:fail(Error)
 
434
  end.
 
435
 
 
436
toth(Config) ->
 
437
  case dialyze(Config, toth) of
 
438
    'same' -> 'same';
 
439
    Error  -> ct:fail(Error)
 
440
  end.
 
441
 
 
442
trec(Config) ->
 
443
  case dialyze(Config, trec) of
 
444
    'same' -> 'same';
 
445
    Error  -> ct:fail(Error)
 
446
  end.
 
447
 
 
448
try1(Config) ->
 
449
  case dialyze(Config, try1) of
 
450
    'same' -> 'same';
 
451
    Error  -> ct:fail(Error)
 
452
  end.
 
453
 
 
454
tuple1(Config) ->
 
455
  case dialyze(Config, tuple1) of
 
456
    'same' -> 'same';
 
457
    Error  -> ct:fail(Error)
 
458
  end.
 
459
 
 
460
unsafe_beamcode_bug(Config) ->
 
461
  case dialyze(Config, unsafe_beamcode_bug) of
 
462
    'same' -> 'same';
 
463
    Error  -> ct:fail(Error)
 
464
  end.
 
465
 
 
466
unused_cases(Config) ->
 
467
  case dialyze(Config, unused_cases) of
 
468
    'same' -> 'same';
 
469
    Error  -> ct:fail(Error)
 
470
  end.
 
471
 
 
472
unused_clauses(Config) ->
 
473
  case dialyze(Config, unused_clauses) of
 
474
    'same' -> 'same';
 
475
    Error  -> ct:fail(Error)
 
476
  end.
 
477
 
 
478
zero_tuple(Config) ->
 
479
  case dialyze(Config, zero_tuple) of
 
480
    'same' -> 'same';
 
481
    Error  -> ct:fail(Error)
 
482
  end.
 
483