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

« back to all changes in this revision

Viewing changes to lib/dialyzer/test/opaque_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(opaque_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([opaque_tests_SUITE_consistency/1, array/1, crash/1, dict/1, 
 
15
         ets/1, gb_sets/1, inf_loop1/1, int/1, mixed_opaque/1, 
 
16
         my_digraph/1, my_queue/1, opaque/1, queue/1, rec/1, timer/1, 
 
17
         union/1, wings/1, zoltan_kis1/1, zoltan_kis2/1, zoltan_kis3/1, 
 
18
         zoltan_kis4/1, zoltan_kis5/1, zoltan_kis6/1]).
 
19
 
 
20
suite() ->
 
21
  [{timetrap, {minutes, 1}}].
 
22
 
 
23
init_per_suite() ->
 
24
  [{timetrap, ?plt_timeout}].
 
25
init_per_suite(Config) ->
 
26
  OutDir = ?config(priv_dir, Config),
 
27
  case dialyzer_common:check_plt(OutDir) of
 
28
    fail -> {skip, "Plt creation/check failed."};
 
29
    ok -> [{dialyzer_options, [{warnings,[no_unused,no_return]}]}|Config]
 
30
  end.
 
31
 
 
32
end_per_suite(_Config) ->
 
33
  ok.
 
34
 
 
35
all() ->
 
36
  [opaque_tests_SUITE_consistency,array,crash,dict,ets,gb_sets,inf_loop1,int,
 
37
   mixed_opaque,my_digraph,my_queue,opaque,queue,rec,timer,union,wings,
 
38
   zoltan_kis1,zoltan_kis2,zoltan_kis3,zoltan_kis4,zoltan_kis5,zoltan_kis6].
 
39
 
 
40
dialyze(Config, TestCase) ->
 
41
  Opts = ?config(dialyzer_options, Config),
 
42
  Dir = ?config(data_dir, Config),
 
43
  OutDir = ?config(priv_dir, Config),
 
44
  dialyzer_common:check(TestCase, Opts, Dir, OutDir).
 
45
 
 
46
opaque_tests_SUITE_consistency(Config) ->
 
47
  Dir = ?config(data_dir, Config),
 
48
  case dialyzer_common:new_tests(Dir, all()) of
 
49
    []  -> ok;
 
50
    New -> ct:fail({missing_tests,New})
 
51
  end.
 
52
 
 
53
array(Config) ->
 
54
  case dialyze(Config, array) of
 
55
    'same' -> 'same';
 
56
    Error  -> ct:fail(Error)
 
57
  end.
 
58
 
 
59
crash(Config) ->
 
60
  case dialyze(Config, crash) of
 
61
    'same' -> 'same';
 
62
    Error  -> ct:fail(Error)
 
63
  end.
 
64
 
 
65
dict(Config) ->
 
66
  case dialyze(Config, dict) of
 
67
    'same' -> 'same';
 
68
    Error  -> ct:fail(Error)
 
69
  end.
 
70
 
 
71
ets(Config) ->
 
72
  case dialyze(Config, ets) of
 
73
    'same' -> 'same';
 
74
    Error  -> ct:fail(Error)
 
75
  end.
 
76
 
 
77
gb_sets(Config) ->
 
78
  case dialyze(Config, gb_sets) of
 
79
    'same' -> 'same';
 
80
    Error  -> ct:fail(Error)
 
81
  end.
 
82
 
 
83
inf_loop1(Config) ->
 
84
  case dialyze(Config, inf_loop1) of
 
85
    'same' -> 'same';
 
86
    Error  -> ct:fail(Error)
 
87
  end.
 
88
 
 
89
int(Config) ->
 
90
  case dialyze(Config, int) of
 
91
    'same' -> 'same';
 
92
    Error  -> ct:fail(Error)
 
93
  end.
 
94
 
 
95
mixed_opaque(Config) ->
 
96
  case dialyze(Config, mixed_opaque) of
 
97
    'same' -> 'same';
 
98
    Error  -> ct:fail(Error)
 
99
  end.
 
100
 
 
101
my_digraph(Config) ->
 
102
  case dialyze(Config, my_digraph) of
 
103
    'same' -> 'same';
 
104
    Error  -> ct:fail(Error)
 
105
  end.
 
106
 
 
107
my_queue(Config) ->
 
108
  case dialyze(Config, my_queue) of
 
109
    'same' -> 'same';
 
110
    Error  -> ct:fail(Error)
 
111
  end.
 
112
 
 
113
opaque(Config) ->
 
114
  case dialyze(Config, opaque) of
 
115
    'same' -> 'same';
 
116
    Error  -> ct:fail(Error)
 
117
  end.
 
118
 
 
119
queue(Config) ->
 
120
  case dialyze(Config, queue) of
 
121
    'same' -> 'same';
 
122
    Error  -> ct:fail(Error)
 
123
  end.
 
124
 
 
125
rec(Config) ->
 
126
  case dialyze(Config, rec) of
 
127
    'same' -> 'same';
 
128
    Error  -> ct:fail(Error)
 
129
  end.
 
130
 
 
131
timer(Config) ->
 
132
  case dialyze(Config, timer) of
 
133
    'same' -> 'same';
 
134
    Error  -> ct:fail(Error)
 
135
  end.
 
136
 
 
137
union(Config) ->
 
138
  case dialyze(Config, union) of
 
139
    'same' -> 'same';
 
140
    Error  -> ct:fail(Error)
 
141
  end.
 
142
 
 
143
wings(Config) ->
 
144
  case dialyze(Config, wings) of
 
145
    'same' -> 'same';
 
146
    Error  -> ct:fail(Error)
 
147
  end.
 
148
 
 
149
zoltan_kis1(Config) ->
 
150
  case dialyze(Config, zoltan_kis1) of
 
151
    'same' -> 'same';
 
152
    Error  -> ct:fail(Error)
 
153
  end.
 
154
 
 
155
zoltan_kis2(Config) ->
 
156
  case dialyze(Config, zoltan_kis2) of
 
157
    'same' -> 'same';
 
158
    Error  -> ct:fail(Error)
 
159
  end.
 
160
 
 
161
zoltan_kis3(Config) ->
 
162
  case dialyze(Config, zoltan_kis3) of
 
163
    'same' -> 'same';
 
164
    Error  -> ct:fail(Error)
 
165
  end.
 
166
 
 
167
zoltan_kis4(Config) ->
 
168
  case dialyze(Config, zoltan_kis4) of
 
169
    'same' -> 'same';
 
170
    Error  -> ct:fail(Error)
 
171
  end.
 
172
 
 
173
zoltan_kis5(Config) ->
 
174
  case dialyze(Config, zoltan_kis5) of
 
175
    'same' -> 'same';
 
176
    Error  -> ct:fail(Error)
 
177
  end.
 
178
 
 
179
zoltan_kis6(Config) ->
 
180
  case dialyze(Config, zoltan_kis6) of
 
181
    'same' -> 'same';
 
182
    Error  -> ct:fail(Error)
 
183
  end.
 
184