source: trunk/t3q-examples/checkLogFormat/checkLogFormat.ttcn3 @ 37

Last change on this file since 37 was 4, checked in by phdmakk, 15 years ago
File size: 1.7 KB
Line 
1module checkLogFormatModule {
2
3    function f_1 ()
4    runs on myComponent {
5
6        //incorrect
7        log ( "***" )
8    }
9
10
11    const integer c_1 := 1;
12
13    testcase t_sendMsg ()
14    runs on myComponent {
15
16        // correct
17        log ( "*** t_sendMsg: INFO: Wrong message has been received ***" )
18        f_1 (); //if this statement were absent
19                //and subsequent log processing enabled
20                //the above log sattement will be analyzed
21                //together with the following split log statements
22
23        // also correct, given subsequent log processing is enabled
24        log ( "*** t_sendMsg: " );
25        log ( "INFO: " );
26        log ( "Wrong message has been received ***" );
27        f_1 ();
28
29        //correct , given subsequent log processing is enabled
30        log ( "*** t_sendMsg: " );
31        log ( "INFO: " );
32        log ( f_2 () );
33        log ( "Wrong message has been received ***" );
34        f_1 ();
35
36        // some simple malformed log statements
37        //will be combined as one if subsequent log processing is enabled
38        log ( "*** : INFORMATION: Wrong message has been received ***" )
39        log ( "** t_sendMsg: INFO: Wrong message has been received **" )
40        log ( "*** t_sendMsg22: INFO: Wrong message has been received ***" )
41        log ( "*** t_sendMsg: INFORMATION: Wrong message has been received ***" )
42
43        //correct under different configuration / not combined with the above
44        log ( "*** INFO: Wrong message has been received ***" );
45    }
46
47    control {
48
49        //incorrect
50        log ( ".." );
51
52        //correct, if not combined with the above
53        log ( "*** t_sendMsg22: INFO: Wrong message has been received ***" )
54    }
55}
Note: See TracBrowser for help on using the repository browser.