1 | module testcases { |
---|
2 | //sample test case with full body, multiple parameters, with modifiers, runs on and system clauses |
---|
3 | testcase tc_sample2 ( |
---|
4 | template R3Msg p_radiusAccntReq, |
---|
5 | out template R3Msg p_radiusAccntRsp ) |
---|
6 | runs on R3Comp |
---|
7 | system R3System { |
---|
8 | var FncRetCode v_ret := e_success; |
---|
9 | |
---|
10 | alt { |
---|
11 | [] r3Port.receive ( m_r3MonitorInd ( p_radiusAccntReq ) ) { |
---|
12 | v_ret := e_success; |
---|
13 | } |
---|
14 | [] r3Port.receive ( m_r3MonitorInd ( |
---|
15 | e_RadiusAccountingRequest, |
---|
16 | p_radiusAccntReq ) ) { |
---|
17 | v_ret := e_success; |
---|
18 | } |
---|
19 | [] r3Port.receive ( m_r3MonitorInd ( |
---|
20 | e_RadiusAccountingRequest, |
---|
21 | m_radiusAccntReq_any ) ) { |
---|
22 | } |
---|
23 | [] a_sample2 (m_r3MonitorInd,m_r3MonitorInd); |
---|
24 | [] a_sample1 (m_r3MonitorInd); |
---|
25 | [] a_sample0 (); |
---|
26 | } |
---|
27 | |
---|
28 | } |
---|
29 | //sample test case skeleton with a single parameter, including a passing mode, with a runs on clause |
---|
30 | testcase tc_sample1 (in template R3Msg p_radiusAccntReq) |
---|
31 | runs on R3Comp { |
---|
32 | } |
---|
33 | |
---|
34 | //test tcase skeleton with a single parameter, with a runs on clause and a system clause |
---|
35 | testcase tc_sample11 (template R3Msg p_radiusAccntReq) |
---|
36 | runs on R3Comp system R3System { |
---|
37 | f_sample(); |
---|
38 | f_sample1(p_radiusAccntReq); |
---|
39 | f_sample2(p_radiusAccntReq,p_radiusAccntRsp) |
---|
40 | } |
---|
41 | |
---|
42 | //test case skeleton without parameters, with a runs on clause |
---|
43 | testcase tc_sample () |
---|
44 | runs on R3Comp { |
---|
45 | } |
---|
46 | |
---|
47 | |
---|
48 | testcase tc_sample_procedurebased() runs on sampleComponent system systemComponent{ |
---|
49 | port1.call(s_lookup:{x}) { |
---|
50 | []port1.getreply(s_accept:{y}) { |
---|
51 | |
---|
52 | } |
---|
53 | } |
---|
54 | } |
---|
55 | |
---|
56 | control{ |
---|
57 | execute(tc_sample1(template_sample1 := template_sample2)); |
---|
58 | execute(tc_sample2(template_sample1,template_sample2)); |
---|
59 | execute(tc_sample()); |
---|
60 | } |
---|
61 | |
---|
62 | |
---|
63 | } |
---|