Line | |
---|
1 | module checkExternalFunctionInvocationFollowedByLogStatement { |
---|
2 | external function fx_example1(); |
---|
3 | external function fx_example2(integer p_int) return integer; |
---|
4 | external function fx_example2(charstring p_cs) return charstring; |
---|
5 | |
---|
6 | //inconclusive - in a constant definition |
---|
7 | const integer c := fx_example1(1); |
---|
8 | |
---|
9 | //inconclusive - unresolved |
---|
10 | function f_example1() { |
---|
11 | fx_example0(); |
---|
12 | } |
---|
13 | |
---|
14 | //bad - at the end of a scope |
---|
15 | function f_example1() { |
---|
16 | fx_example1(); |
---|
17 | } |
---|
18 | |
---|
19 | //bad - followed |
---|
20 | function f_example2() { |
---|
21 | fx_example1(); |
---|
22 | log("External Function fx_example1 called!") |
---|
23 | } |
---|
24 | |
---|
25 | //bad - at the end of a scope without SemiColon |
---|
26 | function f_example3() { |
---|
27 | fx_example1() |
---|
28 | } |
---|
29 | |
---|
30 | //bad - at the end of a scope without SemiColon, followed |
---|
31 | function f_example4() { |
---|
32 | fx_example1() |
---|
33 | log("External Function fx_example1 called!") |
---|
34 | } |
---|
35 | |
---|
36 | //multiple |
---|
37 | testcase tc1() runs on mtcType system systemType { |
---|
38 | //bad |
---|
39 | fx_example1(); |
---|
40 | log("External Function fx_example1 called!") |
---|
41 | f_example1(); |
---|
42 | |
---|
43 | //good |
---|
44 | log("External Function fx_example1 called!") |
---|
45 | fx_example1(); |
---|
46 | |
---|
47 | f_example2() |
---|
48 | |
---|
49 | //bad |
---|
50 | fx_example1() |
---|
51 | |
---|
52 | //bad |
---|
53 | fx_example1(); |
---|
54 | log("External Function fx_example1 called!") |
---|
55 | } |
---|
56 | |
---|
57 | control { |
---|
58 | execute(tc1()); |
---|
59 | } |
---|
60 | |
---|
61 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.