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:6.2.1.1, verify that dot notation can be used for referencing sub-elements on the right hand side of an assignement
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
16 // The following requirement is tested:
17 // Elements of a record shall be referenced by the dot notation TypeIdOrExpression.ElementId,
18 // where TypeIdOrExpression resolves to the name of a structured type or an expression of
19 // a structured type such as variable, formal parameter, module parameter, constant, template,
20 // or function invocation. ElementId shall resolve to the name of a field in the structured
23 module Sem_06020101_ReferencingRecordFields_006 {
25 type component GeneralComp {
32 charstring field2 optional
35 testcase TC_Sem_06020101_ReferencingRecordFields_006() runs on GeneralComp {
36 var R v_rec := { field1 := { subfield1 := 5 }, field2 := "abc" };
37 if (v_rec.field1.subfield1 == 5) {
45 execute(TC_Sem_06020101_ReferencingRecordFields_006());