1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Adrien Kirjak – initial implementation
12 ** @purpose 1:20.5.1, verify that deactivate removes default from list of defaults
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
16 // The following requirement is tested:
17 // A deactivate operation will remove the referenced default from the list of defaults.
20 // The test verifies syntactical variant with a function instance passed as a parameter
21 // to the deactivate operation.
23 module Sem_200503_the_deactivate_operation_002 {
27 } with {extension "internal"}
29 type component GeneralComp {
33 altstep a1() runs on GeneralComp {
34 [] p.receive(integer:?) {
39 altstep a2() runs on GeneralComp {
40 [] p.receive(integer:?) {
41 setverdict(fail, "Deactivated"); // should be deactivated at the time of default processing
45 function f(default p_default) return default {
49 testcase TC_Sem_200503_the_deactivate_operation_002() runs on GeneralComp {
50 var default v_default;
52 v_default := activate(a2());
54 connect(self:p, self:p);
57 deactivate(f(v_default));
60 [] p.receive(integer:0) { // not expected: leads to default invocation
67 execute(TC_Sem_200503_the_deactivate_operation_002());