diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ba077a4031add5b3a04384f8b9cfc414efbf47dd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bin diff --git a/Eclipse_Designer_userguide.doc b/Eclipse_Designer_userguide.doc new file mode 100755 index 0000000000000000000000000000000000000000..e89a617a74144b18c3eba0687512e59c4db57b29 Binary files /dev/null and b/Eclipse_Designer_userguide.doc differ diff --git a/Eclipse_Executor_userguide.doc b/Eclipse_Executor_userguide.doc new file mode 100644 index 0000000000000000000000000000000000000000..799641eac09dd271e1ad096d9e9379a8c86162da Binary files /dev/null and b/Eclipse_Executor_userguide.doc differ diff --git a/Eclipse_installationguide.doc b/Eclipse_installationguide.doc new file mode 100644 index 0000000000000000000000000000000000000000..0bddb687bbbb7c7ca8edb53264e8b00b98abcab9 Binary files /dev/null and b/Eclipse_installationguide.doc differ diff --git a/README b/README new file mode 100644 index 0000000000000000000000000000000000000000..b3409eb4054de28162add66ceddc4f48330466bc --- /dev/null +++ b/README @@ -0,0 +1,114 @@ +############################################################################### +# Copyright (c) 2000-2014 Ericsson Telecom AB +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +############################################################################### +#README file for the innersourced Titan Eclipse plugins project + +1. VERSION REQUIREMENTS + +Java 1.6 or higher, recommended: 1.7 +ANTLR UI 4.1.3 with ANTLR 2.7.6 or 2.7.7 +Ant 1.9.2 or higher + NOTE: Build will not work below 1.8 for sure! +Eclipse Standard or Java 3.6 (Helios) or higher, recommended 4.4 (Luna) + +---------------------- +2. SETTING UP ECLIPSE FOR TITAN DEVELOPMENT + +2.1. Installing Eclipse plug-ins: +Eclipse -> Help -> Install New Software... + Contact all update sites during install to find required software -> ALWAYS SWITCH OFF (it can cause problems) + +ANTLR +http://antlreclipse.sourceforge.net/updates/ + +Titan plug-ins +from the Titan update site +TODO: add URL + +Set the new JDK in Window -> Preferences -> Java -> Installed JREs + +Window->Preferences->TITAN Preferences: + TITAN installation path: /titan/Install + License file (optional, only if license checking is switched on): /home//license_.dat + +2.2. Importing Titan plug-in projects to Eclipse +Add "Git Repository Exploring" perspective +Add an existing local Git repository + Choose titan and titan_eclipse, finish +titan_eclipse: right click -> import projects... -> next -> finish + +2.3. Other recommended settings +Project property (right click, properties) -> TITAN Project Property -> Internal makefile creation attributes (middle tab) -> + Include source line info in C++ code (-l) -> switch on + Add source line info for logging (-L) -> switch on + +Add TITAN Editing perspective +Add TITAN Executing perspective + +windows/customize perspective/commands groups availability -> "Launch" switch on + +---------------------- +3. SWITCHING ON TITAN LICENSE CHECKING AND USAGE STATISTICS SENDING + +By default Titan license checking and usage statistics sending are switched off. You can switch them on by running the following script: + +/titan_eclipse/license.sh + +It modifies the source, you need to rebuild org.eclipse.titan.common plug-in project. + +---------------------- +4. BUILDING AND INSTALLING TITAN PLUG-INS FROM COMMAND LINE WITH ANT + +4.1. BUILDING TITAN PLUG-INS FROM COMMAND LINE WITH ANT +cd /titan_eclipse/automatic_build +ant -f build_main.xml -lib /antlr.jar + +antlr.jar is installed in this directory: /plugins/org.antlr_2.7.... +target can be one of the following: + common.plugin + designer.plugin + executor.plugin + help.plugin + logviewer.plugin + debug.plugin + regressiontests.plugin + titanium.plugin + titanium.regressiontests.plugin + +Make sure, that the following environment variables are set to a valid directory/file: + +JAVA_HOME +ECLIPSE_HOME +compiler.location: this is the titan project directory: /titan +java6: a java6 executable +updatesite.experimental.location: output directory for experimental update site (optional) +updatesites.tmp.location: temporary output directory for experimental update site (optional) +zip.dir: output directory for zip package that contains all the plug-ins (optional) + +These variables can be set by editing /titan_eclipse/automatic_build/build_config.xml +and also in the command, here is a working example: + +ant -f build_main.xml \ +-lib $HOME/eclipse/plugins/org.antlr_2.7.6.20140628-1000/antlr.jar \ +-DJAVA_HOME=$HOME/jdk/ \ +-DECLIPSE_HOME=$HOME/eclipse/ \ +-Dcompiler.location=$HOME/git/titan/ \ +-Djava6=$HOME/jdk/bin/java \ +designer.plugin + +4.2. INSTALLING PLUG-INS TO ECLIPSE +The plug-in jars are created in result/plugins/ directory. +Copy these *.jar files to $ECLIPSE_HOME/plugins/ directory. + +---------------------- +5. BUILDING PLUG-INS WITH ONLY ANTLR 4 DEPENDENCIES + +cd automatic_build +./setv4.sh + +This script sets the project to use only ANTLR 4 dependent parsers, and removes source files with unnecessary dependencies +After this step plug-ins can be built and installed as it is described in chapter 4. diff --git a/Regression_test_project/.TITAN_properties b/Regression_test_project/.TITAN_properties new file mode 100644 index 0000000000000000000000000000000000000000..2860dc378943540bf65ee6975ec257c5c62aa7fc --- /dev/null +++ b/Regression_test_project/.TITAN_properties @@ -0,0 +1,16 @@ + + + Default + + + false + true + true + bin\Regression_test_project.exe + + + + bin + + + \ No newline at end of file diff --git a/Regression_test_project/.project b/Regression_test_project/.project new file mode 100644 index 0000000000000000000000000000000000000000..0e22b95faaf97ea9983cbac09c2e6c0a0ed253aa --- /dev/null +++ b/Regression_test_project/.project @@ -0,0 +1,18 @@ + + + Regression_test_project + + + + + + org.eclipse.titan.designer.core.TITANBuilder + + + + + + org.eclipse.titan.designer.core.TITANNature + org.eclipse.titan.log.viewer.TitanLogProject + + diff --git a/Regression_test_project/src/MyExample.cfg b/Regression_test_project/src/MyExample.cfg new file mode 100644 index 0000000000000000000000000000000000000000..2e37664a116eb212423d0f0b1184a5c8bd62c953 --- /dev/null +++ b/Regression_test_project/src/MyExample.cfg @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2000-2014 Ericsson Telecom AB +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +############################################################################### +[LOGGING] +LogFile := "MyExample.log" +FileMask := LOG_ALL +ConsoleMask := ERROR | TESTCASE | STATISTICS + +[EXECUTE] +MyExample.control diff --git a/Regression_test_project/src/MyExample.ttcn b/Regression_test_project/src/MyExample.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ea458ae0bc57cbd98e6a47226e4a2fcb45be008c --- /dev/null +++ b/Regression_test_project/src/MyExample.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +// TTCN-3 version of "Hello, world!" +module MyExample +{ +type port PCOType message +{ + inout charstring; +} + +type component MTCType +{ + port PCOType MyPCO_PT; +} + +testcase tc_HelloW() runs on MTCType system MTCType +{ + map(mtc:MyPCO_PT, system:MyPCO_PT); + MyPCO_PT.send("Hello, world!"); + setverdict(pass); +} + +testcase tc_HelloW2() runs on MTCType system MTCType +{ + timer TL_T := 15.0; + map(mtc:MyPCO_PT, system:MyPCO_PT); + MyPCO_PT.send("Hello, world!"); + TL_T.start; + alt { + [] MyPCO_PT.receive("Hello, TTCN-3!") { TL_T.stop; setverdict(pass); } + [] TL_T.timeout { setverdict(inconc); } + [] MyPCO_PT.receive { TL_T.stop; setverdict(fail); } + } +} + +control +{ + execute(tc_HelloW()); + execute(tc_HelloW2()); +} +} diff --git a/Regression_test_project/src/PCOType.cc b/Regression_test_project/src/PCOType.cc new file mode 100644 index 0000000000000000000000000000000000000000..a4aa888bafd0eff87fd911a321cd470068fcc5cf --- /dev/null +++ b/Regression_test_project/src/PCOType.cc @@ -0,0 +1,95 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2000-2014 Ericsson Telecom AB +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v10.html +/////////////////////////////////////////////////////////////////////////////// +// This Test Port skeleton source file was generated by the +// TTCN-3 Compiler of the TTCN-3 Test Executor version 1.5.pl7 +// for Janos Zoltan Szabo (ejnosza@balisea) on Mon Sep 13 09:35:21 2004 + +// You may modify this file. Complete the body of empty functions and +// add your member functions here. + +#include + +#include "PCOType.hh" +#include "memory.h" + +namespace MyExample { + +PCOType::PCOType(const char *par_port_name) +: PCOType_BASE(par_port_name) +{ + +} + +PCOType::~PCOType() +{ + +} + +void PCOType::set_parameter(const char *parameter_name, +const char *parameter_value) +{ + +} + +void PCOType::Event_Handler(const fd_set *read_fds, +const fd_set *write_fds, const fd_set *error_fds, +double time_since_last_call) +{ +size_t buf_len = 0, buf_size = 32; +char *buf = (char*)Malloc(buf_size); +for ( ; ; ) { +int c = getc(stdin); +if (c == EOF) { +if (buf_len > 0) incoming_message(CHARSTRING(buf_len, buf)); +Uninstall_Handler(); +break; +} else if (c == '\n') { +incoming_message(CHARSTRING(buf_len, buf)); +break; +} else { +if (buf_len >= buf_size) { +buf_size *= 2; +buf = (char*)Realloc(buf, buf_size); +} +buf[buf_len++] = c; +} +} +Free(buf); +} + +void PCOType::user_map(const char *system_port) +{ +fd_set readfds; +FD_ZERO(&readfds); +FD_SET(fileno(stdin), &readfds); +Install_Handler(&readfds, NULL, NULL, 0.0); +} + +void PCOType::user_unmap(const char *system_port) +{ +Uninstall_Handler(); +} + +void PCOType::user_start() +{ + +} + +void PCOType::user_stop() +{ + +} + +void PCOType::outgoing_send(const CHARSTRING& send_par) +{ +puts((const char*)send_par); +fflush(stdout); +} + +} /* end of namespace */ + diff --git a/Regression_test_project/src/PCOType.hh b/Regression_test_project/src/PCOType.hh new file mode 100644 index 0000000000000000000000000000000000000000..2c1f33d442e572a190c380635544e6298b7d7c56 --- /dev/null +++ b/Regression_test_project/src/PCOType.hh @@ -0,0 +1,46 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2000-2014 Ericsson Telecom AB +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v10.html +/////////////////////////////////////////////////////////////////////////////// +// This Test Port skeleton header file was generated by the +// TTCN-3 Compiler of the TTCN-3 Test Executor version 1.5.pl7 +// for Janos Zoltan Szabo (ejnosza@balisea) on Mon Sep 13 09:35:21 2004 + +// You may modify this file. Add your attributes and prototypes of your +// member functions here. + +#ifndef PCOType_HH +#define PCOType_HH + +#include "MyExample.hh" + +namespace MyExample { + +class PCOType : public PCOType_BASE { +public: +PCOType(const char *par_port_name = NULL); +~PCOType(); + +void set_parameter(const char *parameter_name, +const char *parameter_value); + +void Event_Handler(const fd_set *read_fds, +const fd_set *write_fds, const fd_set *error_fds, +double time_since_last_call); + +protected: +void user_map(const char *system_port); +void user_unmap(const char *system_port); + +void user_start(); +void user_stop(); + +void outgoing_send(const CHARSTRING& send_par); +}; + +} /* end of namespace */ + +#endif diff --git a/Regression_test_project/src/code_smells/altstep_coverage/altsteps.ttcn b/Regression_test_project/src/code_smells/altstep_coverage/altsteps.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b94521f33f7600630b9279a4621f6f028e2f3acb --- /dev/null +++ b/Regression_test_project/src/code_smells/altstep_coverage/altsteps.ttcn @@ -0,0 +1,35 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module altsteps +{ + import from types all; + + // Unhandled cases: p1_PT: boolean, pl_2: integer + altstep as_1(test_port pl_2) runs on c1_CT + { + [] p1_PT.receive(t1:?) {} + [] pl_2.receive(t2:*) {} + } + + // No unhandled cases + // pl_2: integer, pl_2: boolean are not unhandled cases (pl_2 is completely ignored) + altstep as_2(test_port pl_2) runs on c1_CT + { + [] p1_PT.receive(t1:*) {} + [] p1_PT.receive(t2:*) {} + } + + // No unhandled cases + altstep as_3(test_port pl_2) runs on c1_CT + { + [] p1_PT.receive(t1:*) {} + [] p1_PT.receive(t2:*) {} + [] pl_2.receive(t1:*) {} + [] pl_2.receive(t2:*) {} + } +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/circular_importation/import_cycle.ttcn b/Regression_test_project/src/code_smells/circular_importation/import_cycle.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4d422a63bfe777d8b3e5b2bf9abb9b277feb71f5 --- /dev/null +++ b/Regression_test_project/src/code_smells/circular_importation/import_cycle.ttcn @@ -0,0 +1,11 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module import_cycle { +import from import_jin all; + +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/circular_importation/import_jang.ttcn b/Regression_test_project/src/code_smells/circular_importation/import_jang.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b508e3f54f229084119ca46acde2906fc9f63c48 --- /dev/null +++ b/Regression_test_project/src/code_smells/circular_importation/import_jang.ttcn @@ -0,0 +1,11 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module import_jang { +import from import_jin all; + +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/circular_importation/import_jin.ttcn b/Regression_test_project/src/code_smells/circular_importation/import_jin.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c25eb40a551c1b7436cdd6d1340efd7260a1d758 --- /dev/null +++ b/Regression_test_project/src/code_smells/circular_importation/import_jin.ttcn @@ -0,0 +1,12 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module import_jin { +import from import_jang all; +import from import_jin all; + +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/empty_statement_block/block.ttcn b/Regression_test_project/src/code_smells/empty_statement_block/block.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0ba12005c73bb39c573660752c303494f6418163 --- /dev/null +++ b/Regression_test_project/src/code_smells/empty_statement_block/block.ttcn @@ -0,0 +1,19 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module block { +control +{ + // no empty statement block + while (true) { + var integer i := 0; + } + + // empty statement block + if (true) {} +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/goto/say_no_to_goto.ttcn b/Regression_test_project/src/code_smells/goto/say_no_to_goto.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1e02279ede90c7d526b6b54185be7dd25eaa56e6 --- /dev/null +++ b/Regression_test_project/src/code_smells/goto/say_no_to_goto.ttcn @@ -0,0 +1,16 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module say_no_to_goto { +control +{ + label lab; + + // Start running! Raptors are extremely fast. + goto lab; +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/if_instead_altguard/altguard.ttcn b/Regression_test_project/src/code_smells/if_instead_altguard/altguard.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8c27bf676b5e114b63ad7673315be23bb336f8fd --- /dev/null +++ b/Regression_test_project/src/code_smells/if_instead_altguard/altguard.ttcn @@ -0,0 +1,35 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module altguard { +import from types all; + +altstep as_1(test_port pl_1, integer i) { + // might transform + [] pl_1.receive(t1:*) { + if (true) {} + } + + // might transform + [i>3] pl_1.receive(t2:*) { + if (true) {} + } + + // no marker here + [] any port.receive { + i := 32; + if (true) {} + + alt { + // might transform + [] any port.receive { + if (true) {} + } + } + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/if_instead_receive_template/receive_template.ttcn b/Regression_test_project/src/code_smells/if_instead_receive_template/receive_template.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e4c538233938680ed84a74d546a25e510ddb466a --- /dev/null +++ b/Regression_test_project/src/code_smells/if_instead_receive_template/receive_template.ttcn @@ -0,0 +1,28 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module receive_template { +import from types all; + +altstep as_1(test_int_port pl_1) { + var integer rec, i; + + [] pl_1.receive(1) -> value rec { + while (rec > 4) { + // no problem with this match + if (match(i, 43)) {} + } + } + + [] pl_1.receive(*) -> value rec { + { + // uses the redirected value, a receive template would be better + if (match(rec, 43)) {} + } + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/if_without_else/ifelse.ttcn b/Regression_test_project/src/code_smells/if_without_else/ifelse.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3c937f13c2aeae61c315a04d294d8646085194cc --- /dev/null +++ b/Regression_test_project/src/code_smells/if_without_else/ifelse.ttcn @@ -0,0 +1,20 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module ifelse { +function f(boolean b) { + // fine, it has an else branch + if (b) { + // fine, this if is not a single statement in the block + if (b) {} + return; + } else { + // this if should have an else branch + if (b) {} + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/incorrect_shift_rotate_size/shiftrotate.ttcn b/Regression_test_project/src/code_smells/incorrect_shift_rotate_size/shiftrotate.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7a352eeb2beae072ef445b11c4ef11b093fe61af --- /dev/null +++ b/Regression_test_project/src/code_smells/incorrect_shift_rotate_size/shiftrotate.ttcn @@ -0,0 +1,93 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module shiftrotate { +type record of integer ROI; +type set of integer SOI; + +function f() { + const bitstring cbs := '001101'B; + var bitstring bs; + const charstring ccs := ""; + var charstring cs; + const octetstring cos := 'CAFE8080'O; + var octetstring os; + const hexstring chs := 'FACE2'H; + var hexstring hs; + const ROI croi := {1, 2, 1, 2, 1}; + var ROI roi; + const SOI csoi := {1, 2, 3}; + var SOI soi; + const integer neg := -4; + + // no problem + bs := cbs << 1; + // should be marked for negative shift + bs := cbs << neg; + // should be marked for negative shift + bs := cbs << -4; + // marked for zero shift + bs := cbs << 0; + // marked for large shift + bs := cbs << 100; + + // no problem + bs := cbs >> 1; + // should be marked for negative shift + bs := cbs >> neg; + // should be marked for negative shift + bs := cbs >> -4; + // marked for zero shift + bs := cbs >> 0; + // marked for large shift + bs := cbs >> 100; + + // no problem + bs := cbs @> 1; + // should be marked for negative rotate + bs := cbs @> neg; + // should be marked for negative rotate + bs := cbs @> -4; + // marked for zero rotate + bs := cbs @> 0; + // marked for large rotate + bs := cbs @> 100; + + // no problem + bs := cbs <@ 1; + // should be marked for negative rotate + bs := cbs <@ neg; + // should be marked for negative rotate + bs := cbs <@ -4; + // marked for zero rotate + bs := cbs <@ 0; + // marked for large rotate + bs := cbs <@ 100; + + + // All of the below assignments are marked for zero shift/rotate + cs := ccs @> 0; + cs := ccs <@ 0; + + os := cos >> 0; + os := cos << 0; + os := cos @> 0; + os := cos <@ 0; + + hs := chs >> 0; + hs := chs << 0; + hs := chs @> 0; + hs := chs <@ 0; + + roi := croi @> 0; + roi := croi <@ 0; + + soi := csoi @> 0; + soi := csoi <@ 0; + +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/infinite_loop/loop.ttcn b/Regression_test_project/src/code_smells/infinite_loop/loop.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c41a00f8a39a1ee335fd20f7135381e88936efa3 --- /dev/null +++ b/Regression_test_project/src/code_smells/infinite_loop/loop.ttcn @@ -0,0 +1,22 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module loop { +control { + var integer i; + + // infinite loops + for (i := 0; true; i := i+1) {} + while (true) {} + do {} while(true); + + // not infinite loops + for (i := 0; i < 10; i := i+1) {} + while (i < 10) {} + do {} while (i < 10); +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/logic_inversion/logic.ttcn b/Regression_test_project/src/code_smells/logic_inversion/logic.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..59a7cf049395b6baf3a6ec67ca82ccc0401fdf90 --- /dev/null +++ b/Regression_test_project/src/code_smells/logic_inversion/logic.ttcn @@ -0,0 +1,25 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module logic { +control { + // negation could be transformed + if (not true) { + } else { + } + + // no problem + if (false) { + } else { + } + + if (not true) { + } else if (false) { + } else { + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/magic_number/magic_number.ttcn b/Regression_test_project/src/code_smells/magic_number/magic_number.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d2e642a511c569b650f5ff98f780d43fdc43ff39 --- /dev/null +++ b/Regression_test_project/src/code_smells/magic_number/magic_number.ttcn @@ -0,0 +1,19 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module magic_number { +control { + // 6, 6, 43, 123... are magic numbers + var integer i := 6; + for (i := -6; i< -43; i := i * 1234567898765432123456789) {} + + // 2345, 5, 0 are not magic numbers + const integer c := -2345; + i := 5 * (-5) + 0; + +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/magic_string/magic_string.ttcn b/Regression_test_project/src/code_smells/magic_string/magic_string.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4017c649659899bc55bd384c4e21ad9240ad1c58 --- /dev/null +++ b/Regression_test_project/src/code_smells/magic_string/magic_string.ttcn @@ -0,0 +1,23 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module magic_string { +control { + // magic strings: + var bitstring bs := '10001'B; + var charstring cs := "asdf"; + var octetstring os := 'F00F'O; + var hexstring hs := 'ACE'H; + + // not magic strings: + const bitstring cbs := '10001'B; + const charstring ccs := "asdf"; + const octetstring cos := 'F00F'O; + const hexstring chs := 'ACE'H; + +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/missing_friend/buddy.ttcn b/Regression_test_project/src/code_smells/missing_friend/buddy.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b6f0c3b1edd3d016beb032992ee1c4ef6e91189e --- /dev/null +++ b/Regression_test_project/src/code_smells/missing_friend/buddy.ttcn @@ -0,0 +1,8 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module buddy {} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/missing_friend/guy.ttcn b/Regression_test_project/src/code_smells/missing_friend/guy.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6f19f5834d6d2e50d131e8b0d49b776a9ae9b090 --- /dev/null +++ b/Regression_test_project/src/code_smells/missing_friend/guy.ttcn @@ -0,0 +1,14 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module guy { +// friend not found +friend module pal; + +// friend exists +friend module buddy; +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/missing_import/imported_2.ttcn b/Regression_test_project/src/code_smells/missing_import/imported_2.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b34081d1ec6a566b06b702801f472203d57c0bba --- /dev/null +++ b/Regression_test_project/src/code_smells/missing_import/imported_2.ttcn @@ -0,0 +1,8 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module imported_2 {} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/missing_import/importer.ttcn b/Regression_test_project/src/code_smells/missing_import/importer.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7b81a70ed42029dccb145ad0bfb9596209e22aea --- /dev/null +++ b/Regression_test_project/src/code_smells/missing_import/importer.ttcn @@ -0,0 +1,15 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module importer { +// no such module +import from imported_1 all; + +// no problem +import from imported_2 all; + +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/modulename_in_definition/modulename.ttcn b/Regression_test_project/src/code_smells/modulename_in_definition/modulename.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ae7bbf1fd6e7ef82cc9bc35af06e9ff4de0520de --- /dev/null +++ b/Regression_test_project/src/code_smells/modulename_in_definition/modulename.ttcn @@ -0,0 +1,16 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module modulename { +control { + // contains module name + const integer modulename_i := 23; + + // does not contain + const integer i := 23; +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/nonprivate_private/nonprivate.ttcn b/Regression_test_project/src/code_smells/nonprivate_private/nonprivate.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e49ccab6dd1cc68519c41a7f89bffadca777b46f --- /dev/null +++ b/Regression_test_project/src/code_smells/nonprivate_private/nonprivate.ttcn @@ -0,0 +1,41 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module nonprivate { +// these definitions are local, should be private +altstep al() { + [] any port.receive {} +} +function fl() {} +type integer tyl; +template integer tel := *; +const integer cl := 0; +external function efl(); +external const integer ecl; + +// these are non-local +altstep an() { + [] any port.receive {} +} +function fn() {} +type integer tyn; +template integer ten := *; +const integer cn := 0; +external function efn(); +external const integer ecn; + + +control { + fl(); + var tyl il := cl + ecl; + if (match(il, tel)) { + efl(); + } else { + activate(al()); + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/nonprivate_private/referrer.ttcn b/Regression_test_project/src/code_smells/nonprivate_private/referrer.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5bc270d56991136008a0ec139a1a38557c39cd41 --- /dev/null +++ b/Regression_test_project/src/code_smells/nonprivate_private/referrer.ttcn @@ -0,0 +1,19 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module referrer { +import from nonprivate all; + +function f() { + activate(an()); + fn(); + efn(); + var tyn x := cn + ecn; + if (match(x, ten)) {} + +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/readonly_inout_param/ro_inout.ttcn b/Regression_test_project/src/code_smells/readonly_inout_param/ro_inout.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c0eab8a45668b8ad1fa57ff2fd855da67dd6e1b5 --- /dev/null +++ b/Regression_test_project/src/code_smells/readonly_inout_param/ro_inout.ttcn @@ -0,0 +1,18 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module ro_inout { +// ioi should not be an inout parameter +function f(in integer ii, inout integer ioi, out integer oi) { + oi := ioi; +} + +// ioti should not be an inout parameter +function f2(in template integer iti, inout template integer ioti, out template integer oti) { + oti := ioti; +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/readonly_loc_variable/ro_loc.ttcn b/Regression_test_project/src/code_smells/readonly_loc_variable/ro_loc.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f2c5381af1abe694fe02f42de26f7cd21b90d67e --- /dev/null +++ b/Regression_test_project/src/code_smells/readonly_loc_variable/ro_loc.ttcn @@ -0,0 +1,17 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module ro_loc { +control { + // never written + var integer i := 2; + + // good + var integer w := i; + w := i*i; +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/readonly_out_param/ro_out.ttcn b/Regression_test_project/src/code_smells/readonly_out_param/ro_out.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..10da567271895ce8173d1ad21382d9fc9540d96f --- /dev/null +++ b/Regression_test_project/src/code_smells/readonly_out_param/ro_out.ttcn @@ -0,0 +1,19 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module ro_out { + +// oi should not be an out parameter +function f(in integer ii, inout integer ioi, out integer oi) { + ioi := oi; +} + +// oti should not be an out parameter +function f2(in template integer iti, inout template integer ioti, out template integer oti) { + ioti := oti; +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/receive_any_template/any_template.ttcn b/Regression_test_project/src/code_smells/receive_any_template/any_template.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8eb40c64b0665db2d061365a0e772657e88f7758 --- /dev/null +++ b/Regression_test_project/src/code_smells/receive_any_template/any_template.ttcn @@ -0,0 +1,26 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module any_template { +import from types all; + +altstep a1(test_int_port p) runs on c1_CT { + var integer i; + // might not a problem, as the port has only one incoming type + [] p.receive(*) -> value i {} + // might be semantically invalid (TTCN3 specification unclear) + [] p1_PT.receive(?) -> value i {} +} + +// no problem +altstep a2(test_int_port p) runs on c1_CT { + var integer i; + [] p1_PT.receive(integer:?) -> value i {} + [] p.receive((1, 2, 3)) {} +} + +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/setverdict_without_reason/verdict.ttcn b/Regression_test_project/src/code_smells/setverdict_without_reason/verdict.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..796fb5a0481c9b702de239f8dfae3e7d2ec12442 --- /dev/null +++ b/Regression_test_project/src/code_smells/setverdict_without_reason/verdict.ttcn @@ -0,0 +1,20 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module verdict { +import from types all; + +testcase t(boolean b) runs on c1_CT { + if (b) { + // should have a reason + setverdict(fail); + } else { + // it is fine + setverdict(pass, "fine"); + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/sizecheck_in_loop/sizecheck.ttcn b/Regression_test_project/src/code_smells/sizecheck_in_loop/sizecheck.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ea1b553cb5cf4b33b559054eef18a7e31e810b8a --- /dev/null +++ b/Regression_test_project/src/code_smells/sizecheck_in_loop/sizecheck.ttcn @@ -0,0 +1,29 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module sizecheck { +import from types all; + +control { + var charstring s := "charstring"; + + var ROI roi := {1, 2}; + var integer i := 0; + + // multiple evaluation of length and size + for (i := 0; i < lengthof(s); i := i+1) {} + while (i < lengthof(s)) {} + do {} while (i < lengthof(s)); + + for (i := 0; i < sizeof(roi); i := i+1) {} + while (i < sizeof(roi)) {} + do {} while (i < sizeof(roi)); + + // no problem + i := lengthof(s) + sizeof(roi); +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/stop_in_function/stop_func.ttcn b/Regression_test_project/src/code_smells/stop_in_function/stop_func.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7fd54f2306a898209dd6a6acc114d200b0f92bee --- /dev/null +++ b/Regression_test_project/src/code_smells/stop_in_function/stop_func.ttcn @@ -0,0 +1,20 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module stop_func { +import from types all; + +// do not use stop in functions +function f() { + stop; +} + +// stop in testcase is fine +testcase t() runs on c1_CT { + stop; +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/switch_on_boolean/switch_bool.ttcn b/Regression_test_project/src/code_smells/switch_on_boolean/switch_bool.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5b30ad17b877fcf09e08d0ca5edecfafe77533b4 --- /dev/null +++ b/Regression_test_project/src/code_smells/switch_on_boolean/switch_bool.ttcn @@ -0,0 +1,22 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module switch_bool { +function f(boolean b, integer i) { + // do not select on boolean value + select(b) { + case(true) {} + case(false) {} + } + + // select on integer is fine + select(i) { + case(0) {} + case(42) {} + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/too_complex_expression/complex_expr.ttcn b/Regression_test_project/src/code_smells/too_complex_expression/complex_expr.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..85ee7ce629a5aabf5b0a5bc056e0354d04ff9463 --- /dev/null +++ b/Regression_test_project/src/code_smells/too_complex_expression/complex_expr.ttcn @@ -0,0 +1,25 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module complex_expr { +control { + var integer i := 0; + // large complexity (20) + for(i:=0; i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i < 1; i:=i+1) {} + while(i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i < 1) {} + do {} while(i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i < 1); + if (i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i < 1) {} + i := i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i+i; + + // no complexity (1) + for(i:=0; i < 1; i:=i+1) {} + while(i < 1) {} + do {} while(i < 1); + if (i < 1) {} + i := i+i; +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/too_many_parameters/many_param.ttcn b/Regression_test_project/src/code_smells/too_many_parameters/many_param.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..10e1b858e6ba63ae0211e76e23eaac1ab0129bec --- /dev/null +++ b/Regression_test_project/src/code_smells/too_many_parameters/many_param.ttcn @@ -0,0 +1,16 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module many_param { +import from types all; + +// Too many parameters (10) +function f(t1 p1, t1 p2, t1 p3, t1 p4, t1 p5, t1 p6, t1 p7, t1 p8, t1 p9, t1 p10) {} + +// no problem (1 parameter) +testcase t(t1 p1) runs on c1_CT {} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/too_many_statements/many_statements.ttcn b/Regression_test_project/src/code_smells/too_many_statements/many_statements.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..90720ef04676863f7310fa6affb3d26a8d7b6e8a --- /dev/null +++ b/Regression_test_project/src/code_smells/too_many_statements/many_statements.ttcn @@ -0,0 +1,115 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module many_statements { + +function nyan() return charstring {return "NYAN";} + +// too many statements (1000) +control { + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); + nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); nyan(); +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/typename_in_definition/type_in_def.ttcn b/Regression_test_project/src/code_smells/typename_in_definition/type_in_def.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..74fc5666e0407afa23301c8f9c98dab0829a5acd --- /dev/null +++ b/Regression_test_project/src/code_smells/typename_in_definition/type_in_def.ttcn @@ -0,0 +1,22 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module type_in_def { + +// containing their type +function integer_f() return integer {return 0;} +external function integer_ef() return integer; +external const integer integer_2; +const integer integer_1 := 0; + +// no problem +function f() return integer {return 0;} +external function ef() return integer; +external const integer i_2; +const integer i_1 := 0; + +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/types.ttcn b/Regression_test_project/src/code_smells/types.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4a4c0dca2ad1ab7e3a19f60bfce3f130bb947a6d --- /dev/null +++ b/Regression_test_project/src/code_smells/types.ttcn @@ -0,0 +1,31 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module types +{ + type integer t1; + type boolean t2; + type charstring t3; + type record of integer ROI; + + type port test_port message + { + inout t1; + in t2; + out t3; + }; + + type port test_int_port message + { + inout integer; + } + + type component c1_CT + { + port test_port p1_PT; + } +} diff --git a/Regression_test_project/src/code_smells/uncommented_function/no_comment.ttcn b/Regression_test_project/src/code_smells/uncommented_function/no_comment.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..820cfacb0b6f8ffbedd500399a08ff39bc8456d9 --- /dev/null +++ b/Regression_test_project/src/code_smells/uncommented_function/no_comment.ttcn @@ -0,0 +1,32 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module no_comment { +import from types all; + +// the below function/testcase/altstep definitions should have a comment +const integer comment_separation_1 := 0; + +function f1() {} + +testcase t1() runs on c1_CT {} + +altstep a1() { + [] any port.receive {} +} + +const integer comment_separation_2 := 0; + +// fine, as it has a comment +function f2() {} +// fine, as it has a comment +testcase t2() runs on c1_CT {} +// fine, as it has a comment +altstep a2() { + [] any port.receive {} +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/uninitialized_variable/init_var.ttcn b/Regression_test_project/src/code_smells/uninitialized_variable/init_var.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2655a7bf05185a1bf60b6176b14511fe8c9b9ff4 --- /dev/null +++ b/Regression_test_project/src/code_smells/uninitialized_variable/init_var.ttcn @@ -0,0 +1,18 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module init_var { +control { + // bad: uninitialized + var integer i1; + var template integer ti1; + + // good: initialized + var integer i2 := 1; + var template integer ti2 := (2,3,0); +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/unnecessary_control/overcomp.ttcn b/Regression_test_project/src/code_smells/unnecessary_control/overcomp.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b4b99d3b25a0dd2b81282e214743af6395c064f1 --- /dev/null +++ b/Regression_test_project/src/code_smells/unnecessary_control/overcomp.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module overcomp { +import from types all; + +function f(test_int_port p) { + var integer i := 0; + + // unnecessary + for (i:=0; false; i:=i+1) {} + + // unnecessary + while (false) {} + + // unnecessary + do {} while (false); + + select(i) { + case else {} + case(0) {/* never reach */} + } + + if (true) { + } else { + // never reach + } + + if (false) { + // never reach + } else { + } + + alt { + [else] {} + [] p.receive {/* never reach */} + + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/unnecessary_valueof/omit_valueof.ttcn b/Regression_test_project/src/code_smells/unnecessary_valueof/omit_valueof.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f33d3e8212e76b7706aa21b12998ef86a83f020a --- /dev/null +++ b/Regression_test_project/src/code_smells/unnecessary_valueof/omit_valueof.ttcn @@ -0,0 +1,25 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module omit_valueof { +control { + var integer i; + const integer c := 1; + template integer ti := 23; + var template integer ti2; + + // valueof has no effect + i := valueof(5); + i := valueof(c + 2); + + // valueof is ok ??? (not sure about this) + i := valueof(i); + i := valueof(ti); + i := valueof(ti2); + +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/unused_function_return_values/omit_retval.ttcn b/Regression_test_project/src/code_smells/unused_function_return_values/omit_retval.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fdd1df9003923b075e30a8c755f3b67abec02b93 --- /dev/null +++ b/Regression_test_project/src/code_smells/unused_function_return_values/omit_retval.ttcn @@ -0,0 +1,20 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module omit_retval { +function f1() return integer {return 0;} +function f2() {} + +control { + // not used return value + f1(); + + // fine + var integer i := f1(); + f2(); +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/unused_global_definition/unused_global.ttcn b/Regression_test_project/src/code_smells/unused_global_definition/unused_global.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..30337e8feb8c84b7050cb5a18d7156300b0f34af --- /dev/null +++ b/Regression_test_project/src/code_smells/unused_global_definition/unused_global.ttcn @@ -0,0 +1,19 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module unused_global { + +// unused +type integer INT1; + +// used +type integer INT2; + +// unused +const INT2 this_is_also_not_used_globally := 3; + +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/unused_import/unused_import.ttcn b/Regression_test_project/src/code_smells/unused_import/unused_import.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cf0fd008ccb47c2d076dcadb648cae1b27116bd4 --- /dev/null +++ b/Regression_test_project/src/code_smells/unused_import/unused_import.ttcn @@ -0,0 +1,18 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module unused_import { + +// This import is not used +import from switch_bool all; + +// this is used +import from types all; +const t1 i := 0; + + +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/unused_local_definition/unused_local.ttcn b/Regression_test_project/src/code_smells/unused_local_definition/unused_local.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dc16de7e1591c4922948103712898a832ebb13e6 --- /dev/null +++ b/Regression_test_project/src/code_smells/unused_local_definition/unused_local.ttcn @@ -0,0 +1,18 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module unused_local { +control { + + // unused local definition + var integer i := 0; + + // used + var integer i2 := 1; + i2 := i2 * 4; +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/unused_started_function_return_values/omit_started_retval.ttcn b/Regression_test_project/src/code_smells/unused_started_function_return_values/omit_started_retval.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d8d0b15e308281cb5442f86394cd30eb7e4a8661 --- /dev/null +++ b/Regression_test_project/src/code_smells/unused_started_function_return_values/omit_started_retval.ttcn @@ -0,0 +1,23 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module omit_started_retval { +import from types all; + +function f1() runs on c1_CT return integer {return 0;} +function f2() runs on c1_CT {} + +testcase t() runs on c1_CT { + var c1_CT c := c1_CT.create; + // unused return value from started function + c.start(f1()); + + // fine + c.start(f2()); + // should test a type with 'done' extension attribute +} +} \ No newline at end of file diff --git a/Regression_test_project/src/code_smells/visibility_in_definition/visibility.ttcn b/Regression_test_project/src/code_smells/visibility_in_definition/visibility.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..97a7d76525492bd3427e396072630e1507f73fd8 --- /dev/null +++ b/Regression_test_project/src/code_smells/visibility_in_definition/visibility.ttcn @@ -0,0 +1,17 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module visibility { + +// these contain visibility keywords: +const integer public_i := 0; +const integer i_private_var := 21; +const integer my_friend := 42; + +// fine +const integer frienpubliprivatE := 23; +} \ No newline at end of file diff --git a/Regression_test_project/src/graph_tests/.TITAN_properties b/Regression_test_project/src/graph_tests/.TITAN_properties new file mode 100644 index 0000000000000000000000000000000000000000..819ed7ad4150dfd1dc388e8916cdf548fff42b0b --- /dev/null +++ b/Regression_test_project/src/graph_tests/.TITAN_properties @@ -0,0 +1,13 @@ + + + Default + + + bin\test1.exe + + + + bin + + + \ No newline at end of file diff --git a/Regression_test_project/src/graph_tests/.project b/Regression_test_project/src/graph_tests/.project new file mode 100644 index 0000000000000000000000000000000000000000..5a0473b32ea119641ba9d71f35a63123452b7e79 --- /dev/null +++ b/Regression_test_project/src/graph_tests/.project @@ -0,0 +1,18 @@ + + + test1 + + + + + + org.eclipse.titan.designer.core.TITANBuilder + + + + + + org.eclipse.titan.designer.core.TITANNature + org.eclipse.titan.log.viewer.TitanLogProject + + diff --git a/Regression_test_project/src/graph_tests/test1/.TITAN_properties b/Regression_test_project/src/graph_tests/test1/.TITAN_properties new file mode 100644 index 0000000000000000000000000000000000000000..819ed7ad4150dfd1dc388e8916cdf548fff42b0b --- /dev/null +++ b/Regression_test_project/src/graph_tests/test1/.TITAN_properties @@ -0,0 +1,13 @@ + + + Default + + + bin\test1.exe + + + + bin + + + \ No newline at end of file diff --git a/Regression_test_project/src/graph_tests/test1/.project b/Regression_test_project/src/graph_tests/test1/.project new file mode 100644 index 0000000000000000000000000000000000000000..5a0473b32ea119641ba9d71f35a63123452b7e79 --- /dev/null +++ b/Regression_test_project/src/graph_tests/test1/.project @@ -0,0 +1,18 @@ + + + test1 + + + + + + org.eclipse.titan.designer.core.TITANBuilder + + + + + + org.eclipse.titan.designer.core.TITANNature + org.eclipse.titan.log.viewer.TitanLogProject + + diff --git a/Regression_test_project/src/graph_tests/test1/src/a.ttcn3 b/Regression_test_project/src/graph_tests/test1/src/a.ttcn3 new file mode 100644 index 0000000000000000000000000000000000000000..d841df892725ef6852d3cda1f23d47453c7bbdb9 --- /dev/null +++ b/Regression_test_project/src/graph_tests/test1/src/a.ttcn3 @@ -0,0 +1,103 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module a +// [.objid{ itu_t(0) identified_organization(4) etsi(0) +// identified_organization(127) ericsson(5) testing(0) +// }] +{ + +//========================================================================= +// Import Part +//========================================================================= + import from b all; + import from c all; +// Insert imports here if applicable! +// You can use the import_part skeleton! + +//========================================================================= +// Module Parameters +//========================================================================= + +// Insert module parameters here if applicable! +// You can use the module_param skeleton! + +//========================================================================= +// Data Types +//========================================================================= + +// Insert data type defintions here if applicable! +// You can use the data_type skeleton! + +//========================================================================= +// Signatures +//========================================================================= + +// Insert signature definitions here if applicable! +// You can use the signature skeleton! + +//========================================================================= +//Port Types +//========================================================================= + +// Insert port type defintions here if applicable! +// You can use the port_type skeleton! + +//========================================================================= +//Component Types +//========================================================================= + +// Insert component type defintions here if applicable! +// You can use the component_type skeleton! + +//========================================================================= +// Constants +//========================================================================= + +// Insert constants here if applicable! +// You can use the constant skeleton! + +//========================================================================= +// Templates +//========================================================================= + +// Insert templates here if applicable! +// You can use the template skeleton! + +//========================================================================= +// Altsteps +//========================================================================= + +// Insert altsteps here if applicable! +// You can use the altstep skeleton! + +//========================================================================= +// Functions +//========================================================================= + +// Insert functions here if applicable! +// You can use the function skeleton! + +//========================================================================= +// Testcases +//========================================================================= + +// Insert test cases here if applicable! +// You can use the test_case skeleton! + +//========================================================================= +// Control +//========================================================================= + +// Insert control part here if applicable! + +} // end of module diff --git a/Regression_test_project/src/graph_tests/test1/src/b.ttcn3 b/Regression_test_project/src/graph_tests/test1/src/b.ttcn3 new file mode 100644 index 0000000000000000000000000000000000000000..f1cb1abe521260e92b15c96500e2608b09ada46b --- /dev/null +++ b/Regression_test_project/src/graph_tests/test1/src/b.ttcn3 @@ -0,0 +1,103 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module b +// [.objid{ itu_t(0) identified_organization(4) etsi(0) +// identified_organization(127) ericsson(5) testing(0) +// }] +{ + +//========================================================================= +// Import Part +//========================================================================= + import from a all; + import from d all; +// Insert imports here if applicable! +// You can use the import_part skeleton! + +//========================================================================= +// Module Parameters +//========================================================================= + +// Insert module parameters here if applicable! +// You can use the module_param skeleton! + +//========================================================================= +// Data Types +//========================================================================= + +// Insert data type defintions here if applicable! +// You can use the data_type skeleton! + +//========================================================================= +// Signatures +//========================================================================= + +// Insert signature definitions here if applicable! +// You can use the signature skeleton! + +//========================================================================= +//Port Types +//========================================================================= + +// Insert port type defintions here if applicable! +// You can use the port_type skeleton! + +//========================================================================= +//Component Types +//========================================================================= + +// Insert component type defintions here if applicable! +// You can use the component_type skeleton! + +//========================================================================= +// Constants +//========================================================================= + +// Insert constants here if applicable! +// You can use the constant skeleton! + +//========================================================================= +// Templates +//========================================================================= + +// Insert templates here if applicable! +// You can use the template skeleton! + +//========================================================================= +// Altsteps +//========================================================================= + +// Insert altsteps here if applicable! +// You can use the altstep skeleton! + +//========================================================================= +// Functions +//========================================================================= + +// Insert functions here if applicable! +// You can use the function skeleton! + +//========================================================================= +// Testcases +//========================================================================= + +// Insert test cases here if applicable! +// You can use the test_case skeleton! + +//========================================================================= +// Control +//========================================================================= + +// Insert control part here if applicable! + +} // end of module diff --git a/Regression_test_project/src/graph_tests/test1/src/c.ttcn3 b/Regression_test_project/src/graph_tests/test1/src/c.ttcn3 new file mode 100644 index 0000000000000000000000000000000000000000..7eff0ee1a64cdff18cd25613c90ee06e7a8ffbac --- /dev/null +++ b/Regression_test_project/src/graph_tests/test1/src/c.ttcn3 @@ -0,0 +1,103 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module c +// [.objid{ itu_t(0) identified_organization(4) etsi(0) +// identified_organization(127) ericsson(5) testing(0) +// }] +{ + +//========================================================================= +// Import Part +//========================================================================= + import from b all; + import from d all; +// Insert imports here if applicable! +// You can use the import_part skeleton! + +//========================================================================= +// Module Parameters +//========================================================================= + +// Insert module parameters here if applicable! +// You can use the module_param skeleton! + +//========================================================================= +// Data Types +//========================================================================= + +// Insert data type defintions here if applicable! +// You can use the data_type skeleton! + +//========================================================================= +// Signatures +//========================================================================= + +// Insert signature definitions here if applicable! +// You can use the signature skeleton! + +//========================================================================= +//Port Types +//========================================================================= + +// Insert port type defintions here if applicable! +// You can use the port_type skeleton! + +//========================================================================= +//Component Types +//========================================================================= + +// Insert component type defintions here if applicable! +// You can use the component_type skeleton! + +//========================================================================= +// Constants +//========================================================================= + +// Insert constants here if applicable! +// You can use the constant skeleton! + +//========================================================================= +// Templates +//========================================================================= + +// Insert templates here if applicable! +// You can use the template skeleton! + +//========================================================================= +// Altsteps +//========================================================================= + +// Insert altsteps here if applicable! +// You can use the altstep skeleton! + +//========================================================================= +// Functions +//========================================================================= + +// Insert functions here if applicable! +// You can use the function skeleton! + +//========================================================================= +// Testcases +//========================================================================= + +// Insert test cases here if applicable! +// You can use the test_case skeleton! + +//========================================================================= +// Control +//========================================================================= + +// Insert control part here if applicable! + +} // end of module diff --git a/Regression_test_project/src/graph_tests/test1/src/d.ttcn3 b/Regression_test_project/src/graph_tests/test1/src/d.ttcn3 new file mode 100644 index 0000000000000000000000000000000000000000..1691826d3e5cdff34fbffac5d5a587c903fac762 --- /dev/null +++ b/Regression_test_project/src/graph_tests/test1/src/d.ttcn3 @@ -0,0 +1,102 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module d +// [.objid{ itu_t(0) identified_organization(4) etsi(0) +// identified_organization(127) ericsson(5) testing(0) +// }] +{ + +//========================================================================= +// Import Part +//========================================================================= + +// Insert imports here if applicable! +// You can use the import_part skeleton! + +//========================================================================= +// Module Parameters +//========================================================================= + +// Insert module parameters here if applicable! +// You can use the module_param skeleton! + +//========================================================================= +// Data Types +//========================================================================= + +// Insert data type defintions here if applicable! +// You can use the data_type skeleton! + +//========================================================================= +// Signatures +//========================================================================= + +// Insert signature definitions here if applicable! +// You can use the signature skeleton! + +//========================================================================= +//Port Types +//========================================================================= + +// Insert port type defintions here if applicable! +// You can use the port_type skeleton! + +//========================================================================= +//Component Types +//========================================================================= + +// Insert component type defintions here if applicable! +// You can use the component_type skeleton! + +//========================================================================= +// Constants +//========================================================================= + +// Insert constants here if applicable! +// You can use the constant skeleton! + +//========================================================================= +// Templates +//========================================================================= + +// Insert templates here if applicable! +// You can use the template skeleton! + +//========================================================================= +// Altsteps +//========================================================================= + +// Insert altsteps here if applicable! +// You can use the altstep skeleton! + +//========================================================================= +// Functions +//========================================================================= + +// Insert functions here if applicable! +// You can use the function skeleton! + +//========================================================================= +// Testcases +//========================================================================= + +// Insert test cases here if applicable! +// You can use the test_case skeleton! + +//========================================================================= +// Control +//========================================================================= + +// Insert control part here if applicable! + +} // end of module diff --git a/Regression_test_project/src/graph_tests/test1/src/e.ttcn3 b/Regression_test_project/src/graph_tests/test1/src/e.ttcn3 new file mode 100644 index 0000000000000000000000000000000000000000..4eba6a97b986e5a2af6af25ba3bd7072f3d84fda --- /dev/null +++ b/Regression_test_project/src/graph_tests/test1/src/e.ttcn3 @@ -0,0 +1,103 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module e +// [.objid{ itu_t(0) identified_organization(4) etsi(0) +// identified_organization(127) ericsson(5) testing(0) +// }] +{ + +//========================================================================= +// Import Part +//========================================================================= + import from g all; + import from f all; +// Insert imports here if applicable! +// You can use the import_part skeleton! + +//========================================================================= +// Module Parameters +//========================================================================= + +// Insert module parameters here if applicable! +// You can use the module_param skeleton! + +//========================================================================= +// Data Types +//========================================================================= + +// Insert data type defintions here if applicable! +// You can use the data_type skeleton! + +//========================================================================= +// Signatures +//========================================================================= + +// Insert signature definitions here if applicable! +// You can use the signature skeleton! + +//========================================================================= +//Port Types +//========================================================================= + +// Insert port type defintions here if applicable! +// You can use the port_type skeleton! + +//========================================================================= +//Component Types +//========================================================================= + +// Insert component type defintions here if applicable! +// You can use the component_type skeleton! + +//========================================================================= +// Constants +//========================================================================= + +// Insert constants here if applicable! +// You can use the constant skeleton! + +//========================================================================= +// Templates +//========================================================================= + +// Insert templates here if applicable! +// You can use the template skeleton! + +//========================================================================= +// Altsteps +//========================================================================= + +// Insert altsteps here if applicable! +// You can use the altstep skeleton! + +//========================================================================= +// Functions +//========================================================================= + +// Insert functions here if applicable! +// You can use the function skeleton! + +//========================================================================= +// Testcases +//========================================================================= + +// Insert test cases here if applicable! +// You can use the test_case skeleton! + +//========================================================================= +// Control +//========================================================================= + +// Insert control part here if applicable! + +} // end of module diff --git a/Regression_test_project/src/graph_tests/test1/src/f.ttcn3 b/Regression_test_project/src/graph_tests/test1/src/f.ttcn3 new file mode 100644 index 0000000000000000000000000000000000000000..78bee97419d14596dd4b90004b14acc9f2f62df0 --- /dev/null +++ b/Regression_test_project/src/graph_tests/test1/src/f.ttcn3 @@ -0,0 +1,102 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module f +// [.objid{ itu_t(0) identified_organization(4) etsi(0) +// identified_organization(127) ericsson(5) testing(0) +// }] +{ + +//========================================================================= +// Import Part +//========================================================================= + import from g all; +// Insert imports here if applicable! +// You can use the import_part skeleton! + +//========================================================================= +// Module Parameters +//========================================================================= + +// Insert module parameters here if applicable! +// You can use the module_param skeleton! + +//========================================================================= +// Data Types +//========================================================================= + +// Insert data type defintions here if applicable! +// You can use the data_type skeleton! + +//========================================================================= +// Signatures +//========================================================================= + +// Insert signature definitions here if applicable! +// You can use the signature skeleton! + +//========================================================================= +//Port Types +//========================================================================= + +// Insert port type defintions here if applicable! +// You can use the port_type skeleton! + +//========================================================================= +//Component Types +//========================================================================= + +// Insert component type defintions here if applicable! +// You can use the component_type skeleton! + +//========================================================================= +// Constants +//========================================================================= + +// Insert constants here if applicable! +// You can use the constant skeleton! + +//========================================================================= +// Templates +//========================================================================= + +// Insert templates here if applicable! +// You can use the template skeleton! + +//========================================================================= +// Altsteps +//========================================================================= + +// Insert altsteps here if applicable! +// You can use the altstep skeleton! + +//========================================================================= +// Functions +//========================================================================= + +// Insert functions here if applicable! +// You can use the function skeleton! + +//========================================================================= +// Testcases +//========================================================================= + +// Insert test cases here if applicable! +// You can use the test_case skeleton! + +//========================================================================= +// Control +//========================================================================= + +// Insert control part here if applicable! + +} // end of module diff --git a/Regression_test_project/src/graph_tests/test1/src/g.ttcn3 b/Regression_test_project/src/graph_tests/test1/src/g.ttcn3 new file mode 100644 index 0000000000000000000000000000000000000000..a0ce015741cab95fcaff3fb68017e8e7ae8fe656 --- /dev/null +++ b/Regression_test_project/src/graph_tests/test1/src/g.ttcn3 @@ -0,0 +1,102 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module g +// [.objid{ itu_t(0) identified_organization(4) etsi(0) +// identified_organization(127) ericsson(5) testing(0) +// }] +{ + +//========================================================================= +// Import Part +//========================================================================= + import from g all; +// Insert imports here if applicable! +// You can use the import_part skeleton! + +//========================================================================= +// Module Parameters +//========================================================================= + +// Insert module parameters here if applicable! +// You can use the module_param skeleton! + +//========================================================================= +// Data Types +//========================================================================= + +// Insert data type defintions here if applicable! +// You can use the data_type skeleton! + +//========================================================================= +// Signatures +//========================================================================= + +// Insert signature definitions here if applicable! +// You can use the signature skeleton! + +//========================================================================= +//Port Types +//========================================================================= + +// Insert port type defintions here if applicable! +// You can use the port_type skeleton! + +//========================================================================= +//Component Types +//========================================================================= + +// Insert component type defintions here if applicable! +// You can use the component_type skeleton! + +//========================================================================= +// Constants +//========================================================================= + +// Insert constants here if applicable! +// You can use the constant skeleton! + +//========================================================================= +// Templates +//========================================================================= + +// Insert templates here if applicable! +// You can use the template skeleton! + +//========================================================================= +// Altsteps +//========================================================================= + +// Insert altsteps here if applicable! +// You can use the altstep skeleton! + +//========================================================================= +// Functions +//========================================================================= + +// Insert functions here if applicable! +// You can use the function skeleton! + +//========================================================================= +// Testcases +//========================================================================= + +// Insert test cases here if applicable! +// You can use the test_case skeleton! + +//========================================================================= +// Control +//========================================================================= + +// Insert control part here if applicable! + +} // end of module diff --git a/Regression_test_project/src/graph_tests/test2/.TITAN_properties b/Regression_test_project/src/graph_tests/test2/.TITAN_properties new file mode 100644 index 0000000000000000000000000000000000000000..352912046a3e71a72c828194940181008a9a0d83 --- /dev/null +++ b/Regression_test_project/src/graph_tests/test2/.TITAN_properties @@ -0,0 +1,13 @@ + + + Default + + + E:\runtime-EclipseApplication\test2\bin\test2.exe + + + + bin + + + \ No newline at end of file diff --git a/Regression_test_project/src/graph_tests/test2/.project b/Regression_test_project/src/graph_tests/test2/.project new file mode 100644 index 0000000000000000000000000000000000000000..cc61ff34350530db98ceb76ff19096827de2dafb --- /dev/null +++ b/Regression_test_project/src/graph_tests/test2/.project @@ -0,0 +1,18 @@ + + + test2 + + + + + + org.eclipse.titan.designer.core.TITANBuilder + + + + + + org.eclipse.titan.designer.core.TITANNature + org.eclipse.titan.log.viewer.TitanLogProject + + diff --git a/Regression_test_project/src/graph_tests/test2/src/A_Module.ttcn3 b/Regression_test_project/src/graph_tests/test2/src/A_Module.ttcn3 new file mode 100644 index 0000000000000000000000000000000000000000..f27fc454023590d6315034ccd8fdbfd4b765315e --- /dev/null +++ b/Regression_test_project/src/graph_tests/test2/src/A_Module.ttcn3 @@ -0,0 +1,87 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ + +module A_Module +{ + type component A_Ext extends A_Base { /* @status APPROVED */ + var integer base; + }; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + type component B_Base extends A_Ext{ + var integer new; + }; + + type component A_Base extends B_Base,A_Ext{ + var integer new_new; + }; + +} // end of module diff --git a/Regression_test_project/src/metrics/AM_Branches/AM_Branches.ttcn b/Regression_test_project/src/metrics/AM_Branches/AM_Branches.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cfe0770b060b6e376fcbd666cb46bbd8918a0541 --- /dev/null +++ b/Regression_test_project/src/metrics/AM_Branches/AM_Branches.ttcn @@ -0,0 +1,18 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module AM_Branches { +import from types all; + +// 2 branches. +altstep as_1(test_port pl_2) runs on c1_CT +{ + [] p1_PT.receive(t1:?) {} + [] pl_2.receive(t2:*) {} +} + +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/AM_CyclomaticComplexity/AM_CyclomaticComplexity.ttcn b/Regression_test_project/src/metrics/AM_CyclomaticComplexity/AM_CyclomaticComplexity.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6e4be93ebe4ba7bdeb709455e8abb93f91d56455 --- /dev/null +++ b/Regression_test_project/src/metrics/AM_CyclomaticComplexity/AM_CyclomaticComplexity.ttcn @@ -0,0 +1,26 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module AM_CyclomaticComplexity { +import from types all; + +// cc of 6: start from 1, 2 branch, 1 while and 2 ifs. The else does not matter. +altstep as_1(test_port pl_2) runs on c1_CT +{ + [] p1_PT.receive(t1:?) { + while (true) { + if (true) {} + } + } + [] pl_2.receive(t2:*) { + if (false) {} + else {} + } + [else] {} +} + +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/AM_InEnvy/AM_InEnvy.ttcn b/Regression_test_project/src/metrics/AM_InEnvy/AM_InEnvy.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..028f5235101367df92ca2618b6d1aa66b5cdf51f --- /dev/null +++ b/Regression_test_project/src/metrics/AM_InEnvy/AM_InEnvy.ttcn @@ -0,0 +1,18 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module AM_InEnvy { +import from types all; +private type integer int; + +// two ref: pl_2 and int. +private altstep a1(test_port pl_2) { + [] pl_2.receive(t2:*) { + var int x; + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/AM_LinesOfCode/AM_LinesOfCode.ttcn b/Regression_test_project/src/metrics/AM_LinesOfCode/AM_LinesOfCode.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8148dd58f9ed2dc9174da1b3845ab417a85d49ab --- /dev/null +++ b/Regression_test_project/src/metrics/AM_LinesOfCode/AM_LinesOfCode.ttcn @@ -0,0 +1,16 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module AM_LinesOfCode { +import from types all; + +// 3 lines +private altstep a1(test_port pl_2) { + [] pl_2.receive(t2:*) {} +} + +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/AM_Nesting/AM_Nesting.ttcn b/Regression_test_project/src/metrics/AM_Nesting/AM_Nesting.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5d18f37b3eb832c7bcae164c4f66abb6a8e59587 --- /dev/null +++ b/Regression_test_project/src/metrics/AM_Nesting/AM_Nesting.ttcn @@ -0,0 +1,30 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module AM_Nesting { +import from types all; + +// nesting in depth of 4 at most (branch - while - if - if) +private altstep a1(test_port pl_2) { + [] pl_2.receive(t2:*) { + while (true) { + if (false) { + if (false) {} + else {} + } else if (true) { + + } else {} + } + + if (false) { + + } else { + do {} while(true); + } + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/AM_NumberOfParams/AM_NumberOfParams.ttcn b/Regression_test_project/src/metrics/AM_NumberOfParams/AM_NumberOfParams.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d7cc14781c722551065d4b802c1939782c86f69d --- /dev/null +++ b/Regression_test_project/src/metrics/AM_NumberOfParams/AM_NumberOfParams.ttcn @@ -0,0 +1,16 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module AM_NumberOfParams { +import from types all; + +// 1 parameter +private altstep a1(test_port pl_2) { + [] pl_2.receive(t2:*) {} +} + +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/AM_OutEnvy/AM_OutEnvy.ttcn b/Regression_test_project/src/metrics/AM_OutEnvy/AM_OutEnvy.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9a0cdb16d7a4329286a8d63319f509d6f5649c8f --- /dev/null +++ b/Regression_test_project/src/metrics/AM_OutEnvy/AM_OutEnvy.ttcn @@ -0,0 +1,20 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module AM_OutEnvy { +import from types all; +private type integer int; + +// 4 ref: test_port, t2, t1 and t2 +private altstep a1(test_port pl_2) { + [] pl_2.receive(t2:*) { + var int x; + var t1 y; + var t2 z; + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/FM_CyclomaticComplexity/FM_CyclomaticComplexity.ttcn b/Regression_test_project/src/metrics/FM_CyclomaticComplexity/FM_CyclomaticComplexity.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7fadac057bfc5ff0b2e6cb0218edb71090470b3a --- /dev/null +++ b/Regression_test_project/src/metrics/FM_CyclomaticComplexity/FM_CyclomaticComplexity.ttcn @@ -0,0 +1,19 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module FM_CyclomaticComplexity { +import from types all; + +// cyclomatic complexity: 4 +private function f1() { + while (true) { + if (true) {} + } + if (false) {} + else {} +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/FM_DefaultActivations/FM_DefaultActivations.ttcn b/Regression_test_project/src/metrics/FM_DefaultActivations/FM_DefaultActivations.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4fea80da47c0490467b68f6b005d55b192428cba --- /dev/null +++ b/Regression_test_project/src/metrics/FM_DefaultActivations/FM_DefaultActivations.ttcn @@ -0,0 +1,24 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module FM_DefaultActivations { +import from types all; + +private altstep a() { + [] any port.receive {} +} + +// activations: 3 (with cfg it should be 2, with intelligent analysis should be 1) +private function f() { + activate(a()); + if (true) { + activate(a()); + } else { + activate(a()); + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/FM_InEnvy/FM_InEnvy.ttcn b/Regression_test_project/src/metrics/FM_InEnvy/FM_InEnvy.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8e7745b58b69f3c1af366fe6842b2e0f11bcc0f4 --- /dev/null +++ b/Regression_test_project/src/metrics/FM_InEnvy/FM_InEnvy.ttcn @@ -0,0 +1,18 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module FM_InEnvy { +import from types all; +private type integer int; + +// 3 ref: int, i and i again +private function f() { + var int i; + while (true) {i := i + 1;} +} + +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/FM_LinesOfCode/FM_LinesOfCode.ttcn b/Regression_test_project/src/metrics/FM_LinesOfCode/FM_LinesOfCode.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..27687da4ceda6d38bb8c5885516f9d010f1328d2 --- /dev/null +++ b/Regression_test_project/src/metrics/FM_LinesOfCode/FM_LinesOfCode.ttcn @@ -0,0 +1,18 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module FM_LinesOfCode { +import from types all; +private type integer int; + +// 4 lines +private function f() { + var int i; + while (true) {i := i + 1;} +} + +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/FM_Nesting/FM_Nesting.ttcn b/Regression_test_project/src/metrics/FM_Nesting/FM_Nesting.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0cdf25fc0b47f4be5910b07686ee030cfc9d3bf7 --- /dev/null +++ b/Regression_test_project/src/metrics/FM_Nesting/FM_Nesting.ttcn @@ -0,0 +1,21 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module FM_Nesting { +import from types all; + +// nesting max 4 +private function f() { + var integer i; + while (true) { + if (true) { + i := i + 1; + do {} while(false); + } else {} + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/FM_NumberOfParams/FM_NumberOfParams.ttcn b/Regression_test_project/src/metrics/FM_NumberOfParams/FM_NumberOfParams.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..26f4e6108ddadd7a2f2b679c5d88e83ad82d4d5e --- /dev/null +++ b/Regression_test_project/src/metrics/FM_NumberOfParams/FM_NumberOfParams.ttcn @@ -0,0 +1,14 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module FM_NumberOfParams { +import from types all; + +// 5 parameters +private function f(t1 a, test_int_port b, in t1 c, out t1 d, inout t1 e) { +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/FM_OutEnvy/FM_OutEnvy.ttcn b/Regression_test_project/src/metrics/FM_OutEnvy/FM_OutEnvy.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..51c311c00a8bf1bec1605298a1b38b19916e032f --- /dev/null +++ b/Regression_test_project/src/metrics/FM_OutEnvy/FM_OutEnvy.ttcn @@ -0,0 +1,19 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module FM_OutEnvy { +import from types all; +private type integer int; + +// 2 ref: test_port and t2 +private function f(test_port p) { + var t1 i; + while (true) {i := i + 1;} +} + + +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/FM_ReturnPoints/FM_ReturnPoints.ttcn b/Regression_test_project/src/metrics/FM_ReturnPoints/FM_ReturnPoints.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1914a84edbac8c0ee2e6409b0c9cd01ea89caff8 --- /dev/null +++ b/Regression_test_project/src/metrics/FM_ReturnPoints/FM_ReturnPoints.ttcn @@ -0,0 +1,22 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module FM_ReturnPoints { +import from types all; + +// 4 return points +private function f() { + var t1 i; + while (true) {return;} + if (false) { + return; + } else { + i := i + 1; + return; + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/FM_ReturnPoints/FM_ReturnPoints2.ttcn b/Regression_test_project/src/metrics/FM_ReturnPoints/FM_ReturnPoints2.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..72b495b9746eb6b3ab11e65a5443f2b2d355bb73 --- /dev/null +++ b/Regression_test_project/src/metrics/FM_ReturnPoints/FM_ReturnPoints2.ttcn @@ -0,0 +1,24 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module FM_ReturnPoints2 { +import from types all; + +// still 4 return points +private function f() { + var t1 i; + while (true) {return;} + if (false) { + return; + } else { + i := i + 1; + return; + } + + return; +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_AfferentCoupling/MM_AfferentCoupling.ttcn b/Regression_test_project/src/metrics/MM_AfferentCoupling/MM_AfferentCoupling.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6a84585c545ab753e83f64c863ff43affc9475b3 --- /dev/null +++ b/Regression_test_project/src/metrics/MM_AfferentCoupling/MM_AfferentCoupling.ttcn @@ -0,0 +1,15 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_AfferentCoupling { +import from types all; + +// MM_AfferentCoupling2 uses two of these definitions, 4 times +type integer aff_int; +type boolean aff_bool; +type charstring aff_charstring; +} diff --git a/Regression_test_project/src/metrics/MM_AfferentCoupling/MM_AfferentCoupling2.ttcn b/Regression_test_project/src/metrics/MM_AfferentCoupling/MM_AfferentCoupling2.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8b5487851718bb6e8d5e6d1f62ebf8c9e1de0e7c --- /dev/null +++ b/Regression_test_project/src/metrics/MM_AfferentCoupling/MM_AfferentCoupling2.ttcn @@ -0,0 +1,21 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_AfferentCoupling2 { +import from types all; +import from MM_AfferentCoupling all; + +// it uses 4 definitions from MM_AfferentCoupling: aff_int, aff_bool, aff_int and aff_int +control { + var aff_int i := 32; + var aff_bool b := i > 23; + if (b) { + var aff_int j := i; + var aff_int k := j; + } +} +} diff --git a/Regression_test_project/src/metrics/MM_EfferentCoupling/MM_EfferentCoupling.ttcn b/Regression_test_project/src/metrics/MM_EfferentCoupling/MM_EfferentCoupling.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b8740805050e06924be8acfa7685d67c1378dae4 --- /dev/null +++ b/Regression_test_project/src/metrics/MM_EfferentCoupling/MM_EfferentCoupling.ttcn @@ -0,0 +1,16 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_EfferentCoupling { +import from types all; + +// Uses 2 definition from outside: t1 and t2 +control { + var t1 i := 54; + var t2 b := i < 2; +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_InEnvy/MM_InEnvy.ttcn b/Regression_test_project/src/metrics/MM_InEnvy/MM_InEnvy.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4ee9cac3eab2c20a4e4c93b06d052d76fa58f709 --- /dev/null +++ b/Regression_test_project/src/metrics/MM_InEnvy/MM_InEnvy.ttcn @@ -0,0 +1,18 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_InEnvy { +import from types all; + +// this module reference 3 inside entities: int, int and f +private type integer int; +private function f(int i) {} +private altstep a(int i) { + [else] {f(23)} + +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_Instability/MM_Instability.ttcn b/Regression_test_project/src/metrics/MM_Instability/MM_Instability.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..98e8d078ea05160f4062537413a53ef02df7f40f --- /dev/null +++ b/Regression_test_project/src/metrics/MM_Instability/MM_Instability.ttcn @@ -0,0 +1,20 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_Instability { +import from types all; + +// this module has aff- and eff-coupling of 2, thus instability is 0.5 +type integer aff_int; +type boolean aff_bool; +type charstring aff_charstring; + +control { + var t1 i := 54; + var t2 b := i < 2; +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_Instability/MM_Instability2.ttcn b/Regression_test_project/src/metrics/MM_Instability/MM_Instability2.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e2f9e8f41b3458c4a4a8a9d3178591b12eb70ed0 --- /dev/null +++ b/Regression_test_project/src/metrics/MM_Instability/MM_Instability2.ttcn @@ -0,0 +1,17 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_Instability2 { +import from types all; +import from MM_Instability all; + +// it uses 2 definitions from MM_Instability +control { + var aff_int i := 32; + var aff_bool b := i > 23; +} +} diff --git a/Regression_test_project/src/metrics/MM_LinesOfCode/MM_LinesOfCode.ttcn b/Regression_test_project/src/metrics/MM_LinesOfCode/MM_LinesOfCode.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7163e757da52aa536e69cba0b96504c1082246dd --- /dev/null +++ b/Regression_test_project/src/metrics/MM_LinesOfCode/MM_LinesOfCode.ttcn @@ -0,0 +1,11 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_LinesOfCode { +import from types all; +// this module has 4 lines +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_NofAltsteps/MM_NofAltsteps.ttcn b/Regression_test_project/src/metrics/MM_NofAltsteps/MM_NofAltsteps.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9cf59a3d43b61fcc638f626482cad28a065efc04 --- /dev/null +++ b/Regression_test_project/src/metrics/MM_NofAltsteps/MM_NofAltsteps.ttcn @@ -0,0 +1,18 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_NofAltsteps { +import from types all; + +// 2 altsteps +private altstep a() { + [else] {} +} +private altstep a2() { + [else] {} +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_NofFixme/MM_NofFixme.ttcn b/Regression_test_project/src/metrics/MM_NofFixme/MM_NofFixme.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..853e0c4c39ae7a69880321cfca836ebccdb4347f --- /dev/null +++ b/Regression_test_project/src/metrics/MM_NofFixme/MM_NofFixme.ttcn @@ -0,0 +1,22 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_NofFixme { +import from types all; + +// 3 fixmes + +// FIXME: + +private function f() {} // FIXME: + +control { + if (true) { + // FIXME: + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_NofFunctions/MM_NofFunctions.ttcn b/Regression_test_project/src/metrics/MM_NofFunctions/MM_NofFunctions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2b6fbfa6ea2fd4fee12f44d341d04db78cd0a3f7 --- /dev/null +++ b/Regression_test_project/src/metrics/MM_NofFunctions/MM_NofFunctions.ttcn @@ -0,0 +1,16 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_NofFunctions { +import from types all; + +// 3 functions +private function f1() {} +private function f2() {} +private function f3() {} + +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_NofImports/MM_NofImports.ttcn b/Regression_test_project/src/metrics/MM_NofImports/MM_NofImports.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a16080fae3c6a599efeaf069e0df76fba7479cad --- /dev/null +++ b/Regression_test_project/src/metrics/MM_NofImports/MM_NofImports.ttcn @@ -0,0 +1,12 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_NofImports { +import from types all; + +// 1 import +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_NofTestcases/MM_NofTestcases.ttcn b/Regression_test_project/src/metrics/MM_NofTestcases/MM_NofTestcases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e46ade9322c2faaf980a4df4a3ca291d68d0d4b3 --- /dev/null +++ b/Regression_test_project/src/metrics/MM_NofTestcases/MM_NofTestcases.ttcn @@ -0,0 +1,14 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_NofTestcases { +import from types all; + +// 2 testcases +private testcase t1() runs on c1_CT {} +private testcase t2() runs on c1_CT {} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_OutEnvy/MM_OutEnvy.ttcn b/Regression_test_project/src/metrics/MM_OutEnvy/MM_OutEnvy.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..29573c8446e0f6a3bbe79e82598ac52513a31927 --- /dev/null +++ b/Regression_test_project/src/metrics/MM_OutEnvy/MM_OutEnvy.ttcn @@ -0,0 +1,15 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_OutEnvy { +import from types all; + +// this module reference 3 outside entities, t1, t2, and c1_CT +private function f(t1 i, t2 b) {} + +private testcase t() runs on c1_CT {} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_TimesImported/MM_TimesImported.ttcn b/Regression_test_project/src/metrics/MM_TimesImported/MM_TimesImported.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c4e4960b1b880d7aba96eebb8bb53ccdab51afde --- /dev/null +++ b/Regression_test_project/src/metrics/MM_TimesImported/MM_TimesImported.ttcn @@ -0,0 +1,11 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_TimesImported { +import from types all; +// imported 2 times, in MM_TimesImportee1 and ~2 +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_TimesImported/MM_TimesImportee1.ttcn b/Regression_test_project/src/metrics/MM_TimesImported/MM_TimesImportee1.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6ad5411dacf9ff454ffbfa86064dcd0b84c81917 --- /dev/null +++ b/Regression_test_project/src/metrics/MM_TimesImported/MM_TimesImportee1.ttcn @@ -0,0 +1,10 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_TimesImportee1 { +import from MM_TimesImported all; +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/MM_TimesImported/MM_TimesImportee2.ttcn b/Regression_test_project/src/metrics/MM_TimesImported/MM_TimesImportee2.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bc9d0b6c3a43a515f0a5446ebc26f5e9fe3b829d --- /dev/null +++ b/Regression_test_project/src/metrics/MM_TimesImported/MM_TimesImportee2.ttcn @@ -0,0 +1,10 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module MM_TimesImportee2 { +import from MM_TimesImported all; +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/TM_CyclomaticComplexity/TM_CyclomaticComplexity.ttcn b/Regression_test_project/src/metrics/TM_CyclomaticComplexity/TM_CyclomaticComplexity.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4f992cf7c558558e9073421bf1261e94a886a541 --- /dev/null +++ b/Regression_test_project/src/metrics/TM_CyclomaticComplexity/TM_CyclomaticComplexity.ttcn @@ -0,0 +1,19 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module TM_CyclomaticComplexity { +import from types all; + +// cyclomatic complexity: 4 +private testcase t1() runs on c1_CT { + while (true) { + if (true) {} + } + if (false) {} + else {} +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/TM_InEnvy/TM_InEnvy.ttcn b/Regression_test_project/src/metrics/TM_InEnvy/TM_InEnvy.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..98188161f0cac360932ce32fcf9759d45fa2c009 --- /dev/null +++ b/Regression_test_project/src/metrics/TM_InEnvy/TM_InEnvy.ttcn @@ -0,0 +1,18 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module TM_InEnvy { +import from types all; +private type integer int; + +// 3 ref: int, i and i again +private testcase t() runs on c1_CT { + var int i; + while (true) {i := i + 1;} +} + +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/TM_LinesOfCode/TM_LinesOfCode.ttcn b/Regression_test_project/src/metrics/TM_LinesOfCode/TM_LinesOfCode.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..28fad5ab4162746c5188c6a97dc1015e6c8da5d8 --- /dev/null +++ b/Regression_test_project/src/metrics/TM_LinesOfCode/TM_LinesOfCode.ttcn @@ -0,0 +1,15 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module TM_LinesOfCode { +import from types all; + +// 3 lines +private testcase t() runs on c1_CT { + var t1 i := 2; +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/TM_Nesting/TM_Nesting.ttcn b/Regression_test_project/src/metrics/TM_Nesting/TM_Nesting.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2549441e80b33b335a0daac335f8a7384163c136 --- /dev/null +++ b/Regression_test_project/src/metrics/TM_Nesting/TM_Nesting.ttcn @@ -0,0 +1,21 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module TM_Nesting { +import from types all; + +// nesting max 4 +private testcase t() runs on c1_CT { + var integer i; + while (true) { + if (true) { + i := i + 1; + do {} while(false); + } else {} + } +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/TM_NumberOfParams/TM_NumberOfParams.ttcn b/Regression_test_project/src/metrics/TM_NumberOfParams/TM_NumberOfParams.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..57b0c2f7baffb9a7b0fc61daa0d48181dfc5bc82 --- /dev/null +++ b/Regression_test_project/src/metrics/TM_NumberOfParams/TM_NumberOfParams.ttcn @@ -0,0 +1,15 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module TM_NumberOfParams { +import from types all; + +// 3 parameters +private testcase t(t1 a, t2 b, t1 c) runs on c1_CT { + +} +} \ No newline at end of file diff --git a/Regression_test_project/src/metrics/TM_OutEnvy/TM_OutEnvy.ttcn b/Regression_test_project/src/metrics/TM_OutEnvy/TM_OutEnvy.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..12abc12c6301dfed8793191f66cf3237d3a519d9 --- /dev/null +++ b/Regression_test_project/src/metrics/TM_OutEnvy/TM_OutEnvy.ttcn @@ -0,0 +1,20 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module TM_OutEnvy { +import from types all; + +private type integer int; + +// 3 ref: test_port, t1 and c1_CT +private testcase t(test_port p) runs on c1_CT { + var t1 i; + while (true) {i := i + 1;} +} + + +} \ No newline at end of file diff --git a/Semantic_Analizer_Tests/.TITAN_properties b/Semantic_Analizer_Tests/.TITAN_properties new file mode 100644 index 0000000000000000000000000000000000000000..49a6b2028257db06d4c7865e7215522c6e48b293 --- /dev/null +++ b/Semantic_Analizer_Tests/.TITAN_properties @@ -0,0 +1,15 @@ + + + + + false + workingdir\Semantic_analizer_Tests.exe + Level0-SemanticCheck + + + + workingdir + + + Default + \ No newline at end of file diff --git a/Semantic_Analizer_Tests/.project b/Semantic_Analizer_Tests/.project new file mode 100644 index 0000000000000000000000000000000000000000..96e7e94f8299396937e90abdade62e8baca02bb7 --- /dev/null +++ b/Semantic_Analizer_Tests/.project @@ -0,0 +1,17 @@ + + + Semantic_Analizer_Tests + + + + + + org.eclipse.titan.designer.core.TITANBuilder + + + + + + org.eclipse.titan.designer.core.TITANNature + + diff --git a/Semantic_Analizer_Tests/Semantic_Analizer_Tests.iml b/Semantic_Analizer_Tests/Semantic_Analizer_Tests.iml new file mode 100644 index 0000000000000000000000000000000000000000..c61108a0cc22508440e577234abfe6def8cccfb7 --- /dev/null +++ b/Semantic_Analizer_Tests/Semantic_Analizer_Tests.iml @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/Semantic_Analizer_Tests/common/formatlog/.gitignore b/Semantic_Analizer_Tests/common/formatlog/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..037ad8af304f2756497b838c4a3d2d39e2b28660 --- /dev/null +++ b/Semantic_Analizer_Tests/common/formatlog/.gitignore @@ -0,0 +1 @@ +/LogFile1_formatted.log \ No newline at end of file diff --git a/Semantic_Analizer_Tests/common/formatlog/LogFile1.log b/Semantic_Analizer_Tests/common/formatlog/LogFile1.log new file mode 100644 index 0000000000000000000000000000000000000000..f1737686c5c28fde806549845b9c74e486f0f3e2 --- /dev/null +++ b/Semantic_Analizer_Tests/common/formatlog/LogFile1.log @@ -0,0 +1,10 @@ +2014/Jun/25 01:58:59.123456 Some log message from LogFile1 +2014/Jun/25 01:59:59.123456 { a = b, c = " "} Some log message from LogFile1 +2014/Jun/25 02:00:59.123456 "{ a = b}" +2014/Jun/25 03:01:59.123456 { a = +b, c = " " +}Some log message from LogFile1 +2014/Jun/25 03:05:59.123456 {{{{{{""}}}}}} +2014/Jun/25 03:06:59.123456 "\\ \\ \"" +2014/Jun/26 01:55:59.123456 Some log message from LogFile1 +2015/Jun/26 01:55:59.123456 Some log message from LogFile1 \ No newline at end of file diff --git a/Semantic_Analizer_Tests/common/formatlog/LogFile1_formatted_expected.log b/Semantic_Analizer_Tests/common/formatlog/LogFile1_formatted_expected.log new file mode 100644 index 0000000000000000000000000000000000000000..c3c064d95ae1c349b29cc3ec50c1b30c17d6e291 --- /dev/null +++ b/Semantic_Analizer_Tests/common/formatlog/LogFile1_formatted_expected.log @@ -0,0 +1,24 @@ +2014/Jun/25 01:58:59.123456 Some log message from LogFile1 +2014/Jun/25 01:59:59.123456 { + a = b, + c =" " +} Some log message from LogFile1 +2014/Jun/25 02:00:59.123456 "{ a = b}" +2014/Jun/25 03:01:59.123456 { + a = b, + c =" " +}Some log message from LogFile1 +2014/Jun/25 03:05:59.123456 { + { + { + { + { + {"" } + } + } + } + } +} +2014/Jun/25 03:06:59.123456 "\\ \\ \"" +2014/Jun/26 01:55:59.123456 Some log message from LogFile1 +2015/Jun/26 01:55:59.123456 Some log message from LogFile1 \ No newline at end of file diff --git a/Semantic_Analizer_Tests/common/mergelog/.gitignore b/Semantic_Analizer_Tests/common/mergelog/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..d5a402129226e3c0d7e86f12ee5d5a8d71206c77 --- /dev/null +++ b/Semantic_Analizer_Tests/common/mergelog/.gitignore @@ -0,0 +1 @@ +/LogFile1_merged.log \ No newline at end of file diff --git a/Semantic_Analizer_Tests/common/mergelog/LogFile1.log b/Semantic_Analizer_Tests/common/mergelog/LogFile1.log new file mode 100644 index 0000000000000000000000000000000000000000..3379c51b37f2a91cbb0ee666cce1a4ed97624f25 --- /dev/null +++ b/Semantic_Analizer_Tests/common/mergelog/LogFile1.log @@ -0,0 +1,8 @@ +2014/Jun/25 01:58:59.123456 Some log message from LogFile1 +2014/Jun/25 01:59:59.123456 Some log message from LogFile1 +2014/Jun/25 02:00:59.123456 Some log message from LogFile1 +2014/Jun/25 03:01:59.123456 Some log message from LogFile1 +2014/Jun/25 03:05:59.123456 Some log message from LogFile1 +2014/Jun/25 03:06:59.123456 Some log message from LogFile1 +2014/Jun/26 01:55:59.123456 Some log message from LogFile1 +2015/Jun/26 01:55:59.123456 Some log message from LogFile1 \ No newline at end of file diff --git a/Semantic_Analizer_Tests/common/mergelog/LogFile1_merged_expected.log b/Semantic_Analizer_Tests/common/mergelog/LogFile1_merged_expected.log new file mode 100644 index 0000000000000000000000000000000000000000..dfcff49d44a3ee8d6e5509080075deeb419552cd --- /dev/null +++ b/Semantic_Analizer_Tests/common/mergelog/LogFile1_merged_expected.log @@ -0,0 +1,14 @@ +2014/Jun/25 01:58:59.123455 LogFile2 Some log message from LogFile2 +2014/Jun/25 01:58:59.123456 LogFile1 Some log message from LogFile1 +2014/Jun/25 01:59:59.123456 LogFile1 Some log message from LogFile1 +2014/Jun/25 01:59:59.123457 LogFile2 Some log message from LogFile2 +2014/Jun/25 02:00:59.123456 LogFile1 Some log message from LogFile1 +2014/Jun/25 02:00:59.123456 LogFile2 Some log message from LogFile2 +2014/Jun/25 03:01:59.123456 LogFile1 Some log message from LogFile1 +2014/Jun/25 03:01:59.123456 LogFile2 Some log message from LogFile2 +2014/Jun/25 03:05:59.123456 LogFile1 Some log message from LogFile1 +2014/Jun/25 03:05:59.123456 LogFile2 Some log message from LogFile2 +2014/Jun/25 03:06:59.123456 LogFile1 Some log message from LogFile1 +2014/Jun/25 03:06:59.123456 LogFile2 Some log message from LogFile2 +2014/Jun/26 01:55:59.123456 LogFile1 Some log message from LogFile1 +2015/Jun/26 01:55:59.123456 LogFile1 Some log message from LogFile1 diff --git a/Semantic_Analizer_Tests/common/mergelog/LogFile2.log b/Semantic_Analizer_Tests/common/mergelog/LogFile2.log new file mode 100644 index 0000000000000000000000000000000000000000..b461a84b676e6ee3b22839b8edf180f571e41598 --- /dev/null +++ b/Semantic_Analizer_Tests/common/mergelog/LogFile2.log @@ -0,0 +1,6 @@ +2014/Jun/25 01:58:59.123455 Some log message from LogFile2 +2014/Jun/25 01:59:59.123457 Some log message from LogFile2 +2014/Jun/25 02:00:59.123456 Some log message from LogFile2 +2014/Jun/25 03:01:59.123456 Some log message from LogFile2 +2014/Jun/25 03:05:59.123456 Some log message from LogFile2 +2014/Jun/25 03:06:59.123456 Some log message from LogFile2 \ No newline at end of file diff --git a/Semantic_Analizer_Tests/src/Basic_tests/ASNTypes.asn b/Semantic_Analizer_Tests/src/Basic_tests/ASNTypes.asn new file mode 100644 index 0000000000000000000000000000000000000000..d5c19ad227af25fd0b253553cc93db5ee02c0d36 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/ASNTypes.asn @@ -0,0 +1,59 @@ +ASNTypes DEFINITIONS + +-- [(AUTOMATIC|EXPLICIT|IMPLICIT) TAGS] +-- the default is EXPLICIT TAGS + AUTOMATIC TAGS ::= + +BEGIN +-- EXPORTS ; +IMPORTS; +-- MODULE-BODY +ASNNull ::= NULL +ASNInteger ::= INTEGER +ASNReal ::= REAL +ASNBoolean ::= BOOLEAN + +ASNBitstring ::= BIT STRING +ASNBMPstring ::= BMPString +ASNGeneralstring ::= GeneralString +ASNGraphicstring ::= GraphicString +ASNIA5string ::= IA5String +ASNNumericstring ::= NumericString +ASNOctetString ::= OCTET STRING +ASNISO646String ::= ISO646String +ASNT61String ::= T61String +ASNPrintablestring ::= PrintableString +ASNTeletexstring ::= TeletexString +ASNUniversalstring ::= UniversalString +ASNUnrestrictedstring ::= CHARACTER STRING +ASNUTF8string ::= UTF8String +ASNVideotexstring ::= VideotexString +ASNVisiblestring ::= VisibleString + +ASNGeneralizedTime ::= GeneralizedTime +ASNUTCTime ::= UTCTime +ASNObjectdescriptor ::= ObjectDescriptor + +ASNSequenceType ::= SEQUENCE { + field1 INTEGER, + field2 GeneralString} + +ASNSetType ::= SET { + field1 INTEGER, + field2 GeneralString} + +ASNChoiceType ::= CHOICE { + field1 INTEGER, + field2 GeneralString} + +ASNEnumType ::= ENUMERATED { + item1 (0), + item2 (1), + item3 (2) } + +ASNSequenceOf ::= SEQUENCE OF INTEGER + +ASNSetOf ::= SET OF INTEGER + +ASNEmbeddedPDV ::= EMBEDDED PDV +END diff --git a/Semantic_Analizer_Tests/src/Basic_tests/ASNValues.asn b/Semantic_Analizer_Tests/src/Basic_tests/ASNValues.asn new file mode 100644 index 0000000000000000000000000000000000000000..46ee0a802f68ad638f19a4d85f7c98138f298f25 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/ASNValues.asn @@ -0,0 +1,102 @@ +ASNValues DEFINITIONS + +-- [(AUTOMATIC|EXPLICIT|IMPLICIT) TAGS] +-- the default is EXPLICIT TAGS + AUTOMATIC TAGS ::= + +BEGIN +IMPORTS ASNSequenceType, ASNSetType, ASNSequenceOf, ASNSetOf + FROM ASNTypes; + +c-ASNboolean1 BOOLEAN ::= TRUE +c-ASNboolean2 BOOLEAN ::= FALSE + +c-ASNinteger1 INTEGER ::= 1 +NamedNumberType ::= INTEGER { firstvalue(-100), secondvalue(0), othervalue(100) } -- named numbers +c-ASNInteger2 NamedNumberType ::= firstvalue + +c-ASNreal1 REAL ::= {mantissa 314159,base 10, exponent -10} +c-ASNreal2 REAL ::= {mantissa 1234,base 2, exponent 1} +c-ASNreal3 REAL ::= PLUS-INFINITY +c-ASNreal4 REAL ::= MINUS-INFINITY + +ASNEnumeratedType ::= ENUMERATED {a(2),b(1),..., c(0)} +c-ASNenum ASNEnumeratedType ::= a + +c-ASNbitstring1 BIT STRING ::= '0101010101010101'B +c-ASNbitstring2 BIT STRING ::= '01234567890ABCDEF'H +ASNBitstringType ::= BIT STRING{ first(0), second (1), last-in-first-octet(7) } +c-ASNbitstring3 ASNBitstringType ::= {first, last-in-first-octet} + +c-ASNoctetstring1 OCTET STRING ::= '1234567890ABCDEF'H +c-ASNoctetstring2 OCTET STRING ::= '01010101'B + +c-ASNnull NULL ::= NULL + +c-ASNobjid OBJECT IDENTIFIER ::= { itu-t(0) identified-organization(4) etsi(0) reserved(127) +etsi-identified-organization(0) ericsson(5) } +c-roid RELATIVE-OID ::= {iso(1) member-body(2) bsi(826) disc(0) ericsson(1249)} +c-etsi-objid RELATIVE-OID ::= {itu-t(0) identified-organization(4) etsi(0)} +c-etsi-ericsson RELATIVE-OID ::= {reserved(127) etsi-identified-organization(0) + ericsson(5) 3 4} +c11-21b T11 ::= f21 : {etsi-objid etsi-ericsson} +T21 ::= RELATIVE-OID +T11 ::= [APPLICATION 1] CHOICE { + f21 T21 +} + +c-etsi-desc ObjectDescriptor ::= "European Telecommunications Standards Institute" + +c-ASNBMPString1 BMPString ::= "0123456789" +c-ASNGeneralString1 GeneralString ::= "0123456789" +c-ASNGraphicString1 GraphicString ::= "0123456789" +c-ASNTeletexString1 TeletexString ::= "0123456789" +c-ASNT61String1 T61String ::= "0123456789" +c-ASNIA5String1 IA5String ::= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 add the control characters too" +c-ASNIA5String2 IA5String ::= {3,4} -- tuple format +c-ASNIA5String3 IA5String ::= {1, 1, 1, 1 } -- quadruple format +c-ASNIA5String4 IA5String ::= { "qwerty", {0 , 1}, { 0 , 0 , 0 , 0}, "uiop" } --character string list +c-ASNISO646String1 ISO646String ::= " " +c-ASNNumericString1 NumericString ::= "0123456789 " +c-ASNPrintableString1 PrintableString ::= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '()+,-./:=? " +c-ASNCharacterString1 CHARACTER STRING ::= { + identification syntaxes : + { + abstract {qw(0) er(0) ty(3)}, + transfer myObjectIdentifierValue1 + }, + string-value '0123456789ABCDEF'H +} + +c-ASNGeneralizedTime1 GeneralizedTime ::= "20030529151410.4" +c-ASNGeneralizedTime2 GeneralizedTime ::= "20030529151410.4Z" +c-ASNGeneralizedTime3 GeneralizedTime ::= "20030529151410.4 -0500" + +c-ASNUTCTime1 UTCTime ::= "0305291514Z" +c-ASNUTCTime2 UTCTime ::= "0305291514-0500" + +/*ASNSequenceType2 ::= SEQUENCE { + field1 INTEGER, + field2 GeneralString}*/ +c-ASNSequence1 ASNSequenceType ::= { field1 1, field2 "akarmi"} + +/*ASNSetType2 ::= SET { + field1 INTEGER, + field2 GeneralString}*/ +c-ASNSet1 ASNSetType ::= { field1 1, field2 "akarmi"} + +--ASNSequenceOf ::= SEQUENCE OF INTEGER +c-ASNSequenceOf ASNSequenceOf ::= { 1, 2, 3} +--ASNSetOf ::= SET OF INTEGER +c-ASNSetOf ASNSetOf ::= { 1, 2, 3} + +c-epdv1 EMBEDDED PDV ::= { + identification fixed : NULL, + data-value 'BABEFACE'H +} +c-external1 EXTERNAL ::= { + identification fixed : NULL, + data-value 'BABEFACE'H +} + +END diff --git a/Semantic_Analizer_Tests/src/Basic_tests/LazyTryCatchTest.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/LazyTryCatchTest.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c65202376f7d1df8ae188cf8bfcd35dbdac7c7dc --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/LazyTryCatchTest.ttcn @@ -0,0 +1,81 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module LazyTryCatchTest +{ + +type component MTCType +{ + var integer v_ci := 0; +} + + +function f_safe_str2int(in charstring pl_int_str, in integer pl_defval) return integer { +//function safe_str2int(in charstring pl_int_str, in integer pl_defval) return integer { + @try { + log(pl_int_str); + return 12; + //return str2int(int_str); + } + @catch(vl_err) { + log(vl_err); + return pl_defval; + } +} + +external function ef_throw(in charstring pl_msg); +testcase tc_TCLazy(in integer pl_i) runs on MTCType { + @try { + pl_i := 10 / pl_i; + //somefunction(); // this function might cause other DTEs + setverdict(pass); // this line is reached only if there was no DTE + } + @catch(vl_err) { + if (match(vl_err, pattern "*division by zero*")) { + log("division by zero detected"); + setverdict(fail); // the verdict is fail instead of error + } else { + ef_throw(vl_err); // external function used to re-throw the DTE + } + } +} + + +testcase tc_TClazy2() runs on MTCType { + @try { + for (var integer vl_i:=0; vl_i<100; vl_i:=vl_i+1) { + @try { + log("statements that can cause DTEs"); + } + @catch(vl_dte_str) { + if (match(vl_dte_str, pattern "*some pattern for minor errors*")) { + log("minor error ", vl_dte_str, " ignored, continuing load test..."); + } else { + ef_throw(vl_dte_str); + } + } + } + setverdict(pass); + } + @catch(vl_dte_msg) { + log("Something went very wrong: ", vl_dte_msg); + setverdict(fail); + } +} + +function f_MyFuncDieIfZero() runs on MTCType return integer { + if (v_ci==0) { testcase.stop; } // die if the component variable is zero + return v_ci; +} + +function f_MyLazyFunc(in @lazy integer pl_pi) runs on MTCType { + v_ci := 1; + log(pl_pi); // first use of pi -> it is evaluated, ci==1, 3*1=3 is logged + v_ci := 2; + log(pl_pi); // second use of pi -> not evaluated, the value 3 is used again +} +} diff --git a/Semantic_Analizer_Tests/src/Basic_tests/attribute_tests.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/attribute_tests.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5bfe4fe1e40909d812cee41c371c9b36f5cc977a --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/attribute_tests.ttcn @@ -0,0 +1,583 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module attribute_tests +{ +type component empty_CT +{ } + +/** +* Tests for extension attributes +**/ +group extension_attributes { + function f_emptyfunction() + { } + + // prototype checks + // functions good + function f_convert_good(in float f) return charstring + { + return float2str(f); + } with { extension "prototype(convert)" } + + function f_fast_good(in integer i, out charstring cs) + { cs := int2str(i); + } with { extension "prototype(fast)" } + function f_fast_good2(in integer i, out octetstring cs) + { cs := int2oct(i,10); + } with { extension "prototype(fast)" } + + function f_sliding_good(inout octetstring i, out charstring cs) return integer + { return 1; + } with { extension "prototype(sliding)" } + function f_sliding_good2(inout charstring i, out charstring cs) return integer + { return 1; + } with { extension "prototype(sliding)" } + + function f_backtrack_good(in octetstring i, out charstring cs) return integer + { return 1; + } with { extension "prototype(backtrack)" } + function f_backtrack_good2(in charstring i, out charstring cs) return integer + { return 1; + } with { extension "prototype(backtrack)" } + + // function/convert bad + function f_convert_bad() return charstring + { + return ""; + } with { extension "prototype(convert)" } + function f_convert_bad2(in float f, in float f2) return charstring + { + return float2str(f); + } with { extension "prototype(convert)" } + function f_convert_bad3(out float f) return charstring + { + return float2str(f); + } with { extension "prototype(convert)" } + function f_convert_bad4(inout float f) return charstring + { + return float2str(f); + } with { extension "prototype(convert)" } + function f_convert_bad5(in float f) + { } with { extension "prototype(convert)" } + function f_convert_bad6(in float f) return template charstring + { return float2str(f); + } with { extension "prototype(convert)" } + function f_convert_bad7(in float f) runs on empty_CT return charstring + { return float2str(f); + } with { extension "prototype(convert)" } + + // function/fast bad + function f_fast_bad(in integer i) + {} with { extension "prototype(fast)" } + function f_fast_bad2(in integer i, out charstring cs, out charstring cs2) + { cs := int2str(i); + } with { extension "prototype(fast)" } + function f_fast_bad3(out integer i, out charstring cs) + { cs := int2str(i); + } with { extension "prototype(fast)" } + function f_fast_bad4(inout integer i, out charstring cs) + { cs := int2str(i); + } with { extension "prototype(fast)" } + function f_fast_bad5(in integer i, charstring cs) + { cs := int2str(i); + } with { extension "prototype(fast)" } + function f_fast_bad6(in integer i, in charstring cs) + { cs := int2str(i); + } with { extension "prototype(fast)" } + function f_fast_bad7(in integer i, inout charstring cs) + { cs := int2str(i); + } with { extension "prototype(fast)" } + function f_fast_bad8(in integer i, out charstring cs) return integer + { return i; + } with { extension "prototype(fast)" } + function f_fast_bad9(in integer i, out charstring cs) runs on empty_CT + { cs := int2str(i); + } with { extension "prototype(fast)" } + + // function/sliding bad + function f_sliding_bad(inout octetstring i) return integer + { return 1; + } with { extension "prototype(sliding)" } + function f_sliding_bad2(inout octetstring i, out charstring cs, out charstring cs2) return integer + { return 1; + } with { extension "prototype(sliding)" } + function f_sliding_bad3(octetstring i, out charstring cs) return integer + { return 1; + } with { extension "prototype(sliding)" } + function f_sliding_bad4(in octetstring i, out charstring cs) return integer + { return 1; + } with { extension "prototype(sliding)" } + function f_sliding_bad5(out octetstring i, out charstring cs) return integer + { return 1; + } with { extension "prototype(sliding)" } + function f_sliding_bad6(inout integer i, out charstring cs) return integer + { return 1; + } with { extension "prototype(sliding)" } + function f_sliding_bad7(inout octetstring i, out charstring cs) + { } with { extension "prototype(sliding)" } + function f_sliding_bad8(inout octetstring i, out charstring cs) return template integer + { return 1; + } with { extension "prototype(sliding)" } + function f_sliding_bad9(inout octetstring i, out charstring cs) return charstring + { return ""; + } with { extension "prototype(sliding)" } + function f_sliding_bad10(inout octetstring i, out charstring cs) runs on empty_CT return integer + { return 1; + } with { extension "prototype(sliding)" } + + // function/backtrack bad + function f_backtrack_bad(in octetstring i) return integer + { return 1; + } with { extension "prototype(backtrack)" } + function f_backtrack_bad2(in octetstring i, out charstring cs, out charstring cs2) return integer + { return 1; + } with { extension "prototype(backtrack)" } + function f_backtrack_bad3(out octetstring i, out charstring cs) return integer + { return 1; + } with { extension "prototype(backtrack)" } + function f_backtrack_bad4(inout octetstring i, out charstring cs) return integer + { return 1; + } with { extension "prototype(backtrack)" } + function f_backtrack_bad5(in octetstring i, out charstring cs) + {} with { extension "prototype(backtrack)" } + function f_backtrack_bad6(in octetstring i, out charstring cs) return template integer + { return 1; + } with { extension "prototype(backtrack)" } + function f_backtrack_bad7(in octetstring i, out charstring cs) return charstring + { return ""; + } with { extension "prototype(backtrack)" } + + // external function encodings checks + // external functions good + external function f_encode_good(in charstring pdu) return octetstring + with { extension "prototype(convert) encode(BER:BER_ENCODE_DER) errorbehavior(ALL:WARNING)" } + + external function f_decode_good(in octetstring os, out charstring pdu) return integer + with { extension "prototype(backtrack) decode(BER:BER_ACCEPT_ALL) errorbehavior(ALL:WARNING)" } + + // external functions bad + external function f_encode_bad(in charstring pdu) return octetstring + with { extension "prototype(convert) prototype(convert) encode(BER:BER_ENCODE_DER)" } + external function f_encode_bad2(in charstring pdu) return octetstring + with { extension "prototype(convert) encode(BER:BER_ENCODE_DER) encode(BER:BER_ENCODE_DER)" } + external function f_encode_bad3(in charstring pdu) return octetstring + with { extension "prototype(convert) errorbehavior(ALL:WARNING)" } + external function f_encode_bad4(in charstring pdu) return octetstring + with { extension "encode(BER:BER_ENCODE_DER) errorbehavior(ALL:WARNING)" } + external function f_encode_bad5(in charstring pdu, out charstring cs) return integer + with { extension "prototype(backtrack) encode(BER:BER_ENCODE_DER) errorbehavior(ALL:WARNING)" } + external function f_encode_bad6(inout charstring pdu, out charstring cs) return integer + with { extension "prototype(sliding) encode(BER:BER_ENCODE_DER) errorbehavior(ALL:WARNING)" } + + external function f_decode_bad(in octetstring os, out charstring pdu) return integer + with { extension "prototype(backtrack) decode(BER:BER_ACCEPT_ALL) decode(BER:BER_ACCEPT_ALL)" } + external function f_decode_bad2(in octetstring os, out charstring pdu) return integer + with { extension "prototype(backtrack) encode(BER:BER_ENCODE_DER) decode(BER:BER_ACCEPT_ALL)" } + external function f_decode_bad3(in charstring pdu) return octetstring + with { extension "prototype(convert) errorbehavior(ALL:WARNING)" } + external function f_decode_bad4(in charstring pdu) return octetstring + with { extension "decode(BER:BER_ENCODE_DER) errorbehavior(ALL:WARNING)" } + + /** + * Tests for implicit message encoding: dual faced ports + **/ + type charstring address; + external function f_encode_good(in charstring pdu) return octetstring + with { extension "prototype(convert) encode(BER:BER_ENCODE_DER) errorbehavior(ALL:WARNING)" } + + type port internal_port_good message + { inout integer } with { extension "internal" }; + type port address_port_good message + { inout integer } with { extension "address" }; + type port provider_port_good message + { inout integer } with { extension "provider" }; + type port user_port_good message + { inout integer + } with { extension "user provider_port_good + in(integer -> integer : simple) + out(integer -> integer : simple)" }; + type port user_port_good2 message + { inout integer + } with { extension "user provider_port_good in(integer -> - : discard) + out(integer -> - : discard)" }; + type port user_port_good3 message + { inout integer + } with { extension "user provider_port_good in(integer -> integer : encode(BER:BER_ENCODE_DER) errorbehavior(ALL:WARNING)) + out(integer -> integer : decode(BER:BER_ENCODE_DER) errorbehavior(ALL:WARNING))" }; + type port user_port_good4 message + { in octetstring + } with { extension "user provider_port_good in(integer -> octetstring : function(f_encode_good))" }; + + // bad ports + type port internal_port_bad message + { inout integer } with { extension "internal" extension "internal" }; + type port internal_port_bad2 message + { inout integer } with { extension "internal" extension "address" }; + type port internal_port_bad3 message + { inout integer } with { extension "address" extension "internal" }; + + type port address_port_bad message + { inout integer } with { extension "address" extension "address"}; + + type port provider_port_bad message + { inout integer } with { extension "provider" extension "provider" }; + + type port user_port_bad message + { in integer + } with { extension "user address_port_nonExi in(integer -> integer : simple)" }; + type port user_port_bad2 message + { in integer + } with { extension "user address_port_good in(integer -> integer : simple)" }; + type port user_port_bad3 message + { in integer + } with { extension "user f_encode_good in(integer -> integer : simple)" }; + type port user_port_bad4 message + { in integer + } with { extension "user internal_port_good in(integer -> integer : simple)" }; + type port user_port_bad5 message + { in integer + } with { extension "user provider_port_good in(integer -> integer : simple) + user provider_port_good in(integer -> integer : simple)" }; + type port user_port_bad6 message + { in integer + } with { extension "provider user provider_port_good in(integer -> integer : simple)" }; + type port user_port_bad7 message + { in integer + } with { extension "user provider_port_good in(integer -> integer : simple) provider" }; + type port user_port_bad8 message + { in integer, charstring + } with { extension "user provider_port_good in(integer -> charstring : simple)" }; + type port user_port_bad9 message + { in integer, charstring + } with { extension "user provider_port_good in(charstring -> integer : simple)" }; + type port user_port_bad10 message + { in integer, charstring + } with { extension "user provider_port_good in(octetstring -> octetstring : simple)" }; + type port user_port_bad11 message + { out integer, charstring + } with { extension "user provider_port_good in(octetstring -> octetstring : simple)" }; + type port user_port_bad12 message + { in integer, charstring + } with { extension "user provider_port_good out(octetstring -> octetstring : simple)" }; + type port user_port_bad13 message + { out charstring + } with { extension "user provider_port_good out(octetstring -> charstring : simple)" }; + type port user_port_bad14 message + { in octetstring + } with { extension "user provider_port_good in(charstring_nonExi -> octetstring_nonExi : function(f_nonExi))" }; + type port user_port_bad15 message + { in octetstring + } with { extension "user provider_port_good in(integer -> octetstring : function(f_emptyfunction))" }; + type port user_port_bad16 message + { in octetstring + } with { extension "user provider_port_good in(integer -> octetstring : function(user_port_good))" }; + type port user_port_bad17 message + { in octetstring + } with { extension "user provider_port_good in(hexstring -> octetstring : function(f_fast_good))" }; + type port user_port_bad18 message + { in octetstring + } with { extension "user provider_port_good in(integer -> octetstring : function(f_fast_good2))" }; + type port user_port_bad19 message + { in octetstring + } with { extension "user provider_port_good in(integer -> octetstring : function(f_fast_good2), + charstring : function(f_fast_good) + )" }; + + /** + * Tests for component extension + **/ + type component Attr_A { var integer i; var integer i2; var integer i3; private var integer v_private_int_A; } + type component A {var integer pub_A; private var integer priv_A;}; + type component B extends A + { var integer i2; + private var integer v_private_int_B; + } + type component C extends B { + var integer i; // definitions of A must be repeated + var octetstring o; // new definitions may be added + private var integer v_private_int_A; // inherited from A + private var integer v_private_int_in_C; + } with { + extension "extends Attr_A" + } + + function f_use_inherited_member() runs on C { + i := 41; + i2 := 42; + v_private_int_in_C := 43; + v_private_int_A := 44; + v_private_int_B := 45; + pub_A := 46; + priv_A := 47; + } + type port extendedPort message + { + inout integer + } + type port extendedPort2 message + { + inout integer + } + type component original + { + const integer c1 := 0; + const integer c2 := 0; + const integer c3 := 0; + var integer v1; + var integer v2; + var integer v3; + var integer v4 := 0; + var integer v5 := 0; + var template integer vt1; + var template integer vt2; + var template integer vt3; + var template integer vt4; + var template integer vt5 := 0; + var template integer vt6 := 0; + timer t1; + timer t2; + timer t3; + timer t4[2]; + timer t5[2]; + timer t6; + timer t7 := 0.0; + timer t8; + timer t9 := 0.0; + timer t10 := 0.0; + port extendedPort p1; + port extendedPort p2; + port extendedPort p3; + port extendedPort p4[2]; + port extendedPort p5; + port extendedPort p6[2]; + } + type component extended + { + var integer c1 := 1; + const integer c2 := 1; + const charstring c3 := ""; + const integer v1 := 0; + var charstring v2 := ""; + var integer v3 := 0; + var integer v4; + var integer v5 := 1; + var integer vt1; + var template charstring vt2; + var template integer vt3; + var template integer vt4 := 0; + var template integer vt5; + var template integer vt6 := 1; + const integer t1 := 0; + timer t2; + timer t3[2]; + timer t4; + timer t5[2]; + timer t6; + timer t7; + timer t8 := 0.0; + timer t9 := 0.0; + timer t10 := 1.0; + var integer p1; + port extendedPort2 p2; + port extendedPort p3; + port extendedPort p4; + port extendedPort p5[2]; + port extendedPort p6[2]; + } with { + extension "extends original" + } +} + +// qualifier usage related tests +type record qualifierHelper +{ + integer field1, + integer field2 +}; + + +type record qualifierRecord +{ + record of integer attr, + record of integer elem_list +} +with { +encode "XML"; +variant "XSD:anyType"; +variant (attr) "anyAttributes"; +variant (attr[-]) "anyAttributes"; +variant (elem_list) "anyElement"; +variant (attr2, attr3) "anyAttributes"; +variant ([1]) "anyAttributes"; +variant ([-]) "anyAttributes"; +extension (attr) "prototype(convert)"; +extension ([-]) "prototype(convert)" +}; + +type record of qualifierHelper qualifierRecordOf +with { +encode "XML"; +variant "XSD:anyType"; +variant (attr) "anyAttributes"; +variant (elem_list) "anyElement"; +variant (attr2) "anyAttributes"; +variant ([1]) "anyAttributes"; +variant ([-]) "anyAttributes"; +variant ([-].field1) "anyAttributes"; +variant ([-].field2) "anyAttributes"; +extension (attr) "prototype(convert)"; +extension ([-]) "prototype(convert)" +}; + +type set of integer qualifierSetOf +with { +encode "XML"; +variant "XSD:anyType"; +variant (attr) "anyAttributes"; +variant (elem_list) "anyElement"; +variant (attr2) "anyAttributes"; +variant ([1]) "anyAttributes"; +variant ([-]) "anyAttributes"; +extension (attr) "prototype(convert)"; +extension ([-]) "prototype(convert)" +}; + +function f_qualiferFunction() +{} with { +variant "XSD:anyType"; +variant (attr) "anyAttributes"; +variant (elem_list) "anyElement"; +variant ([1]) "anyAttributes"; +variant ([-]) "anyAttributes"; +}; + +function f_qualifierFunction2(in float f) return charstring +{ + return float2str(f); +} with { +extension (attr) "prototype(convert)"; +extension ([-]) "prototype(convert)" +} + +type integer attributeQualifierTester1 + with { + extension (a, [1], [0], [-], + a.a, a.boolean, a.bitstring, a.hexstring, a.octetstring, a.charstring, a.integer, a.float, a.verdicttype, a.anytype, + a[1].b, a[0].b, a[-].b, + group all, group all except {a, a.b}, + type all, type all except {a, b}, + template all, template all except {a, b}, + const all, const all except {a, b}, + testcase all, testcase all except {a, b}, + function all, function all except {a, b}, + altstep all, altstep all except {a, b}, + signature all, signature all except {a, b}, + modulepar all, modulepar all except {a, b}) "freetext" + display "freeDisplay" + optional "implicit omit" + optional "explicit omit" + } + +type record attributeQualifierTester2 { + integer field1, + integer field2 +} + with { + extension (a, [1], [0], [-], + a.a, a.boolean, a.bitstring, a.hexstring, a.octetstring, a.charstring, a.integer, a.float, a.verdicttype, a.anytype, + a[1].b, a[0].b, a[-].b, + group all, group all except {a, a.b}, + type all, type all except {a, b}, + template all, template all except {a, b}, + const all, const all except {a, b}, + testcase all, testcase all except {a, b}, + function all, function all except {a, b}, + altstep all, altstep all except {a, b}, + signature all, signature all except {a, b}, + modulepar all, modulepar all except {a, b}) "freetext" + display "freeDisplay" + optional "implicit omit" + optional "explicit omit" + } + +type record of integer attributeQualifierTester3 + with { + extension (a, [1], [0], [-], + a.a, a.boolean, a.bitstring, a.hexstring, a.octetstring, a.charstring, a.integer, a.float, a.verdicttype, a.anytype, + a[1].b, a[0].b, a[-].b, + group all, group all except {a, a.b}, + type all, type all except {a, b}, + template all, template all except {a, b}, + const all, const all except {a, b}, + testcase all, testcase all except {a, b}, + function all, function all except {a, b}, + altstep all, altstep all except {a, b}, + signature all, signature all except {a, b}, + modulepar all, modulepar all except {a, b}) "freetext" + display "freeDisplay" + optional "implicit omit" + optional "explicit omit" + } + +} with { extension "version " +extension "version R8B" +extension "version R8B1" +extension "version " +extension "version K8B" +extension "version R8" +extension "version R8B1K" +extension "version R2147483648B" +extension "version R8B2147483648" +extension "version CNL 113 300 R8B" +extension "version CNL 113 300/1 R8B" +extension "version CRL 113 300 R8B" +extension "version CRL 113 300/1 R8B" +extension "version CN 113 300 R8B" +extension "version CNL 113 300 R8" +extension "requires nonExi R8B1" +extension "requires nonExi CNL 113 300 R8B" +extension "requires nonExi CNL 113 300/1 R8B" +extension "requires nonExi CRL 113 300 R8B" +extension "requires nonExi CRL 113 300/1 R8B" +extension "requires nonExi CN 113 300 R8B" +extension "requires nonExi CNL 113 300 R8" +extension "requiresTITAN R8B" +extension "requiresTITAN R8B1" +extension "requiresTITAN R80B1" +extension "requiresTITAN K8B" +extension "requiresTITAN R8" +extension "requiresTITAN R8B1K" +extension "requiresTITAN R2147483648B" +extension "requiresTITAN R8B2147483648" +extension "requiresTITAN CNL 113 300 R8B" +extension "requiresTITAN CNL 113 300/1 R8B" +extension "requiresTITAN CRL 113 300 R8B" +extension "requiresTITAN CRL 113 300/1 R8B" +extension "requiresTITAN CN 113 300 R8B" +extension "requiresTITAN CNL 113 300 R8" +extension (a, [1], [0], [-], + a.a, a.boolean, a.bitstring, a.hexstring, a.octetstring, a.charstring, a.integer, a.float, a.verdicttype, a.anytype, + a[1].b, a[0].b, a[-].b, + group all, group all except {a, a.b}, + type all, type all except {a, b}, + template all, template all except {a, b}, + const all, const all except {a, b}, + testcase all, testcase all except {a, b}, + function all, function all except {a, b}, + altstep all, altstep all except {a, b}, + signature all, signature all except {a, b}, + modulepar all, modulepar all except {a, b}) "freetext" + display "freeDisplay" + optional "implicit omit" + optional "explicit omit" +} diff --git a/Semantic_Analizer_Tests/src/Basic_tests/expression_tests.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/expression_tests.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..37745b5ac02edf5808c12564a36e092874237406 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/expression_tests.ttcn @@ -0,0 +1,3258 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module expression_tests +{ +import from ASNValues all; + +external const integer ec_ext_integer; +modulepar integer tsppar_integer; + +type enumerated myenum1 {xx1,xx2,xx3}; +type enumerated TTCN3EnumeratedType { item1(0), item2, item3 (2), item4 (1) }; + +const boolean cg_boolean := true; +const integer cg_integer := 5; +const float cg_float := 5.5; +const bitstring cg_bitstring := '00'B; +const hexstring cg_hexstring := '00'H; +const octetstring cg_octetstring := '00'O; +const charstring cg_charstring := "akarmi"; +const universal charstring cg_universalchar := char(0,0,0,0); +const universal charstring cg_universalcharstring := char(0,0,0,40) & char(0,0,0,40); +/* RECORDS ******************************************************************/ +type record myrec1 { integer f1 } +type record myrec2 { integer f1 } +type record myrec3 { integer f1 optional } +type record myrec4 { integer f1, integer f2 } +type record myrec5 { integer f1 optional, integer f2 } +type record myrec6 { integer f1, integer f2 optional } +type record myrec7 { integer f1 optional, integer f2 optional } + +type record recordInner {integer f1, integer f2}; +type record recordOuter {recordInner f1, integer f2}; + +/* RECORDOFS ****************************************************************/ +type record of integer myrecof1 +type record of integer myrecof2 +type record of charstring myCharstringRecof; +type record of myrec1 myrecof3; + +/* ARRAYS *******************************************************************/ +type integer myarr1[1] +type integer myarr2[1] +type integer myarr3[4] + +/* SETS *********************************************************************/ +type set myset1 { integer f1 } +type set myset2 { integer f1 } +type set myset3 { integer f1 optional } +type set myset4 { integer f1, integer f2 } +type set myset5 { integer f1 optional, integer f2 } +type set myset6 { integer f1, integer f2 optional } +type set myset7 { integer f1 optional, integer f2 optional } + +/* SETOFS *******************************************************************/ +type set of integer mysetof1 +type set of integer mysetof2 + +/* CHOICES ******************************************************************/ +type union myuni { + integer f1, + integer f2 +} + +type union myuni1 { + myrec1 f1, + myrec2 f2 +} + +type union myuni2 { + myrec2 f1, + myrec1 f2 +} + +type union myuni3 { + myrecof3 f1 +} + +type component componentName_CT {} +type component componentName_CT2 +{ + const integer c_const1 := 1; + timer T_compTimer; +} + +type testcase t_testcase() runs on componentName_CT system componentName_CT; +testcase tc_c_testcase() runs on componentName_CT system componentName_CT {} +type function t_function(); +type function t_function2() return integer; +type function t_function3() runs on componentName_CT return integer; +type function t_function4() return template integer; +function f_functionName() {} +type altstep t_altstep() runs on componentName_CT; +type altstep t_altstep2(inout integer pl_parameterName) runs on componentName_CT2; +altstep as_altstepName(inout integer pl_parameterName) +runs on componentName_CT2 +{ + [] T_compTimer.timeout { } + [else] { } +} + + + +function f_notExpression() +{ + { const boolean cl_i := not cg_boolean; } + + { const boolean cl_i := not true; + if (cl_i == false) {} + } + + { var boolean vl_i := not omit; } + { var boolean vl_i := not 5; } + { var boolean vl_i := not 5.5; } + { var boolean vl_i := not "akarmi"; } + { var boolean vl_i := not char(0,0,0,0); } + { var boolean vl_i := not 'aa'O; } + { var boolean vl_i := not '00'B; } + { var boolean vl_i := not '00'H; } + { var boolean vl_i := not pass; } + { var boolean vl_i := not xx1; } + { var boolean vl_i := not null; } + { var boolean vl_i := not cg_integer; } + { var boolean vl_i := not cg_float; } + { var boolean vl_i := not cg_bitstring; } + { var boolean vl_i := not cg_hexstring; } + { var boolean vl_i := not cg_octetstring; } + { var boolean vl_i := not cg_charstring; } + { var boolean vl_i := not cg_universalchar; } +} + +function f_unaryPlusExpression() +{ + { const integer cl_i := + cg_integer; } + { var float vl_i := + cg_float; } + + { var integer vl_i := + omit; } + { var integer vl_i := + true; } + { var integer vl_i := + false; } + { var integer vl_i := + "akarmi"; } + { var integer vl_i := + char(0,0,0,0); } + { var integer vl_i := + 'aa'O; } + { var integer vl_i := + '00'B; } + { var integer vl_i := + '00'H; } + { var integer vl_i := + pass; } + { var integer vl_i := + xx1; } + { var integer vl_i := + null; } + { var integer vl_i := + cg_boolean; } + { var integer vl_i := + cg_bitstring; } + { var integer vl_i := + cg_hexstring; } + { var integer vl_i := + cg_octetstring; } + { var integer vl_i := + cg_charstring; } + { var integer vl_i := + cg_universalchar; } +} + +function f_unaryMinusExpression() +{ + { const integer cl_i := - cg_integer; } + { var float vl_i := - cg_float; } + + { const integer cl_i := - (5); + if (cl_i == -5) {} + } + { const float cl_i := - (5.5); + if (cl_i == -5.5) {} + } + + { var integer vl_i := - omit; } + { var integer vl_i := - true; } + { var integer vl_i := - false; } + { var integer vl_i := - "akarmi"; } + { var integer vl_i := - char(0,0,0,0); } + { var integer vl_i := - 'aa'O; } + { var integer vl_i := - '00'B; } + { var integer vl_i := - '00'H; } + { var integer vl_i := - pass; } + { var integer vl_i := - xx1; } + { var integer vl_i := - null; } + { var integer vl_i := - cg_boolean; } + { var integer vl_i := - cg_bitstring; } + { var integer vl_i := - cg_hexstring; } + { var integer vl_i := - cg_octetstring; } + { var integer vl_i := - cg_charstring; } + { var integer vl_i := - cg_universalchar; } +} + +function f_multiplyOperationTests() +{ + {const integer cl_i := 5 * 5; } + {var integer vl_i := cg_integer * cg_integer; } + {var float vl_i := 5.5 * 5.5; } + {var float vl_i := cg_float * cg_float; } + + {const integer cl_i := 5 * 5; + if (cl_i == 25) {} + } + {const float cl_i := 5.0 * 5.0; + if (cl_i == 25.0) {} + } + + {var integer vl_i := 5.5 * 5; } + {var integer vl_i := 5 * 5.5; } + {var float vl_i := 5.5 * 5; } + {var float vl_i := 5 * 5.5; } + {var float vl_i := "akarmi" * char(0,0,0,0); } + {var integer vl_i := ''B * ''H; } + {var integer vl_i := true * true; } + {var integer vl_i := false * true; } + {var integer vl_i := none * pass; } + {var integer vl_i := xx1 * xx1; } + {var integer vl_i := null * null; } + {var integer vl_i := cg_integer * cg_float; } + {var integer vl_i := cg_integer * cg_bitstring; } + {var integer vl_i := 5 * cg_octetstring; } + {var integer vl_i := 5 * cg_hexstring; } + {var integer vl_i := 5 * cg_charstring; } + {var integer vl_i := 5 * cg_universalchar; } + {var float vl_i := infinity * 1.0;} + {var float vl_i := -infinity * 1.0;} + {var float vl_i := 1.0 * infinity;} + {var float vl_i := 1.0 * -infinity;} +} + +function f_addOperationTests() +{ + {const integer cl_i := 5 + 5; } + {var integer vl_i := cg_integer + cg_integer; } + {var float vl_i := 5.5 + 5.5; } + {var float vl_i := cg_float + cg_float; } + + {const integer cl_i := 5 + 5; + if (cl_i == 10) {} + } + {const float cl_i := 5.0 + 5.0; + if (cl_i == 10.0) {} + } + + {var integer vl_i := 5.5 + 5; } + {var integer vl_i := 5 + 5.5; } + {var float vl_i := 5.5 + 5; } + {var float vl_i := 5 + 5.5; } + {var float vl_i := "akarmi" + char(0,0,0,0); } + {var integer vl_i := ''B + ''H; } + {var integer vl_i := true + true; } + {var integer vl_i := false + true; } + {var integer vl_i := none + pass; } + {var integer vl_i := xx1 + xx1; } + {var integer vl_i := null + null; } + {var integer vl_i := cg_integer + cg_float; } + {var integer vl_i := cg_integer + cg_bitstring; } + {var integer vl_i := 5 + cg_octetstring; } + {var integer vl_i := 5 + cg_hexstring; } + {var integer vl_i := 5 + cg_charstring; } + {var integer vl_i := 5 + cg_universalchar; } + {var float vl_i := infinity + 1.0;} + {var float vl_i := -infinity + 1.0;} + {var float vl_i := 1.0 + infinity;} + {var float vl_i := 1.0 + -infinity;} +} + +function f_substractOperationTests() +{ + {const integer cl_i := 5 - 5; } + {var integer vl_i := cg_integer - cg_integer; } + {var float vl_i := 5.5 - 5.5; } + {var float vl_i := cg_float - cg_float; } + + {const integer cl_i := 5 - 5; + if (cl_i == 0) {} + } + {const float cl_i := 5.0 - 5.0; + if (cl_i == 0.0) {} + } + + {var integer vl_i := 5.5 - 5; } + {var integer vl_i := 5 - 5.5; } + {var float vl_i := 5.5 - 5; } + {var float vl_i := 5 - 5.5; } + {var float vl_i := "akarmi" - char(0,0,0,0); } + {var integer vl_i := ''B - ''H; } + {var integer vl_i := true - true; } + {var integer vl_i := false - true; } + {var integer vl_i := pass - none; } + {var integer vl_i := xx1 - xx1; } + {var integer vl_i := null - null; } + {var integer vl_i := cg_integer - cg_float; } + {var integer vl_i := cg_integer - cg_bitstring; } + {var integer vl_i := 5 - cg_octetstring; } + {var integer vl_i := 5 - cg_hexstring; } + {var integer vl_i := 5 - cg_charstring; } + {var integer vl_i := 5 - cg_universalchar; } + {var float vl_i := infinity - 1.0;} + {var float vl_i := -infinity - 1.0;} + {var float vl_i := 1.0 - infinity;} + {var float vl_i := 1.0 - -infinity;} +} + +function f_divideOperationTests() +{ + {const integer cl_i := 5 / 5; } + {var integer vl_i := cg_integer / cg_integer; } + {var float vl_i := 5.5 / 5.5; } + {var float vl_i := cg_float / cg_float; } + + {const integer cl_i := 5 / 5; + if (cl_i == 1) {} + } + {const float cl_i := 5.5 / 5.5; + if (cl_i == 1.0) {} + } + + {var integer vl_i := 5.5 / 5; } + {var integer vl_i := 5 / 5.5; } + {var integer vl_i := "akarmi" / char(0,0,0,0); } + {var integer vl_i := 5 / 0; } + {var integer vl_i := 5 / (5-5); } + {var float vl_i := 5.5 / 5; } + {var float vl_i := 5.5 / 0; } + {var float vl_i := 5.5 / (5.5-5.5); } + {var float vl_i := 5 / 5.5; } + {var integer vl_i := ''B / ''H; } + {var integer vl_i := true / true; } + {var integer vl_i := false / true; } + {var integer vl_i := pass / none; } + {var integer vl_i := xx1 / xx1; } + {var integer vl_i := null / null; } + {var integer vl_i := cg_integer / cg_float; } + {var integer vl_i := cg_integer / cg_bitstring; } + {var integer vl_i := 5 / cg_octetstring; } + {var integer vl_i := 5 / cg_hexstring; } + {var integer vl_i := 5 / cg_charstring; } + {var integer vl_i := 5 / cg_universalchar; } + {var float vl_i := infinity / 1.0;} + {var float vl_i := -infinity / 1.0;} + {var float vl_i := 1.0 / infinity;} + {var float vl_i := 1.0 / -infinity;} +} + +function f_moduloOperationTests() +{ + {const integer cl_i := 5 mod 5; } + {var integer vl_i := cg_integer mod cg_integer; } + + {const integer cl_i := 1 mod 5; + if (cl_i == 1) {} + } + {const integer cl_i := -4 mod 5; + if (cl_i == 1) {} + } + + {var integer vl_i := 5.5 mod 5; } + {var integer vl_i := 5 mod 5.5; } + {var integer vl_i := 5 mod 0; } + {var integer vl_i := 5 mod (5-5); } + {var integer vl_i := "akarmi" mod char(0,0,0,0); } + {var integer vl_i := ''B mod ''H; } + {var integer vl_i := true mod true; } + {var integer vl_i := false mod true; } + {var integer vl_i := pass mod pass; } + {var integer vl_i := xx1 mod xx1; } + {var integer vl_i := null mod null; } + {var integer vl_i := cg_boolean mod cg_float; } + {var integer vl_i := cg_charstring mod cg_bitstring; } + {var integer vl_i := cg_hexstring mod cg_octetstring; } + {var integer vl_i := cg_universalchar mod cg_universalchar; } +} + +function f_remainderOperationTests() +{ + {const integer cl_i := 5 rem 5; } + {var integer vl_i := cg_integer rem cg_integer; } + + {const integer cl_i := 1 rem 5; + if (cl_i == 1) {} + } + {const integer cl_i := -4 rem 5; + if (cl_i == -4) {} + } + + {var integer vl_i := 5.5 rem 5; } + {var integer vl_i := 5 rem 5.5; } + {var integer vl_i := 5 rem 0; } + {var integer vl_i := 5 rem (5-5); } + {var integer vl_i := "akarmi" rem char(0,0,0,0); } + {var integer vl_i := ''B rem ''H; } + {var integer vl_i := true rem true; } + {var integer vl_i := false rem true; } + {var integer vl_i := pass rem pass; } + {var integer vl_i := xx1 rem xx1; } + {var integer vl_i := null rem null; } + {var integer vl_i := cg_boolean rem cg_float; } + {var integer vl_i := cg_charstring rem cg_bitstring; } + {var integer vl_i := cg_hexstring rem cg_octetstring; } + {var integer vl_i := cg_universalchar rem cg_universalchar; } +} + +function f_andOperationTests() +{ + {const boolean cl_i := true and false; } + {var boolean vl_i := cg_boolean and cg_boolean; } + + {const boolean cl_i := true and false; + if (cl_i == false) {} + if ((false and false) == false) {} + if ((true and true) == true) {} + if ((true and false) == false) {} + if ((false and true) == false) {} + } + + {var boolean vl_i := 5.5 and false; } + {var boolean vl_i := true and 5.5; } + {var boolean vl_i := 5.5 and 5.5; } + {var boolean vl_i := "akarmi" and char(0,0,0,0); } + {var boolean vl_i := pass and pass; } + {var boolean vl_i := xx1 and xx1; } + {var boolean vl_i := null and null; } + {var integer vl_i := cg_integer and cg_float; } + {var integer vl_i := cg_charstring and cg_bitstring; } + {var integer vl_i := cg_hexstring and cg_octetstring; } + {var integer vl_i := cg_universalchar and cg_universalchar; } +} + +function f_orOperationTests() +{ + {const boolean cl_i := true or false; } + {var boolean vl_i := true or false; } + {var boolean vl_i := false or true; } + {var boolean vl_i := cg_boolean or cg_boolean; } + + {const boolean cl_i := true or false; + if (cl_i == true) {} + if ((false or false) == false) {} + if ((true or true) == true) {} + if ((true or false) == true) {} + if ((false or true) == true) {} + } + + {var boolean vl_i := 5.5 or false; } + {var boolean vl_i := "akarmi" or char(0,0,0,0); } + {var boolean vl_i := true or 5.5; } + {var boolean vl_i := 5.5 or 5.5; } + {var boolean vl_i := pass or pass; } + {var boolean vl_i := xx1 or xx1; } + {var boolean vl_i := null or null; } + {var integer vl_i := cg_integer or cg_float; } + {var integer vl_i := cg_charstring or cg_bitstring; } + {var integer vl_i := cg_hexstring or cg_octetstring; } + {var integer vl_i := cg_universalchar or cg_universalchar; } + {var integer vl_i := cl_myrecof[true or false];} +} + +function f_xorOperationTests() +{ + {const boolean cl_i := true xor false; } + {var boolean vl_i := cg_boolean xor cg_boolean; } + + {const boolean cl_i := true xor false; + if (cl_i == true) {} + if ((false xor false) == false) {} + if ((true xor true) == false) {} + if ((true xor false) == true) {} + if ((false xor true) == true) {} + } + + {var boolean vl_i := 5.5 xor false; } + {var boolean vl_i := "akarmi" xor char(0,0,0,0); } + {var boolean vl_i := true xor 5.5; } + {var boolean vl_i := 5.5 xor 5.5; } + {var boolean vl_i := pass xor pass; } + {var boolean vl_i := xx1 xor xx1; } + {var boolean vl_i := null xor null; } + {var integer vl_i := cg_integer xor cg_float; } + {var integer vl_i := cg_charstring xor cg_bitstring; } + {var integer vl_i := cg_hexstring xor cg_octetstring; } + {var integer vl_i := cg_universalchar xor cg_universalchar; } +} + +function f_not4bOperationTests() +{ + {const bitstring cl_i := not4b '00'B;} + {var bitstring vl_i := not4b cg_bitstring;} + {var hexstring vl_i := not4b '00'H;} + {var hexstring vl_i := not4b cg_hexstring;} + {var octetstring vl_i := not4b '00'O;} + {var octetstring vl_i := not4b cg_octetstring;} + + {const bitstring cl_i := not4b '00'B; + if (cl_i == '11'B) {} + if (not4b '11'B == '00'B) {} + if (not4b '00'B == '11'B) {} + if (not4b '10'B == '01'B) {} + if (not4b '01'B == '10'B) {} + if (not4b 'F'H == '0'H) {} + if (not4b '00'H == 'FF'H) {} + if (not4b 'F0'H == '0F'H) {} + if (not4b '0F'H == 'F0'H) {} + if (not4b 'FF'O == '00'O) {} + if (not4b '00'O == 'FF'O) {} + if (not4b 'F0'O == '0F'O) {} + if (not4b '0F'O == 'F0'O) {} + } + + {var bitstring vl_i := not4b omit;} + {var bitstring vl_i := not4b true;} + {var bitstring vl_i := not4b false;} + {var bitstring vl_i := not4b "akarmi";} + {var bitstring vl_i := not4b char(0,0,0,0);} + {var bitstring vl_i := not4b 5;} + {var bitstring vl_i := not4b 5.5;} + {var bitstring vl_i := not4b pass;} + {var bitstring vl_i := not4b xx1;} + {var bitstring vl_i := not4b null;} + {var bitstring vl_i := not4b cg_boolean;} + {var bitstring vl_i := not4b cg_integer;} + {var bitstring vl_i := not4b cg_float;} + {var bitstring vl_i := not4b cg_charstring;} + {var bitstring vl_i := not4b cg_universalchar;} +} + +function f_and4bOperationTests() +{ + {const bitstring cl_i := '1001'B and4b '0101'B;} + {var bitstring vl_i := cg_bitstring and4b cg_bitstring;} + {var hexstring vl_i := 'B'H and4b '5'H;} + {var hexstring vl_i := cg_hexstring and4b cg_hexstring;} + {var octetstring vl_i := 'FB'O and4b '15'O;} + {var octetstring vl_i := cg_octetstring and4b cg_octetstring;} + + {const bitstring cl_i := '1001'B and4b '1010'B; + if (cl_i == '1000'B) {} + if ('1001'B and4b '1010'B == '1000'B) {} + if ('1001'H and4b '1010'H == '1000'H) {} + if ('1001'O and4b '1010'O == '1000'O) {} + } + + {var bitstring vl_i := '1001'B and4b omit;} + {var bitstring vl_i := omit and4b '0101'B;} + {var bitstring vl_i := '1001'B and4b true;} + {var bitstring vl_i := '1001'B and4b false;} + {var bitstring vl_i := "akarmi" and4b char(0,0,0,0);} + {var bitstring vl_i := 5.5 and4b 5;} + {var bitstring vl_i := '1001'B and4b '0101'H;} + {var bitstring vl_i := '1001'B and4b '0101'O;} + {var bitstring vl_i := '1001'H and4b '0101'B;} + {var bitstring vl_i := '1001'H and4b '0101'O;} + {var bitstring vl_i := '1001'O and4b '0101'B;} + {var bitstring vl_i := '1001'O and4b '0101'H;} + {var bitstring vl_i := '1001'B and4b '010101'B;} + {var bitstring vl_i := '100001'B and4b '0101'B;} + {var bitstring vl_i := '100001'H and4b '0101'H;} + {var bitstring vl_i := '100001'O and4b '0101'O;} + {var bitstring vl_i := pass and4b pass;} + {var bitstring vl_i := xx1 and4b xx1;} + {var bitstring vl_i := null and4b null;} + {var bitstring vl_i := cg_integer and4b cg_float;} + {var bitstring vl_i := cg_charstring and4b cg_boolean;} + {var bitstring vl_i := cg_universalchar and4b cg_universalchar;} +} + +function f_or4bOperationTests() +{ + {const bitstring cl_i := '1001'B or4b '0101'B;} + {var bitstring vl_i := cg_bitstring or4b cg_bitstring;} + {var hexstring vl_i := 'B'H or4b '5'H;} + {var hexstring vl_i := cg_hexstring or4b cg_hexstring;} + {var octetstring vl_i := 'FB'O or4b '15'O;} + {var octetstring vl_i := cg_octetstring or4b cg_octetstring;} + + {const bitstring cl_i := '1001'B or4b '1010'B; + if (cl_i == '1011'B) {} + if ('1001'B or4b '1010'B == '1011'B) {} + if ('1001'H or4b '1010'H == '1011'H) {} + if ('1001'O or4b '1010'O == '1011'O) {} + } + + {var bitstring vl_i := '1001'B or4b omit;} + {var bitstring vl_i := omit or4b '0101'B;} + {var bitstring vl_i := '1001'B or4b true;} + {var bitstring vl_i := '1001'B or4b false;} + {var bitstring vl_i := "akarmi" or4b char(0,0,0,0);} + {var bitstring vl_i := 5.5 or4b 5;} + {var bitstring vl_i := '1001'B or4b '0101'H;} + {var bitstring vl_i := '1001'B or4b '0101'O;} + {var bitstring vl_i := '1001'H or4b '0101'B;} + {var bitstring vl_i := '1001'H or4b '0101'O;} + {var bitstring vl_i := '1001'O or4b '0101'B;} + {var bitstring vl_i := '1001'O or4b '0101'H;} + {var bitstring vl_i := '1001'B or4b '010101'B;} + {var bitstring vl_i := '100001'B or4b '0101'B;} + {var bitstring vl_i := '100001'H or4b '0101'H;} + {var bitstring vl_i := '100001'O or4b '0101'O;} + {var bitstring vl_i := pass or4b pass;} + {var bitstring vl_i := xx1 or4b xx1;} + {var bitstring vl_i := null or4b null;} + {var bitstring vl_i := cg_integer or4b cg_float;} + {var bitstring vl_i := cg_charstring or4b cg_boolean;} + {var bitstring vl_i := cg_universalchar or4b cg_universalchar;} +} + +function f_xor4bOperationTests() +{ + {const bitstring cl_i := '1001'B xor4b '0101'B;} + {var bitstring vl_i := cg_bitstring xor4b cg_bitstring;} + {var hexstring vl_i := 'B'H xor4b '5'H;} + {var hexstring vl_i := cg_hexstring xor4b cg_hexstring;} + {var octetstring vl_i := 'FB'O xor4b '15'O;} + {var octetstring vl_i := cg_octetstring xor4b cg_octetstring;} + + {const bitstring cl_i := '1001'B xor4b '1010'B; + if (cl_i == '0011'B) {} + if ('1001'B xor4b '1010'B == '0011'B) {} + if ('1001'H xor4b '1010'H == '0011'H) {} + if ('1001'O xor4b '1010'O == '0011'O) {} + } + + {var bitstring vl_i := '1001'B xor4b omit;} + {var bitstring vl_i := omit xor4b '0101'B;} + {var bitstring vl_i := '1001'B xor4b true;} + {var bitstring vl_i := '1001'B xor4b false;} + {var bitstring vl_i := "akarmi" xor4b char(0,0,0,0);} + {var bitstring vl_i := 5.5 xor4b 5;} + {var bitstring vl_i := '1001'B xor4b '0101'H;} + {var bitstring vl_i := '1001'B xor4b '0101'O;} + {var bitstring vl_i := '1001'H xor4b '0101'B;} + {var bitstring vl_i := '1001'H xor4b '0101'O;} + {var bitstring vl_i := '1001'O xor4b '0101'B;} + {var bitstring vl_i := '1001'O xor4b '0101'H;} + {var bitstring vl_i := '1001'B xor4b '010101'B;} + {var bitstring vl_i := '100001'B xor4b '0101'B;} + {var bitstring vl_i := '100001'H xor4b '0101'H;} + {var bitstring vl_i := '100001'O xor4b '0101'O;} + {var bitstring vl_i := pass xor4b pass;} + {var bitstring vl_i := xx1 xor4b xx1;} + {var bitstring vl_i := null xor4b null;} + {var bitstring vl_i := cg_integer xor4b cg_float;} + {var bitstring vl_i := cg_charstring xor4b cg_boolean;} + {var bitstring vl_i := cg_universalchar xor4b cg_universalchar;} +} + +function f_shift_leftOperationTests() +{ + const integer cl_small_int := 1; + + {const bitstring cl_i := '1001'B << 1;} + {var bitstring vl_i := cg_bitstring << cl_small_int;} + {var hexstring vl_i := 'B'H << 1;} + {var hexstring vl_i := cg_hexstring << cl_small_int;} + {var octetstring vl_i := 'FB'O << 1;} + {var octetstring vl_i := cg_octetstring << cl_small_int;} + + {const bitstring cl_i := '1001'B << 1; + if (cl_i == '0010'B) {} + if ('1001'B << 1 == '0010'B) {} + if ('1001'H << 1 == '0010'H) {} + if ('1001'O << 1 == '0100'O) {} + } + + {var bitstring vl_i := '1001'B << -1;} + {var hexstring vl_i := 'B'H << -1;} + {var octetstring vl_i := 'FB'O << -1;} + {var bitstring vl_i := '1001'B << 0;} + {var hexstring vl_i := 'B'H << 0;} + {var octetstring vl_i := 'FB'O << 0;} + {var bitstring vl_i := '1001'B << 5;} + {var hexstring vl_i := 'B'H << 5;} + {var octetstring vl_i := 'FB'O << 5;} + + {var bitstring vl_i := omit << 1;} + {var bitstring vl_i := '1001'B << omit;} + {var bitstring vl_i := 5.5 << 1;} + {var bitstring vl_i := '1001'H << 1;} + {var bitstring vl_i := '1001'O << 1;} + {var bitstring vl_i := '1001'B << 1.1;} + {var bitstring vl_i := "akarmi" << 1;} + {var bitstring vl_i := char(0,0,0,0) << 1;} + {var bitstring vl_i := pass << pass;} + {var bitstring vl_i := xx1 << xx1;} + {var bitstring vl_i := null << null;} + {var bitstring vl_i := cg_bitstring << cg_hexstring;} + {var bitstring vl_i := cg_octetstring << cg_charstring;} + {var bitstring vl_i := cg_boolean << cg_universalchar;} + {var bitstring vl_i := cg_float << 5;} +} + +function f_shift_rightOperationTests() +{ + const integer cl_small_int := 1; + + {const bitstring cl_i := '1001'B >> 1;} + {var bitstring vl_i := cg_bitstring >> cl_small_int;} + {var hexstring vl_i := 'B'H >> 1;} + {var hexstring vl_i := cg_hexstring >> cl_small_int;} + {var octetstring vl_i := 'FB'O >> 1;} + {var octetstring vl_i := cg_octetstring >> cl_small_int;} + + {const bitstring cl_i := '1001'B >> 1; + if (cl_i == '0100'B) {} + if ('1001'B >> 1 == '0100'B) {} + if ('1001'H >> 1 == '0100'H) {} + if ('1001'O >> 1 == '0010'O) {} + } + + {var bitstring vl_i := '1001'B >> -1;} + {var hexstring vl_i := 'B'H >> -1;} + {var octetstring vl_i := 'FB'O >> -1;} + {var bitstring vl_i := '1001'B >> 0;} + {var hexstring vl_i := 'B'H >> 0;} + {var octetstring vl_i := 'FB'O >> 0;} + {var bitstring vl_i := '1001'B >> 5;} + {var hexstring vl_i := 'B'H >> 5;} + {var octetstring vl_i := 'FB'O >> 5;} + + {var bitstring vl_i := omit >> 1;} + {var bitstring vl_i := '1001'B >> omit;} + {var bitstring vl_i := 5.5 >> 1;} + {var bitstring vl_i := '1001'H >> 1;} + {var bitstring vl_i := '1001'O >> 1;} + {var bitstring vl_i := '1001'B >> 1.1;} + {var bitstring vl_i := "akarmi" >> 1;} + {var bitstring vl_i := char(0,0,0,0) >> 1;} + {var bitstring vl_i := pass >> pass;} + {var bitstring vl_i := xx1 >> xx1;} + {var bitstring vl_i := null >> null;} + {var bitstring vl_i := cg_bitstring >> cg_hexstring;} + {var bitstring vl_i := cg_octetstring >> cg_charstring;} + {var bitstring vl_i := cg_boolean >> cg_universalchar;} + {var bitstring vl_i := cg_float >> 5;} +} + +function f_rotate_leftOperationTests() +{ + const integer cl_small_int := 1; + const myrecof1 cl_myrecof := {1,2,3,4}; + const mysetof1 cl_mysetof := {1,2,3,4}; + const myarr1 cl_myarray := {1}; + + {const bitstring cl_i := '1001'B <@ 1;} + {var bitstring vl_i := cg_bitstring <@ cl_small_int;} + {var hexstring vl_i := 'BB'H <@ 1;} + {var hexstring vl_i := cg_hexstring <@ cl_small_int;} + {var octetstring vl_i := 'FABABA'O <@ 1;} + {const octetstring cl_i := cg_octetstring @> cl_small_int;} + {const charstring cl_i := "akarmi" <@ 1;} + {const charstring cl_i := cg_charstring <@ cl_small_int;} + {const universal charstring cl_i := "akarmi" <@ 1;} + {const universal charstring cl_i := cg_universalcharstring <@ cl_small_int;} + {var myrecof1 vl_i := cl_myrecof <@ 1;} + {var mysetof1 vl_i := cl_mysetof <@ 1;} + + {const bitstring cl_i := '1001'B <@ 1; + if (cl_i == '0011'B) {} + if ('1001'B <@ 1 == '0011'B) {} + if ('1001'H <@ 1 == '0011'H) {} + if ('1001'O <@ 1 == '0110'O) {} + } + + {var bitstring vl_i := ''B <@ 1;} + {var bitstring vl_i := '1'B <@ 1;} + {var bitstring vl_i := '1001'B <@ -1;} + {var hexstring vl_i := 'B'H <@ -1;} + {var octetstring vl_i := 'FB'O <@ -1;} + {var charstring vl_i := "akarmi" <@ -1;} + {var universal charstring vl_i := cg_universalcharstring <@ -1;} + {var bitstring vl_i := '1001'B <@ 0;} + {var hexstring vl_i := 'B'H <@ 0;} + {var octetstring vl_i := 'FB'O <@ 0;} + {var charstring vl_i := "akarmi" <@ 0;} + {var universal charstring vl_i := cg_universalcharstring <@ 0;} + {var bitstring vl_i := '1001'B <@ 5;} + {var hexstring vl_i := 'B'H <@ 5;} + {var octetstring vl_i := 'FB'O <@ 5;} + {var octetstring vl_i := cg_octetstring <@ cl_small_int;} + {var charstring vl_i := "akarmi" <@ 10;} + {var universal charstring vl_i := cg_universalcharstring <@ 10;} + {var myarr1 vl_i := cl_myarray <@ 1;} + {var myrecof1 vl_i := cl_myrecof <@ 5;} + {var mysetof1 vl_i := cl_mysetof <@ 5;} + {var myrecof1 vl_i := cl_myrecof <@ -1;} + {var mysetof1 vl_i := cl_mysetof <@ -1;} + {var myarr1 vl_i := cl_myarray <@ -1;} + + {var bitstring vl_i := omit <@ 1;} + {var bitstring vl_i := '1001'B <@ omit;} + {var bitstring vl_i := 5.5 <@ 1;} + {var bitstring vl_i := '1001'H <@ 1;} + {var bitstring vl_i := '1001'O <@ 1;} + {var bitstring vl_i := '1001'B <@ 1.1;} + {var bitstring vl_i := "akarmi" <@ 1;} + {var bitstring vl_i := char(0,0,0,0) <@ 1;} + {var bitstring vl_i := pass <@ pass;} + {var bitstring vl_i := xx1 <@ xx1;} + {var bitstring vl_i := null <@ null;} + {var bitstring vl_i := cg_bitstring <@ cg_hexstring;} + {var bitstring vl_i := cg_octetstring <@ cg_charstring;} + {var bitstring vl_i := cg_boolean <@ cg_universalchar;} + {var bitstring vl_i := cg_float <@ 5;} + {var bitstring vl_i := '1001'B <@ 9999999999999;} +} + +function f_rotate_rightOperationTests() +{ + const integer cl_small_int := 1; + const myrecof1 cl_myrecof := {1,2,3,4}; + const mysetof1 cl_mysetof := {1,2,3,4}; + const myarr1 cl_myarray := {1}; + + {const bitstring cl_i := '1001'B @> 1;} + {const bitstring cl_i := cg_bitstring @> cl_small_int;} + {const hexstring cl_i := 'BB'H @> 1;} + {const hexstring cl_i := cg_hexstring @> cl_small_int;} + {const octetstring cl_i := 'DEADBEAF'O @> 1;} + {const octetstring cl_i := cg_octetstring @> cl_small_int;} + {const charstring cl_i := "akarmi" @> 1;} + {const charstring cl_i := cg_charstring @> cl_small_int;} + {const universal charstring cl_i := "akarmi" @> 1;} + {const universal charstring cl_i := cg_universalcharstring @> cl_small_int;} + {const myrecof1 cl_i := cl_myrecof @> 1;} + {const mysetof1 cl_i := cl_mysetof @> 1;} + + {const bitstring cl_i := '1001'B @> 1; + if (cl_i == '1100'B) {} + if ('1001'B @> 1 == '1100'B) {} + if ('1001'H @> 1 == '1100'H) {} + if ('1001'O @> 1 == '0110'O) {} + } + + {var bitstring vl_i := ''B @> 1;} + {var bitstring vl_i := '1'B @> 1;} + {var bitstring vl_i := '1001'B @> -1;} + {var hexstring vl_i := 'B'H @> -1;} + {var octetstring vl_i := 'FB'O @> -1;} + {var charstring vl_i := "akarmi" @> -1;} + {var universal charstring vl_i := cg_universalcharstring @> -1;} + {var bitstring vl_i := '1001'B @> 0;} + {var hexstring vl_i := 'B'H @> 0;} + {var octetstring vl_i := 'FB'O @> 0;} + {var charstring vl_i := "akarmi" @> 0;} + {var universal charstring vl_i := cg_universalcharstring @> 0;} + {var bitstring vl_i := '1001'B @> 5;} + {var hexstring vl_i := 'B'H @> 5;} + {var octetstring vl_i := 'FB'O @> 5;} + {var charstring vl_i := "akarmi" @> 10;} + {var universal charstring vl_i := cg_universalcharstring @> 10;} + {var myarr1 vl_i := cl_myarray @> 1;} + {var myrecof1 vl_i := cl_myrecof @> 5;} + {var mysetof1 vl_i := cl_mysetof @> 5;} + {var myrecof1 vl_i := cl_myrecof @> -1;} + {var mysetof1 vl_i := cl_mysetof @> -1;} + {var myarr1 vl_i := cl_myarray @> -1;} + + {var bitstring vl_i := omit @> 1;} + {var bitstring vl_i := '1001'B @> omit;} + {var bitstring vl_i := 5.5 @> 1;} + {var bitstring vl_i := '1001'H @> 1;} + {var bitstring vl_i := '1001'O @> 1;} + {var bitstring vl_i := '1001'B @> 1.1;} + {var bitstring vl_i := "akarmi" @> 1;} + {var bitstring vl_i := char(0,0,0,0) @> 1;} + {var bitstring vl_i := pass @> pass;} + {var bitstring vl_i := xx1 @> xx1;} + {var bitstring vl_i := null @> null;} + {var bitstring vl_i := cg_bitstring @> cg_hexstring;} + {var bitstring vl_i := cg_octetstring @> cg_charstring;} + {var bitstring vl_i := cg_boolean @> cg_universalchar;} + {var bitstring vl_i := cg_float @> 5;} + {var bitstring vl_i := '1001'B @> 9999999999999;} +} + +function f_substrOperationTests() +{ + const integer cl_small_int := 1; + const myrecof1 cl_myrecof := {1,2,3,4}; + const mysetof1 cl_mysetof := {1,2,3,4}; + const myarr1 cl_myarray := {1}; + var integer vl_int; + + {const bitstring cl_i := substr('1001'B, 1, 1);} + {var bitstring vl_i := substr(cg_bitstring,1 ,cl_small_int);} + {var hexstring vl_i := substr('BB'H, 1, 1);} + {var hexstring vl_i := substr(cg_hexstring,1 ,cl_small_int);} + {var octetstring vl_i := substr('DEADBEAF'O, 1, 1);} + {var octetstring vl_i := substr(cg_octetstring,0 ,cl_small_int);} + {var charstring vl_i := substr("akarmi", 1, 1);} + {var charstring vl_i := substr(cg_charstring, 1, 1);} + {var universal charstring vl_i := substr("akarmi", 1, 1);} + {var universal charstring vl_i := substr(cg_universalchar, 0, 1);} + {var myrecof1 vl_i := substr(cl_myrecof,1 ,cl_small_int);} + {var mysetof1 vl_i := substr(cl_mysetof,1 ,cl_small_int);} + + {const bitstring cl_i := substr('1001'B, 1, 1); + if (cl_i == '0'B) {} + if (substr('1001'B, 1, 1) == '0'B) {} + if (substr('1F01'H, 1, 1) == 'F'H) {} + if (substr('1001'O, 1, 1) == '01'O) {} + } + + {var bitstring vl_i := substr(5, 1, 1);} + {var bitstring vl_i := substr(cl_myrecof, 1, 1);} + {var bitstring vl_i := substr('1001'B, nonExi, nonExi);} + {var bitstring vl_i := substr('1001'B, -4, -1);} + {var bitstring vl_i := substr('1001'B, 6, 1);} + {var bitstring vl_i := substr('1001'B, 6, vl_int);} + {var bitstring vl_i := substr('1001'B, vl_int, 6);} + {var bitstring vl_i := substr('1001'B, 2, 6);} + {var bitstring vl_i := substr('1001'B, 99999999999999999999999, 99999999999999999999999);} + {var charstring vl_i := substr(cg_charstring, 6, 1);} + {var charstring vl_i := substr(cg_charstring, 2, 6);} + {var universal charstring vl_i := substr(cg_universalchar, 6, 1);} + {var universal charstring vl_i := substr(cg_universalchar, 2, 6);} + {var bitstring vl_i := substr(cl_myrecof, 6, 1);} + {var bitstring vl_i := substr(cl_myrecof, 2, 6);} + {var bitstring vl_i := substr(cl_mysetof, 6, 1);} + {var bitstring vl_i := substr(cl_mysetof, 2, 6);} +} + + +function f_concatenationOperationTests() +{ + const myrecof1 cl_myrecof := {1,2,3,4}; + const mysetof1 cl_mysetof := {1,2,3,4}; + const myrecof1 cl_myrecof2 := {[0] := 1, [1] := 2, [2] := 3, [3] := 4}; + const mysetof1 cl_mysetof2 := {[0] := 1, [1] := 2, [2] := 3, [3] := 4}; + + {const bitstring cl_i := '1001'B & '1001'B;} + {var bitstring vl_i := cg_bitstring & cg_bitstring;} + {var hexstring vl_i := '1001'H & '1001'H;} + {var hexstring vl_i := cg_hexstring & cg_hexstring;} + {var octetstring vl_i := '1001'O & '1001'O;} + {var octetstring vl_i := cg_octetstring & cg_octetstring;} + {var charstring vl_i := "akarmi" & "akarmi";} + {var charstring vl_i := cg_charstring & cg_charstring;} + {var universal charstring vl_i := "akarmi" & "akarmi";} + {var charstring vl_i := "akarmi" & char(0,0,0,0);} + {var universal charstring vl_i := char(0,0,0,0) & "akarmi";} + {var universal charstring vl_i := char(0,0,0,0) & cg_charstring;} + {var universal charstring vl_i := char(0,0,0,0) & cg_universalchar;} + {var universal charstring vl_i := cg_universalchar & char(0,0,0,0);} + {const myrecof1 cl_i := cl_myrecof & cl_myrecof;} + {const mysetof1 cl_i := cl_mysetof & cl_mysetof;} + {const myrecof1 cl_i := cl_myrecof2 & cl_myrecof2;} + {const mysetof1 cl_i := cl_mysetof2 & cl_mysetof2;} + {var charstring vl_i := %moduleId & %fileName;} + + {const bitstring cl_i := '1001'B & '1001'B; + if (cl_i == '10011001'B) {} + if ('1001'B & '1001'B == '10011001'B) {} + if ('1001'H & '1001'H == '10011001'H) {} + if ('1001'O & '1001'O == '10011001'O) {} + } + + {var bitstring vl_i := omit & 5;} + {var bitstring vl_i := 5.5 & 5.5;} + {var bitstring vl_i := '1001'B & '1001'H;} + {var bitstring vl_i := '1001'H & '1001'B;} + {var bitstring vl_i := '1001'B & '1001'O;} + {var bitstring vl_i := '1001'O & '1001'B;} + {var bitstring vl_i := '1001'B & "akarmi";} + {var hexstring vl_i := '1001'H & '1001'O;} + {var hexstring vl_i := '1001'O & '1001'H;} + {var hexstring vl_i := '1001'H & "akarmi";} + {var octetstring vl_i := '1001'O & '1001'B;} + {var octetstring vl_i := '1001'O & '1001'H;} + {var octetstring vl_i := '1001'O & "akarmi";} + {var charstring vl_i := "akarmi" & '1001'B;} + {var charstring vl_i := "akarmi" & '1001'H;} + {var charstring vl_i := "akarmi" & '1001'O;} + {var universal charstring vl_i := "akarmi" & '1001'B;} + {var universal charstring vl_i := "akarmi" & '1001'H;} + {var universal charstring vl_i := "akarmi" & '1001'O;} + {var universal charstring vl_i := pass & pass;} + {var universal charstring vl_i := xx1 & xx1;} + {var universal charstring vl_i := null & null;} + {var charstring vl_i := cg_bitstring & cg_hexstring;} + {var charstring vl_i := cg_octetstring & cg_integer;} + {var charstring vl_i := cg_float & cg_charstring;} + {var charstring vl_i := cg_boolean & cg_universalchar;} + {var charstring vl_i := cg_charstring & char(0,0,0,0);} + {var myrecof1 vl_i := cg_charstring & cl_myrecof;} + {var myrecof1 vl_i := cl_myrecof & cg_charstring;} + {var mysetof1 vl_i := cg_charstring & cl_mysetof;} + {var mysetof1 vl_i := cl_mysetof & cg_charstring;} +} + +/* RECURSIVE ****************************************************************/ +type record of recR recofR +type record recR { recofR rof optional } +type record c1 { recR f1 } +type record c11 { c1 f1 } +type record c2 { recofR f1 } +type record c22 { c2 f1 } + +type record A { + integer f1, + B f2 optional +} + +type record B { + A f1 optional, + integer f2 +} + +function f_recursionTestsCompat() +{ + // Make sure that we don't stuck in an infinite recursion. + var recofR vl_rof := { { omit } } + var recR vl_r := { rof := omit } + var c11 vl_cc1 := { f1 := { { omit } } } + var c22 vl_cc2 := { f1 := { { { omit } } } } + vl_cc1 := vl_cc2 + if (vl_cc1 == vl_cc2) { } + vl_r := vl_rof + if (vl_r.rof == omit) { } + vl_rof := vl_r + if (vl_cc1 == vl_r or vl_rof == vl_cc2) { } // Just to get an error... + var A vl_a := { f1 := 1, f2 := { f1 := { 1, omit }, f2 := 11 } } + var B vl_b := { f1 := vl_a, f2 := 1 } + if (vl_a == vl_b and not vl_b != vl_a) { } +} + +function f_equalsNotEqualsOperationTestsCompat() +{ + var myrec1 vl_rec1 := { 1 } + var myrec2 vl_rec2 := { 1 } + var myrec3 vl_rec3 := { 1 } + var myrec4 vl_rec4 := { 1, 2 } + var myrecof1 vl_recof1 := { 1, 2 } + var myrecof2 vl_recof2 := { 1, 2 } + var myarr1 vl_arr1 := { 1 } + var myarr2 vl_arr2 := { 1 } + var myset1 vl_set1 := { f1 := 1 } + var myset2 vl_set2 := { f1 := 1 } + var myset3 vl_set3 := { f1 := 1 } + var myset4 vl_set4 := { f1 := 1, f2 := 2 } + var mysetof1 vl_setof1 := { 1, 2 } + var mysetof2 vl_setof2 := { 1, 2 } + var myuni1 vl_uni1 := { f1 := { 1 } } + var myuni2 vl_uni2 := { f1 := { 1 } } + var anytype vl_any1 := { myrec1 := { 1 } } + var anytype vl_any2 := { myrec2 := { 1 } } + + const myrecof1 cl_recof1 := { 1, 2, 3, 4} + const myrecof1 cl_recof2 := { 1, 2, 3, 4} + const myrecof1 cl_recof3 := { 4, 1, 3, 2} + const myrecof1 cl_recof4 := { 1, 2, 3} + const myrecof1 cl_recof5 := {} + const myrecof1 cl_recof_ind1 := { [0]:=1, [1]:=2, [2]:=3 ,[3]:=4} + const myrecof1 cl_recof_ind2 := { [0]:=1, [1]:=2, [2]:=3 ,[3]:=4} + const myrecof1 cl_recof_ind3 := { [1]:=2, [0]:=1, [2]:=3 ,[3]:=4} + const myrecof1 cl_recof_ind4 := { [0]:=1, [1]:=2, [2]:=3 ,[3]:=4, [4]:=5} + const myrecof1 cl_recof_ind5 := { [0]:=2, [1]:=1, [2]:=3 ,[3]:=4} + + const mysetof1 cl_setof1 := { 1, 2, 3, 4} + const mysetof1 cl_setof2 := { 1, 2, 3, 4} + const mysetof1 cl_setof3 := { 3, 2, 1, 4} + const mysetof1 cl_setof4 := { 1, 2, 3, 4, 5} + const mysetof1 cl_setof5 := {} + const mysetof1 cl_setof_ind1 := { [0]:=1, [1]:=2, [2]:=3, [3]:=4} + const mysetof1 cl_setof_ind2 := { [0]:=1, [1]:=2, [2]:=3, [3]:=4} + const mysetof1 cl_setof_ind3 := { [3]:=4, [1]:=2, [2]:=3, [0]:=1} + const mysetof1 cl_setof_ind4 := { [3]:=1, [1]:=2, [2]:=3, [0]:=4} + const mysetof1 cl_setof_ind5 := { [0]:=1, [1]:=2, [2]:=3, [3]:=4, [4]:= 5} + const mysetof1 cl_setof_ind6 := { [0]:=1, [1]:=2, [2]:=3, [3]:=5} + + const myarr3 cl_array1 := { 1, 2, 3, 4} + const myarr3 cl_array2 := { 1, 2, 3, 4} + const myarr3 cl_array3 := { 4, 1, 3, 2} + const myarr1 cl_array4 := { 1 } + const myarr3 cl_array_ind1 := { [0]:=1, [1]:=2, [2]:=3 ,[3]:=4} + const myarr3 cl_array_ind2 := { [0]:=1, [1]:=2, [2]:=3 ,[3]:=4} + const myarr3 cl_array_ind3 := { [1]:=2, [0]:=1, [2]:=3 ,[3]:=4} + const myarr3 cl_array_ind4 := { [2]:=1, [1]:=2, [0]:=3 ,[3]:=4} + const myarr1 cl_array_ind5 := { [0]:=1 } + + if(cl_array1 == cl_array2 and cl_array2 == cl_array1) {} + if(cl_array1 != cl_array3 and cl_array3 != cl_array1) {} + if(cl_array1 == cl_array_ind1 and cl_array_ind1 == cl_array1) {} + if(cl_array1 == cl_array_ind3 and cl_array_ind3 == cl_array1) {} + if(cl_array1 != cl_array_ind4 and cl_array_ind4 != cl_array1) {} + + if(cl_array_ind1 == cl_array_ind2 and cl_array_ind2 == cl_array_ind1) {} + if(cl_array_ind1 == cl_array_ind3 and cl_array_ind3 == cl_array_ind1) {} + if(cl_array_ind1 != cl_array_ind4 and cl_array_ind4 != cl_array_ind1) {} + + // constant folding of setof + if(cl_setof1 == cl_setof2 and cl_setof2 == cl_setof1){} + if(cl_setof1 == cl_setof3 and cl_setof3 == cl_setof1){} + if(cl_setof1 != cl_setof4 and cl_setof4 != cl_setof1 ){} + if(cl_setof1 != cl_setof5 and cl_setof5 != cl_setof1){} + if(cl_setof1 == cl_setof_ind1 and cl_setof_ind1 == cl_setof1){} + if(cl_setof1 == cl_setof_ind3 and cl_setof_ind3 == cl_setof1){} + if(cl_setof1 == cl_setof_ind4 and cl_setof_ind4 == cl_setof1){} + if(cl_setof1 != cl_setof_ind5 and cl_setof_ind5 != cl_setof1){} + if(cl_setof1 != cl_setof_ind6 and cl_setof_ind6 != cl_setof1){} + if(cl_setof3 == cl_setof_ind1 and cl_setof_ind1 == cl_setof3){} + if(cl_setof_ind1 == cl_setof_ind2 and cl_setof_ind2 == cl_setof_ind1){} + if(cl_setof_ind1 == cl_setof_ind3 and cl_setof_ind3 == cl_setof_ind1){} + if(cl_setof_ind1 == cl_setof_ind4 and cl_setof_ind4 == cl_setof_ind1){} + if(cl_setof_ind1 != cl_setof_ind5 and cl_setof_ind5 != cl_setof_ind1){} + if(cl_setof_ind1 != cl_setof_ind6 and cl_setof_ind6 != cl_setof_ind1){} + + // constant folding of record of + if(cl_recof1 == cl_recof2 and cl_recof2 == cl_recof1){} + if(cl_recof1 != cl_recof3 and cl_recof3 != cl_recof1){} + if(cl_recof1 != cl_recof4 and cl_recof4 != cl_recof1){} + if(cl_recof1 != cl_recof5 and cl_recof5 != cl_recof1){} + if(cl_recof1 == cl_recof_ind1 and cl_recof_ind1 == cl_recof1){} + if(cl_recof1 == cl_recof_ind3 and cl_recof_ind3 == cl_recof1){} + if(cl_recof1 != cl_recof_ind4 and cl_recof_ind4 != cl_recof1){} + if(cl_recof1 != cl_recof_ind5 and cl_recof_ind5 != cl_recof1){} + if(cl_recof_ind1 == cl_recof_ind2 and cl_recof_ind2 == cl_recof_ind1){} + if(cl_recof_ind1 == cl_recof_ind3 and cl_recof_ind3 == cl_recof_ind1){} + if(cl_recof_ind1 != cl_recof_ind4 and cl_recof_ind4 != cl_recof_ind1){} + if(cl_recof_ind1 != cl_recof_ind5 and cl_recof_ind5 != cl_recof_ind1){} + + { const boolean cl_b := vl_rec1 == vl_rec2 and vl_rec2 == vl_rec1 } // 2xW + { var boolean vl_b := vl_rec1 != vl_rec2 and vl_rec2 != vl_rec1 } // 2xW + { var boolean vl_b := vl_recof1 == vl_recof2 and vl_recof2 == vl_recof1 } // 2xW + { var boolean vl_b := vl_recof1 != vl_recof2 and vl_recof2 != vl_recof1 } // 2xW + { var boolean vl_b := vl_arr1 == vl_arr2 and vl_arr2 == vl_arr1 } // 2xW + { var boolean vl_b := vl_arr1 != vl_arr2 and vl_arr2 != vl_arr1 } // 2xW + { var boolean vl_b := vl_set1 == vl_set2 and vl_set2 == vl_set1 } // 2xW + { var boolean vl_b := vl_set1 != vl_set2 and vl_set2 != vl_set1 } // 2xW + { var boolean vl_b := vl_setof1 == vl_setof2 and vl_setof2 == vl_setof1 } // 2xW + { var boolean vl_b := vl_setof1 != vl_setof2 and vl_setof2 != vl_setof1 } // 2xW + { var boolean vl_b := vl_uni1 == vl_uni2 and vl_uni2 == vl_uni1 } // 2xW + { var boolean vl_b := vl_uni1 != vl_uni2 and vl_uni2 != vl_uni1 } // 2xW + { var boolean vl_b := vl_any1 == vl_any2 and vl_any2 == vl_any1 } // 2xW + { var boolean vl_b := vl_any1 != vl_any2 and vl_any2 != vl_any1 } // 2xW + + { var boolean vl_b := vl_rec1 == vl_set1 and vl_set1 == vl_rec1 } // 2xE + { var boolean vl_b := vl_rec1 != vl_set1 and vl_set1 != vl_rec1 } // 2xE + { var boolean vl_b := vl_rec1 == vl_setof1 and vl_setof1 == vl_rec1 } // 2xE + { var boolean vl_b := vl_rec1 != vl_setof1 and vl_setof1 != vl_rec1 } // 2xE + { var boolean vl_b := vl_recof1 == vl_set1 and vl_set1 == vl_recof1 } // 2xE + { var boolean vl_b := vl_recof1 != vl_set1 and vl_set1 != vl_recof1 } // 2xE + { var boolean vl_b := vl_recof1 == vl_setof1 and vl_setof1 == vl_recof1 } // 2xE + { var boolean vl_b := vl_recof1 != vl_setof1 and vl_setof1 != vl_recof1 } // 2xE + { var boolean vl_b := vl_arr1 == vl_set1 and vl_set1 == vl_arr1 } // 2xE + { var boolean vl_b := vl_arr1 != vl_set1 and vl_set1 != vl_arr1 } // 2xE + { var boolean vl_b := vl_arr1 == vl_setof1 and vl_setof1 == vl_arr1 } // 2xE + { var boolean vl_b := vl_arr1 != vl_setof1 and vl_setof1 != vl_arr1 } // 2xE + { var boolean vl_b := vl_uni1 == vl_set1 and vl_set1 == vl_uni1 } // 2xE + { var boolean vl_b := vl_uni1 != vl_set1 and vl_set1 != vl_uni1 } // 2xE + { var boolean vl_b := vl_uni1 == vl_setof1 and vl_setof1 == vl_uni1 } // 2xE + { var boolean vl_b := vl_uni1 != vl_setof1 and vl_setof1 != vl_uni1 } // 2xE + { var boolean vl_b := vl_any1 == vl_set1 and vl_set1 == vl_any1 } // 2xE + { var boolean vl_b := vl_any1 != vl_set1 and vl_set1 != vl_any1 } // 2xE + { var boolean vl_b := vl_any1 == vl_setof1 and vl_setof1 == vl_any1 } // 2xE + { var boolean vl_b := vl_any1 != vl_setof1 and vl_setof1 != vl_any1 } // 2xE + + { var boolean vl_b := vl_rec3 == vl_rec1 and vl_rec1 == vl_rec3 } // 2xE + { var boolean vl_b := vl_rec3 != vl_rec1 and vl_rec1 != vl_rec3 } // 2xE + { var boolean vl_b := vl_rec3 == vl_uni1 and vl_uni1 == vl_rec3 } // 2xE + { var boolean vl_b := vl_rec3 != vl_uni1 and vl_uni1 != vl_rec3 } // 2xE + { var boolean vl_b := vl_rec3 == vl_any1 and vl_any1 == vl_rec3 } // 2xE + { var boolean vl_b := vl_rec3 != vl_any1 and vl_any1 != vl_rec3 } // 2xE + + { var boolean vl_b := vl_set3 == vl_set1 and vl_set1 == vl_set3 } // 2xE + { var boolean vl_b := vl_set3 != vl_set1 and vl_set1 != vl_set3 } // 2xE + + { var boolean vl_b := vl_rec4 == vl_rec1 and vl_rec1 == vl_rec4 } // 2xE + { var boolean vl_b := vl_rec4 != vl_rec1 and vl_rec1 != vl_rec4 } // 2xE + { var boolean vl_b := vl_rec4 == vl_uni1 and vl_uni1 == vl_rec4 } // 2xE + { var boolean vl_b := vl_rec4 != vl_uni1 and vl_uni1 != vl_rec4 } // 2xE + { var boolean vl_b := vl_rec4 == vl_any1 and vl_any1 == vl_rec4 } // 2xE + { var boolean vl_b := vl_rec4 != vl_any1 and vl_any1 != vl_rec4 } // 2xE + + { var boolean vl_b := vl_set4 == vl_set1 and vl_set1 == vl_set4 } // 2xE + { var boolean vl_b := vl_set4 != vl_set1 and vl_set1 != vl_set4 } // 2xE + + { var boolean vl_b := cl_array1 == cl_array4 and cl_array4 == cl_array1 } // 2xE + { var boolean vl_b := cl_array_ind1 == cl_array4 and cl_array4 == cl_array_ind1 } // 2xE + { var boolean vl_b := cl_array_ind1 == cl_array_ind5 and cl_array_ind5 == cl_array_ind1 } // 2xE +} + +function f_replaceConcatenationOperationTestsCompat() +{ + var myrecof1 vl_recof1 := { 1, 2 } + var myrecof2 vl_recof2 := { 1, 2 } + var mysetof1 vl_setof1 := { 1, 2 } + var mysetof2 vl_setof2 := { 1, 2 } + + { var myrecof1 vl_r := replace(vl_recof1, 1, 1, vl_recof2) & replace(vl_recof2, 1, 1, vl_recof1) } // 4xW + { var mysetof1 vl_r := replace(vl_setof1, 1, 1, vl_setof2) & replace(vl_setof2, 1, 1, vl_setof1) } // 4xW + { var myrecof1 vl_r := vl_recof1 & vl_recof2 } // 2xW + { var myrecof1 vl_r := vl_recof2 & vl_recof1 } // 2xW + + { var myrecof1 vl_r := replace(vl_recof1, 1, 1, vl_setof1) & replace(vl_setof1, 1, 1, vl_recof1) } // 4xE + { var mysetof1 vl_r := replace(vl_recof1, 1, 1, vl_setof1) & replace(vl_recof1, 1, 1, vl_setof1) } // 4xE + { var myrecof1 vl_r := vl_recof1 & vl_setof1 } // 2xE + { var mysetof1 vl_r := vl_recof1 & vl_setof1 } // 2xE +} + +function f_equalsOperationTests() +{ + {const boolean cl_i := true == false; } + {const boolean cl_i := cg_boolean == cg_boolean; } + {const boolean cl_i := 5 == 5; } + {const boolean cl_i := cg_integer == cg_integer; } + {const boolean cl_i := 5.5 == 5.5; } + {const boolean cl_i := cg_float == cg_float; } + {const boolean cl_i := "akarmi" == "akarmi"; } + {const boolean cl_i := cg_charstring == cg_charstring; } + {const boolean cl_i := '00'B == '00'B; } + {const boolean cl_i := cg_bitstring == cg_bitstring; } + {const boolean cl_i := '00'H == '00'H; } + {const boolean cl_i := cg_hexstring == cg_hexstring; } + {const boolean cl_i := '00'O == '00'O; } + {const boolean cl_i := cg_octetstring == cg_octetstring; } + {const boolean cl_i := char(0,0,0,0) == char(0,0,0,0); } + {const boolean cl_i := cg_universalchar == cg_universalchar; } + {const boolean cl_i := char(0,0,0,48) == "0"; } + {const boolean cl_i := "0" == char(0,0,0,48); } + {const boolean cl_i := cg_universalcharstring == cg_universalcharstring; } + {const myenum1 cl_j := xx1; var boolean vl_i := j == xx1; } + {const myenum1 cl_j := xx1; var boolean vl_i := xx1 == j; } + {const boolean cl_i := pass == pass; } + {const boolean cl_i := null == null; } + {const boolean cl_i := omit == omit; } + {const t_function cl_i1 := refers(f_functionName); + const t_function cl_i2 := refers(f_functionName); + const boolean cl_i := cl_i1 == cl_i2; + } + {const t_altstep2 cl_i1 := refers(as_altstepName); + const t_altstep2 cl_i2 := refers(as_altstepName); + const boolean cl_i := cl_i1 == cl_i2; + } + {const t_testcase cl_i1 := refers(tc_c_testcase); + const t_testcase cl_i2 := refers(tc_c_testcase); + const boolean cl_i := cl_i1 == cl_i2; + } + + { const myrec1 cl_rec1 := {1}; + const myrec1 cl_rec2 := {1}; + const myrec1 cl_rec3 := {2}; + if (cl_rec1 == cl_rec2) {} + if (cl_rec1 == cl_rec3) {} + } + + { const myset1 cl_set1 := {f1 := 1}; + const myset1 cl_set2 := {f1 := 1}; + const myset1 cl_set3 := {f1 := 2}; + if (cl_set1 == cl_set2) {} + if (cl_set1 == cl_set3) {} + } + + { const myrecof1 cl_recof1 := { [0]:=11, [1]:=22 } + const myrecof1 cl_recof2 := { 11, 22 } + const myrecof1 cl_recof3 := { [1]:=22, [0]:=11 } + const myrecof1 cl_recof4 := { [1]:=22, [0]:=10 } + if (cl_recof1 == cl_recof2) { } else { } + if (cl_recof2 == cl_recof1) { } else { } + if (cl_recof1 == cl_recof3) { } else { } + if (cl_recof3 == cl_recof1) { } else { } + + if (cl_recof1 == cl_recof4) { } else { } + if (cl_recof4 == cl_recof1) { } else { } + } + + { const mysetof1 cl_setof1 := {1}; + const mysetof1 cl_setof2 := {1}; + const mysetof1 cl_setof3 := {2}; + if (cl_setof1 == cl_setof2) {} + if (cl_setof1 == cl_setof3) {} + } + + { const myarr1 cl_arr1 := {1}; + const myarr1 cl_arr2 := {1}; + const myarr1 cl_arr3 := {2}; + if (cl_arr1 == cl_arr2) {} + if (cl_arr1 == cl_arr3) {} + } + + { const myuni cl_uni1 := {f1 := 1}; + const myuni cl_uni2 := {f1 := 1}; + const myuni cl_uni3 := {f1 := 2}; + if (cl_uni1 == cl_uni2) {} + if (cl_uni1 == cl_uni3) {} + } + + {var boolean vl_i := 5.5 == false; } + {var boolean vl_i := true == 5.5; } + {var boolean vl_i := true == omit; } + {var boolean vl_i := true == '00'B; } + {var boolean vl_i := true == '11'H; } + {var boolean vl_i := true == '00'O; } + {var boolean vl_i := true == "akarmi"; } + {var boolean vl_i := true == char(0,0,0,0); } + {var boolean vl_i := true == 5.5; } + {var boolean vl_i := pass == 5.5; } + {var boolean vl_i := null == null; } + {var boolean vl_i := cg_boolean == cg_integer; } + {var boolean vl_i := cg_bitstring == cg_hexstring; } + {var boolean vl_i := cg_octetstring == cg_charstring; } + {var boolean vl_i := cg_float == cg_boolean; } + {var boolean vl_i := cg_universalchar == cg_boolean; } +} + +function f_notequalsOperationTests() +{ + {const boolean cl_i := true != false; } + {const boolean cl_i := cg_boolean != cg_boolean; } + {const boolean cl_i := 5 != 5; } + {const boolean cl_i := cg_integer != cg_integer; } + {const boolean cl_i := 5.5 != 5.5; } + {const boolean cl_i := cg_float != cg_float; } + {const boolean cl_i := "akarmi" != "akarmi"; } + {const boolean cl_i := cg_charstring != cg_charstring; } + {const boolean cl_i := '00'B != '00'B; } + {const boolean cl_i := cg_bitstring != cg_bitstring; } + {const boolean cl_i := '00'H != '00'H; } + {const boolean cl_i := cg_hexstring != cg_hexstring; } + {const boolean cl_i := '00'O != '00'O; } + {const boolean cl_i := cg_octetstring != cg_octetstring; } + {const boolean cl_i := char(0,0,0,0) != char(0,0,0,0); } + {const boolean cl_i := char(0,0,0,48) != "0"; } + {const boolean cl_i := "0" != char(0,0,0,48); } + {const boolean cl_i := cg_universalchar != cg_universalchar; } + {const myenum1 cl_j := xx1; var boolean vl_i := j != xx1; } + {const myenum1 cl_j := xx1; var boolean vl_i := xx1 != j; } + {const boolean cl_i := pass != pass; } + {const boolean cl_i := null != null; } + {const boolean cl_i := omit != omit; } + {const t_function cl_i1 := refers(f_functionName); + const t_function cl_i2 := refers(f_functionName); + const boolean cl_i := i1 != i2; + } + {const t_altstep2 cl_i1 := refers(as_altstepName); + const t_altstep2 cl_i2 := refers(as_altstepName); + const boolean cl_i := i1 != i2; + } + {const t_testcase cl_i1 := refers(tc_c_testcase); + const t_testcase cl_i2 := refers(tc_c_testcase); + const boolean cl_i := i1 != i2; + } + + {var boolean vl_i := 5.5 != false; } + {var boolean vl_i := true != 5.5; } + {var boolean vl_i := true != omit; } + {var boolean vl_i := true != '00'B; } + {var boolean vl_i := true != '11'H; } + {var boolean vl_i := true != '00'O; } + {var boolean vl_i := true != "akarmi"; } + {var boolean vl_i := true != char(0,0,0,0); } + {var boolean vl_i := true != 5.5; } + {var boolean vl_i := pass != 5.5; } + {var boolean vl_i := null != null; } + {var boolean vl_i := cg_boolean != cg_integer; } + {var boolean vl_i := cg_bitstring != cg_hexstring; } + {var boolean vl_i := cg_octetstring != cg_charstring; } + {var boolean vl_i := cg_float != cg_boolean; } + {var boolean vl_i := cg_universalchar != cg_boolean; } +} + +function f_lessThanOperationTests() +{ + {const boolean cl_i := 5 < 5; } + {var boolean vl_i := cg_integer < cg_integer; } + {var boolean vl_i := 5.5 < 5.5; } + {var boolean vl_i := cg_float < cg_float; } + + {const boolean cl_i := 3 < 5; + if (cl_i) {} + if (3 < 5) {} + if (3.0 < 5.0) {} + } + + {var boolean vl_i := true < false; } + {var boolean vl_i := "akarmi" < "akarmi"; } + {var boolean vl_i := '00'B < '00'B; } + {var boolean vl_i := '00'H < '00'H; } + {var boolean vl_i := '00'O < '00'O; } + {var boolean vl_i := 5.5 < false; } + {var boolean vl_i := true < 5.5; } + {var boolean vl_i := true < omit; } + {var boolean vl_i := true < '00'B; } + {var boolean vl_i := true < '11'H; } + {var boolean vl_i := true < '00'O; } + {var boolean vl_i := true < "akarmi"; } + {var boolean vl_i := true < char(0,0,0,0); } + {var boolean vl_i := true < 5.5; } + {var boolean vl_i := pass < pass; } + {var boolean vl_i := xx1 < xx2; } + {var boolean vl_i := null < null; } + {var boolean vl_i := cg_boolean < cg_boolean; } + {var boolean vl_i := cg_bitstring < cg_hexstring; } + {var boolean vl_i := cg_octetstring < cg_charstring; } +} + +function f_moreThanOperationTests() +{ + {const boolean cl_i := 5 > 5; } + {var boolean vl_i := cg_integer > cg_integer; } + {var boolean vl_i := 5.5 > 5.5; } + {var boolean vl_i := cg_float > cg_float; } + + {const boolean cl_i := 5 > 3; + if (cl_i) {} + if (5 > 3) {} + if (5.0 > 3.0) {} + } + + {var boolean vl_i := true > false; } + {var boolean vl_i := "akarmi" > "akarmi"; } + {var boolean vl_i := '00'B > '00'B; } + {var boolean vl_i := '00'H > '00'H; } + {var boolean vl_i := '00'O > '00'O; } + {var boolean vl_i := 5.5 > false; } + {var boolean vl_i := true > 5.5; } + {var boolean vl_i := true > omit; } + {var boolean vl_i := true > '00'B; } + {var boolean vl_i := true > '11'H; } + {var boolean vl_i := true > '00'O; } + {var boolean vl_i := true > "akarmi"; } + {var boolean vl_i := true > char(0,0,0,0); } + {var boolean vl_i := true > 5.5; } + {var boolean vl_i := pass > pass; } + {var boolean vl_i := xx1 > xx2; } + {var boolean vl_i := null > null; } + {var boolean vl_i := cg_boolean > cg_boolean; } + {var boolean vl_i := cg_bitstring > cg_hexstring; } + {var boolean vl_i := cg_octetstring > cg_charstring; } +} + +function f_lessThanOrEqualsOperationTests() +{ + {const boolean cl_i := 5 <= 5; } + {var boolean vl_i := cg_integer <= cg_integer; } + {var boolean vl_i := 5.5 <= 5.5; } + {var boolean vl_i := cg_float <= cg_float; } + + {const boolean cl_i := 3 <= 5; + if (cl_i) {} + if (3 <= 5) {} + if (3.0 <= 5.0) {} + } + + {var boolean vl_i := true <= false; } + {var boolean vl_i := "akarmi" <= "akarmi"; } + {var boolean vl_i := '00'B <= '00'B; } + {var boolean vl_i := '00'H <= '00'H; } + {var boolean vl_i := '00'O <= '00'O; } + {var boolean vl_i := 5.5 <= false; } + {var boolean vl_i := true <= 5.5; } + {var boolean vl_i := true <= omit; } + {var boolean vl_i := true <= '00'B; } + {var boolean vl_i := true <= '11'H; } + {var boolean vl_i := true <= '00'O; } + {var boolean vl_i := true <= "akarmi"; } + {var boolean vl_i := true <= char(0,0,0,0); } + {var boolean vl_i := true <= 5.5; } + {var boolean vl_i := pass <= pass; } + {var boolean vl_i := xx1 <= xx2; } + {var boolean vl_i := null <= null; } + {var boolean vl_i := cg_boolean <= cg_boolean; } + {var boolean vl_i := cg_bitstring <= cg_hexstring; } + {var boolean vl_i := cg_octetstring <= cg_charstring; } +} + +function f_moreThanOrEqualsOperationTests() +{ + {const boolean cl_i := 5 >= 5; } + {var boolean vl_i := cg_integer >= cg_integer; } + {var boolean vl_i := 5.5 >= 5.5; } + {var boolean vl_i := cg_float >= cg_float; } + + {const boolean cl_i := 5 >= 3; + if (cl_i) {} + if (5 >= 3) {} + if (5.0 >= 3.0) {} + } + + {var boolean vl_i := true >= false; } + {var boolean vl_i := "akarmi" >= "akarmi"; } + {var boolean vl_i := '00'B >= '00'B; } + {var boolean vl_i := '00'H >= '00'H; } + {var boolean vl_i := '00'O >= '00'O; } + {var boolean vl_i := 5.5 >= false; } + {var boolean vl_i := true >= 5.5; } + {var boolean vl_i := true >= omit; } + {var boolean vl_i := true >= '00'B; } + {var boolean vl_i := true >= '11'H; } + {var boolean vl_i := true >= '00'O; } + {var boolean vl_i := true >= "akarmi"; } + {var boolean vl_i := true >= char(0,0,0,0); } + {var boolean vl_i := true >= 5.5; } + {var boolean vl_i := pass >= pass; } + {var boolean vl_i := xx1 >= xx2; } + {var boolean vl_i := null >= null; } + {var boolean vl_i := cg_boolean >= cg_boolean; } + {var boolean vl_i := cg_bitstring >= cg_hexstring; } + {var boolean vl_i := cg_octetstring >= cg_charstring; } +} + +function f_bit2hexOperationTests() +{ + {const hexstring cl_i := bit2hex('00'B);} + {var hexstring vl_i := bit2hex(cg_bitstring);} + + {const hexstring cl_i := bit2hex('01'B); + if (cl_i == '1'H) {} + if (bit2hex('0111'B) == '7'H) {} + } + + {var hexstring vl_i := bit2hex( omit );} + {var hexstring vl_i := bit2hex( true );} + {var hexstring vl_i := bit2hex( false );} + {var hexstring vl_i := bit2hex( "akarmi" );} + {var hexstring vl_i := bit2hex( char(0,0,0,0) );} + {var hexstring vl_i := bit2hex( 5 );} + {var hexstring vl_i := bit2hex( 5.5 );} + {var hexstring vl_i := bit2hex( pass );} + {var hexstring vl_i := bit2hex( xx1 );} + {var hexstring vl_i := bit2hex( null );} + {var hexstring vl_i := bit2hex( cg_boolean );} + {var hexstring vl_i := bit2hex( cg_integer );} + {var hexstring vl_i := bit2hex( cg_float );} + {var hexstring vl_i := bit2hex( cg_hexstring );} + {var hexstring vl_i := bit2hex( cg_octetstring );} + {var hexstring vl_i := bit2hex( cg_charstring );} + {var hexstring vl_i := bit2hex( cg_universalchar );} +} + +function f_bit2intOperationTests() +{ + {const integer cl_i := bit2int('00'B);} + {var integer vl_i := bit2int(cg_bitstring);} + + {const integer cl_i := bit2int('10'B); + if (cl_i == 2) {} + if (bit2int('0111'B) == 7) {} + } + + {var integer vl_i := bit2int( omit );} + {var integer vl_i := bit2int( true );} + {var integer vl_i := bit2int( false );} + {var integer vl_i := bit2int( "akarmi" );} + {var integer vl_i := bit2int( char(0,0,0,0) );} + {var integer vl_i := bit2int( 5 );} + {var integer vl_i := bit2int( 5.5 );} + {var integer vl_i := bit2int( pass );} + {var integer vl_i := bit2int( xx1 );} + {var integer vl_i := bit2int( null );} + {var integer vl_i := bit2int( cg_boolean );} + {var integer vl_i := bit2int( cg_integer );} + {var integer vl_i := bit2int( cg_float );} + {var integer vl_i := bit2int( cg_hexstring );} + {var integer vl_i := bit2int( cg_octetstring );} + {var integer vl_i := bit2int( cg_charstring );} + {var integer vl_i := bit2int( cg_universalchar );} + { var integer vl_i := bit2int('111111111111111111111111111111111'B); } +} + +function f_bit2octOperationTests() +{ + {const octetstring cl_i := bit2oct('00'B);} + {var octetstring vl_i := bit2oct(cg_bitstring);} + + {const octetstring cl_i := bit2oct('0001'B); + if (cl_i == '01'O) {} + if (bit2oct('0111'B) == '07'O) {} + } + + {var octetstring vl_i := bit2oct( omit );} + {var octetstring vl_i := bit2oct( true );} + {var octetstring vl_i := bit2oct( false );} + {var octetstring vl_i := bit2oct( "akarmi" );} + {var octetstring vl_i := bit2oct( char(0,0,0,0) );} + {var octetstring vl_i := bit2oct( 5 );} + {var octetstring vl_i := bit2oct( 5.5 );} + {var octetstring vl_i := bit2oct( pass );} + {var octetstring vl_i := bit2oct( xx1 );} + {var octetstring vl_i := bit2oct( null );} + {var octetstring vl_i := bit2oct( cg_boolean );} + {var octetstring vl_i := bit2oct( cg_integer );} + {var octetstring vl_i := bit2oct( cg_float );} + {var octetstring vl_i := bit2oct( cg_hexstring );} + {var octetstring vl_i := bit2oct( cg_octetstring );} + {var octetstring vl_i := bit2oct( cg_charstring );} + {var octetstring vl_i := bit2oct( cg_universalchar );} +} + +function f_bit2strOperationTests() +{ + {const charstring cl_i := bit2str('00'B);} + {var charstring vl_i := bit2str(cg_bitstring);} + + {const charstring cl_i := bit2str('0001'B); + if (cl_i == "0001") {} + if (bit2str('0111'B) == "0111") {} + } + + {var charstring vl_i := bit2str( omit );} + {var charstring vl_i := bit2str( true );} + {var charstring vl_i := bit2str( false );} + {var charstring vl_i := bit2str( "akarmi" );} + {var charstring vl_i := bit2str( char(0,0,0,0) );} + {var charstring vl_i := bit2str( 5 );} + {var charstring vl_i := bit2str( 5.5 );} + {var charstring vl_i := bit2str( pass );} + {var charstring vl_i := bit2str( xx1 );} + {var charstring vl_i := bit2str( null );} + {var charstring vl_i := bit2str( cg_boolean );} + {var charstring vl_i := bit2str( cg_integer );} + {var charstring vl_i := bit2str( cg_float );} + {var charstring vl_i := bit2str( cg_hexstring );} + {var charstring vl_i := bit2str( cg_octetstring );} + {var charstring vl_i := bit2str( cg_charstring );} + {var charstring vl_i := bit2str( cg_universalchar );} +} + +function f_char2intOperationTests() +{ + {const integer cl_i := char2int("5");} + {var integer vl_i := char2int(cg_charstring);} + + {const integer cl_i := char2int("5"); + if (cl_i == 53) {} + if (char2int("5") == 53) {} + } + + {var integer vl_i := char2int( omit );} + {var integer vl_i := char2int( true );} + {var integer vl_i := char2int( false );} + {var integer vl_i := char2int( '00'B );} + {var integer vl_i := char2int("5555");} + {var integer vl_i := char2int( char(0,0,0,0) );} + {var integer vl_i := char2int( 5 );} + {var integer vl_i := char2int( 5.5 );} + {var integer vl_i := char2int( pass );} + {var integer vl_i := char2int( xx1 );} + {var integer vl_i := char2int( null );} + {var integer vl_i := char2int( cg_boolean );} + {var integer vl_i := char2int( cg_integer );} + {var integer vl_i := char2int( cg_float );} + {var integer vl_i := char2int( cg_bitstring );} + {var integer vl_i := char2int( cg_hexstring );} + {var integer vl_i := char2int( cg_octetstring );} + {var integer vl_i := char2int( cg_universalchar );} +} + +function f_char2octOperationTests() +{ + {const octetstring cl_i := char2oct("00FF");} + {var octetstring vl_i := char2oct(cg_charstring);} + + {const octetstring cl_i := char2oct("Tinky-Winky"); + if (cl_i == '54696E6B792D57696E6B79'O) {} + if (char2oct("T") == '54'O) {} + if (char2oct("Tinky-Winky") == '54696E6B792D57696E6B79'O) {} + } + + {var octetstring vl_i := char2oct( omit );} + {var octetstring vl_i := char2oct( true );} + {var octetstring vl_i := char2oct( false );} + {var octetstring vl_i := char2oct( "akarmi" );} + {var octetstring vl_i := char2oct( char(0,0,0,0) );} + {var octetstring vl_i := char2oct( 5 );} + {var octetstring vl_i := char2oct( 5.5 );} + {var octetstring vl_i := char2oct( pass );} + {var octetstring vl_i := char2oct( xx1 );} + {var octetstring vl_i := char2oct( null );} + {var octetstring vl_i := char2oct( cg_boolean );} + {var octetstring vl_i := char2oct( cg_integer );} + {var octetstring vl_i := char2oct( cg_float );} + {var octetstring vl_i := char2oct( cg_bitstring );} + {var octetstring vl_i := char2oct( cg_hexstring );} + {var octetstring vl_i := char2oct( cg_octetstring );} + {var octetstring vl_i := char2oct( cg_universalchar );} +} + +function f_float2intOperationTests() +{ + {const integer cl_i := float2int(5.5);} + {var integer vl_i := float2int(cg_float);} + + {const integer cl_i := float2int(5.5); + if (cl_i == 5) {} + if (float2int(5.5) == 5) {} + } + + {var integer vl_i := float2int( omit );} + {var integer vl_i := float2int( true );} + {var integer vl_i := float2int( false );} + {var integer vl_i := float2int( '00'B );} + {var integer vl_i := float2int("5555");} + {var integer vl_i := float2int( char(0,0,0,0) );} + {var integer vl_i := float2int( 5 );} + {var integer vl_i := float2int( pass );} + {var integer vl_i := float2int( xx1 );} + {var integer vl_i := float2int( null );} + {var integer vl_i := float2int( cg_boolean );} + {var integer vl_i := float2int( cg_integer );} + {var integer vl_i := float2int( cg_bitstring );} + {var integer vl_i := float2int( cg_hexstring );} + {var integer vl_i := float2int( cg_octetstring );} + {var integer vl_i := float2int( cg_charstring );} + {var integer vl_i := float2int( cg_universalchar );} + {var integer vl_i := float2int(infinity);} + {var integer vl_i := float2int(-infinity);} +} + +function f_float2strOperationTests() +{ + {const charstring cl_i := float2str(5.5);} + {var charstring vl_i := float2str(cg_float);} + + {const charstring cl_i := float2str(5.5); + if (cl_i == "5.5") {} + if (float2str(5.5) == "5.5") {} + } + + {var charstring vl_i := float2str( omit );} + {var charstring vl_i := float2str( true );} + {var charstring vl_i := float2str( false );} + {var charstring vl_i := float2str( "akarmi" );} + {var charstring vl_i := float2str( char(0,0,0,0) );} + {var charstring vl_i := float2str( 5 );} + {var charstring vl_i := float2str( pass );} + {var charstring vl_i := float2str( xx1 );} + {var charstring vl_i := float2str( null );} + {var charstring vl_i := float2str( cg_boolean );} + {var charstring vl_i := float2str( cg_integer );} + {var charstring vl_i := float2str( cg_hexstring );} + {var charstring vl_i := float2str( cg_octetstring );} + {var charstring vl_i := float2str( cg_charstring );} + {var charstring vl_i := float2str( cg_universalchar );} +} + +function f_hex2bitOperationTests() +{ + {const bitstring cl_i := hex2bit('00'H);} + {var bitstring vl_i := hex2bit(cg_hexstring);} + {var bitstring vl_i := hex2bit('FFFFFFFFFF'H); } + + {const bitstring cl_i := hex2bit('10'H); + if (cl_i == '00010000'B) {} + if (hex2bit('10'H) == '00010000'B) {} + } + + {var bitstring vl_i := hex2bit( omit );} + {var bitstring vl_i := hex2bit( true );} + {var bitstring vl_i := hex2bit( false );} + {var bitstring vl_i := hex2bit( "akarmi" );} + {var bitstring vl_i := hex2bit( char(0,0,0,0) );} + {var bitstring vl_i := hex2bit( 5 );} + {var bitstring vl_i := hex2bit( 5.5 );} + {var bitstring vl_i := hex2bit( pass );} + {var bitstring vl_i := hex2bit( xx1 );} + {var bitstring vl_i := hex2bit( null );} + {var bitstring vl_i := hex2bit( cg_boolean );} + {var bitstring vl_i := hex2bit( cg_integer );} + {var bitstring vl_i := hex2bit( cg_float );} + {var bitstring vl_i := hex2bit( cg_bitstring );} + {var bitstring vl_i := hex2bit( cg_octetstring );} + {var bitstring vl_i := hex2bit( cg_charstring );} + {var bitstring vl_i := hex2bit( cg_universalchar );} +} + +function f_hex2intOperationTests() +{ + {const integer cl_i := hex2int('00'H);} + {var integer vl_i := hex2int(cg_hexstring);} + + {const integer cl_i := hex2int('00'H); + if (cl_i == 0) {} + if (hex2int('10'H) == 16) {} + } + + {var integer vl_i := hex2int( omit );} + {var integer vl_i := hex2int( true );} + {var integer vl_i := hex2int( false );} + {var integer vl_i := hex2int( "akarmi" );} + {var integer vl_i := hex2int( char(0,0,0,0) );} + {var integer vl_i := hex2int( 5 );} + {var integer vl_i := hex2int( 5.5 );} + {var integer vl_i := hex2int( pass );} + {var integer vl_i := hex2int( xx1 );} + {var integer vl_i := hex2int( null );} + {var integer vl_i := hex2int( cg_boolean );} + {var integer vl_i := hex2int( cg_integer );} + {var integer vl_i := hex2int( cg_float );} + {var integer vl_i := hex2int( cg_octetstring );} + {var integer vl_i := hex2int( cg_charstring );} + {var integer vl_i := hex2int( cg_universalchar );} + {var integer vl_i := hex2int('FFFFFFFFFF'H); } +} + +function f_hex2octOperationTests() +{ + {const octetstring cl_i := hex2oct('00FF'H);} + {var octetstring vl_i := hex2oct(cg_hexstring);} + + {const octetstring cl_i := hex2oct('00FF'H); + if (cl_i == '00FF'O) {} + if (hex2oct('00FF'H) == '00FF'O) {} + } + + {var octetstring vl_i := hex2oct( omit );} + {var octetstring vl_i := hex2oct( true );} + {var octetstring vl_i := hex2oct( false );} + {var octetstring vl_i := hex2oct( "akarmi" );} + {var octetstring vl_i := hex2oct( char(0,0,0,0) );} + {var octetstring vl_i := hex2oct( 5 );} + {var octetstring vl_i := hex2oct( 5.5 );} + {var octetstring vl_i := hex2oct( pass );} + {var octetstring vl_i := hex2oct( xx1 );} + {var octetstring vl_i := hex2oct( null );} + {var octetstring vl_i := hex2oct( cg_boolean );} + {var octetstring vl_i := hex2oct( cg_integer );} + {var octetstring vl_i := hex2oct( cg_float );} + {var octetstring vl_i := hex2oct( cg_bitstring );} + {var octetstring vl_i := hex2oct( cg_octetstring );} + {var octetstring vl_i := hex2oct( cg_charstring );} + {var octetstring vl_i := hex2oct( cg_universalchar );} +} + +function f_hex2strOperationTests() +{ + {const charstring cl_i := hex2str('00FF'H);} + {var charstring vl_i := hex2str(cg_hexstring);} + + {const charstring cl_i := hex2str('00FF'H); + if (cl_i == "00FF") {} + if (hex2str('00FF'H) == "00FF") {} + } + + {var charstring vl_i := hex2str( omit );} + {var charstring vl_i := hex2str( true );} + {var charstring vl_i := hex2str( false );} + {var charstring vl_i := hex2str( "akarmi" );} + {var charstring vl_i := hex2str( char(0,0,0,0) );} + {var charstring vl_i := hex2str( 5 );} + {var charstring vl_i := hex2str( 5.5 );} + {var charstring vl_i := hex2str( pass );} + {var charstring vl_i := hex2str( xx1 );} + {var charstring vl_i := hex2str( null );} + {var charstring vl_i := hex2str( cg_boolean );} + {var charstring vl_i := hex2str( cg_integer );} + {var charstring vl_i := hex2str( cg_float );} + {var charstring vl_i := hex2str( cg_bitstring );} + {var charstring vl_i := hex2str( cg_octetstring );} + {var charstring vl_i := hex2str( cg_charstring );} + {var charstring vl_i := hex2str( cg_universalchar );} +} + +function f_int2charOperationTests() +{ + {const charstring cl_i := int2char(5);} + {var charstring vl_i := int2char(cg_integer);} + + {const charstring cl_i := int2char(53); + if (cl_i == "5") {} + if (int2char(53) == "5") {} + } + + {var charstring vl_i := int2char( omit );} + {var charstring vl_i := int2char( true );} + {var charstring vl_i := int2char( false );} + {var charstring vl_i := int2char( "akarmi" );} + {var charstring vl_i := int2char( char(0,0,0,0) );} + {var charstring vl_i := int2char( 5.5 );} + {var charstring vl_i := int2char( '00FF'H );} + {var charstring vl_i := int2char( pass );} + {var charstring vl_i := int2char( xx1 );} + {var charstring vl_i := int2char( null );} + {var charstring vl_i := int2char( cg_boolean );} + {var charstring vl_i := int2char( cg_float );} + {var charstring vl_i := int2char( cg_bitstring );} + {var charstring vl_i := int2char( cg_hexstring );} + {var charstring vl_i := int2char( cg_octetstring );} + {var charstring vl_i := int2char( cg_charstring );} + {var charstring vl_i := int2char( cg_universalchar );} + {var charstring vl_i := int2char( -5 );} + {var charstring vl_i := int2char( 500 );} +} + +function f_int2floatOperationTests() +{ + {const float cl_i := int2float(5);} + {var float vl_i := int2float(cg_integer);} + + {const float cl_i := int2float(5); + if (cl_i == 5.0) {} + if (int2float(5) == 5.0) {} + } + + {var float vl_i := int2float( omit );} + {var float vl_i := int2float( true );} + {var float vl_i := int2float( false );} + {var float vl_i := int2float( "akarmi" );} + {var float vl_i := int2float( char(0,0,0,0) );} + {var float vl_i := int2float( 5.5 );} + {var float vl_i := int2float( '00FF'H );} + {var float vl_i := int2float( pass );} + {var float vl_i := int2float( xx1 );} + {var float vl_i := int2float( null );} + {var float vl_i := int2float( cg_boolean );} + {var float vl_i := int2float( cg_float );} + {var float vl_i := int2float( cg_bitstring );} + {var float vl_i := int2float( cg_hexstring );} + {var float vl_i := int2float( cg_octetstring );} + {var float vl_i := int2float( cg_charstring);} + {var float vl_i := int2float( cg_universalchar );} +} + +function f_int2strOperationTests() +{ + {const charstring cl_i := int2str(5);} + {var charstring vl_i := int2str(cg_integer);} + + {const charstring cl_i := int2str(5); + if (cl_i == "5") {} + if (int2str(5) == "5") {} + } + + {var charstring vl_i := int2str( omit );} + {var charstring vl_i := int2str( true );} + {var charstring vl_i := int2str( false );} + {var charstring vl_i := int2str( "akarmi" );} + {var charstring vl_i := int2str( char(0,0,0,0) );} + {var charstring vl_i := int2str( 5.5 );} + {var charstring vl_i := int2str( '00FF'H );} + {var charstring vl_i := int2str( pass );} + {var charstring vl_i := int2str( xx1 );} + {var charstring vl_i := int2str( null );} + {var charstring vl_i := int2str( cg_boolean );} + {var charstring vl_i := int2str( cg_float );} + {var charstring vl_i := int2str( cg_bitstring );} + {var charstring vl_i := int2str( cg_hexstring );} + {var charstring vl_i := int2str( cg_octetstring );} + {var charstring vl_i := int2str( cg_charstring);} + {var charstring vl_i := int2str( cg_universalchar );} +} + +function f_int2unicharOperationTests() +{ + {const charstring cl_i := int2unichar(5);} + {var universal charstring vl_i := int2unichar(5);} + {var universal charstring vl_i := int2unichar(cg_integer);} + + {const universal charstring cl_i := int2unichar(5); + if (cl_i == char(0,0,0,5)) {} + if (int2unichar(5) == char(0,0,0,5)) {} + } + + {var universal charstring vl_i := int2unichar( omit );} + {var universal charstring vl_i := int2unichar( true );} + {var universal charstring vl_i := int2unichar( false );} + {var universal charstring vl_i := int2unichar( "akarmi" );} + {var universal charstring vl_i := int2unichar( char(0,0,0,0) );} + {var universal charstring vl_i := int2unichar( 5.5 );} + {var universal charstring vl_i := int2unichar( '00FF'H );} + {var universal charstring vl_i := int2unichar( pass );} + {var universal charstring vl_i := int2unichar( xx1 );} + {var universal charstring vl_i := int2unichar( null );} + {var universal charstring vl_i := int2unichar( cg_boolean );} + {var universal charstring vl_i := int2unichar( cg_float );} + {var universal charstring vl_i := int2unichar( cg_bitstring );} + {var universal charstring vl_i := int2unichar( cg_hexstring );} + {var universal charstring vl_i := int2unichar( cg_octetstring );} + {var universal charstring vl_i := int2unichar( cg_charstring);} + {var universal charstring vl_i := int2unichar( cg_universalchar );} + {var universal charstring vl_i := int2unichar(55555555555);} +} + +function f_oct2bitOperationTests() +{ + {const bitstring cl_i := oct2bit('00FF'O);} + {var bitstring vl_i := oct2bit(cg_octetstring);} + + {const bitstring cl_i := oct2bit('00FF'O); + if (cl_i == '0000000011111111'B) {} + if (oct2bit('00FF'O) == '0000000011111111'B) {} + } + + {var bitstring vl_i := oct2bit( omit );} + {var bitstring vl_i := oct2bit( true );} + {var bitstring vl_i := oct2bit( false );} + {var bitstring vl_i := oct2bit( "akarmi" );} + {var bitstring vl_i := oct2bit( char(0,0,0,0) );} + {var bitstring vl_i := oct2bit( 5 );} + {var bitstring vl_i := oct2bit( 5.5 );} + {var bitstring vl_i := oct2bit( pass );} + {var bitstring vl_i := oct2bit( xx1 );} + {var bitstring vl_i := oct2bit( null );} + {var bitstring vl_i := oct2bit( cg_boolean );} + {var bitstring vl_i := oct2bit( cg_integer );} + {var bitstring vl_i := oct2bit( cg_float );} + {var bitstring vl_i := oct2bit( cg_bitstring );} + {var bitstring vl_i := oct2bit( cg_hexstring );} + {var bitstring vl_i := oct2bit( cg_charstring );} + {var bitstring vl_i := oct2bit( cg_universalchar );} +} + +function f_oct2charOperationTests() +{ + {const charstring cl_i := oct2char('0F'O);} + {var charstring vl_i := oct2char(cg_octetstring);} + + {const charstring cl_i := oct2char('44'O); + if (cl_i == "D") {} + if (oct2char('44'O) == "D") {} + if (oct2char('4469707379'O) == "Dipsy") {} + } + + {var charstring vl_i := oct2char( omit );} + {var charstring vl_i := oct2char( true );} + {var charstring vl_i := oct2char( false );} + {var charstring vl_i := oct2char( "akarmi" );} + {var charstring vl_i := oct2char( char(0,0,0,0) );} + {var charstring vl_i := oct2char( 5 );} + {var charstring vl_i := oct2char( 5.5 );} + {var charstring vl_i := oct2char( pass );} + {var charstring vl_i := oct2char( xx1 );} + {var charstring vl_i := oct2char( null );} + {var charstring vl_i := oct2char( cg_boolean );} + {var charstring vl_i := oct2char( cg_integer );} + {var charstring vl_i := oct2char( cg_float );} + {var charstring vl_i := oct2char( cg_bitstring );} + {var charstring vl_i := oct2char( cg_hexstring );} + {var charstring vl_i := oct2char( cg_charstring );} + {var charstring vl_i := oct2char( cg_universalchar );} + {var charstring vl_i := oct2char('FF'O);} +} + +function f_oct2hexOperationTests() +{ + {const hexstring cl_i := oct2hex('0F'O);} + {var hexstring vl_i := oct2hex(cg_octetstring);} + + {const hexstring cl_i := oct2hex('0F'O); + if (cl_i == '0F'H) {} + if (oct2hex('0F'O) == '0F'H) {} + } + + {var hexstring vl_i := oct2hex( omit );} + {var hexstring vl_i := oct2hex( true );} + {var hexstring vl_i := oct2hex( false );} + {var hexstring vl_i := oct2hex( "akarmi" );} + {var hexstring vl_i := oct2hex( char(0,0,0,0) );} + {var hexstring vl_i := oct2hex( 5 );} + {var hexstring vl_i := oct2hex( 5.5 );} + {var hexstring vl_i := oct2hex( pass );} + {var hexstring vl_i := oct2hex( xx1 );} + {var hexstring vl_i := oct2hex( null );} + {var hexstring vl_i := oct2hex( cg_boolean );} + {var hexstring vl_i := oct2hex( cg_integer );} + {var hexstring vl_i := oct2hex( cg_float );} + {var hexstring vl_i := oct2hex( cg_bitstring );} + {var hexstring vl_i := oct2hex( cg_hexstring );} + {var hexstring vl_i := oct2hex( cg_charstring );} + {var hexstring vl_i := oct2hex( cg_universalchar );} +} + +function f_oct2intOperationTests() +{ + {const integer cl_i := oct2int('0F'O);} + {var integer vl_i := oct2int(cg_octetstring);} + {var integer vl_i := oct2int('FFFFFFFFFF'O);} + + {const integer cl_i := oct2int('0F'O); + if (cl_i == 15) {} + if (oct2int('0F'O) == 15) {} + } + + {var integer vl_i := oct2int( omit );} + {var integer vl_i := oct2int( true );} + {var integer vl_i := oct2int( false );} + {var integer vl_i := oct2int( "akarmi" );} + {var integer vl_i := oct2int( char(0,0,0,0) );} + {var integer vl_i := oct2int( 5 );} + {var integer vl_i := oct2int( 5.5 );} + {var integer vl_i := oct2int( pass );} + {var integer vl_i := oct2int( xx1 );} + {var integer vl_i := oct2int( null );} + {var integer vl_i := oct2int( cg_boolean );} + {var integer vl_i := oct2int( cg_integer );} + {var integer vl_i := oct2int( cg_float );} + {var integer vl_i := oct2int( cg_bitstring );} + {var integer vl_i := oct2int( cg_hexstring );} + {var integer vl_i := oct2int( cg_charstring );} + {var integer vl_i := oct2int( cg_universalchar );} +} + +function f_oct2strOperationTests() +{ + {const charstring cl_i := oct2str('0F'O);} + {var charstring vl_i := oct2str(cg_octetstring);} + + {const charstring cl_i := oct2str('0F'O); + if (cl_i == "0F") {} + if (oct2str('0F'O) == "0F") {} + } + + {var charstring vl_i := oct2str( omit );} + {var charstring vl_i := oct2str( true );} + {var charstring vl_i := oct2str( false );} + {var charstring vl_i := oct2str( "akarmi" );} + {var charstring vl_i := oct2str( char(0,0,0,0) );} + {var charstring vl_i := oct2str( 5 );} + {var charstring vl_i := oct2str( 5.5 );} + {var charstring vl_i := oct2str( pass );} + {var charstring vl_i := oct2str( xx1 );} + {var charstring vl_i := oct2str( null );} + {var charstring vl_i := oct2str( cg_boolean );} + {var charstring vl_i := oct2str( cg_integer );} + {var charstring vl_i := oct2str( cg_float );} + {var charstring vl_i := oct2str( cg_bitstring );} + {var charstring vl_i := oct2str( cg_hexstring );} + {var charstring vl_i := oct2str( cg_charstring );} + {var charstring vl_i := oct2str( cg_universalchar );} +} + +function f_str2bitOperationTests() +{ + const charstring cl_charstring_bit := "0101"; + + {const bitstring cl_i := str2bit("0101");} + {var bitstring vl_i := str2bit(cl_charstring_bit);} + + {const bitstring cl_i := str2bit("0101"); + if (cl_i == '0101'B) {} + if (str2bit("0101") == '0101'B) {} + } + + {var bitstring vl_i := str2bit( omit );} + {var bitstring vl_i := str2bit( true );} + {var bitstring vl_i := str2bit( false );} + {var bitstring vl_i := str2bit( char(0,0,0,0) );} + {var bitstring vl_i := str2bit( 5 );} + {var bitstring vl_i := str2bit( 5.5 );} + {var bitstring vl_i := str2bit( pass );} + {var bitstring vl_i := str2bit( xx1 );} + {var bitstring vl_i := str2bit( null );} + {var bitstring vl_i := str2bit( cg_boolean );} + {var bitstring vl_i := str2bit( cg_integer );} + {var bitstring vl_i := str2bit( cg_float );} + {var bitstring vl_i := str2bit( cg_bitstring );} + {var bitstring vl_i := str2bit( cg_hexstring );} + {var bitstring vl_i := str2bit( cg_universalchar );} + {var bitstring vl_i := str2bit("akarmi");} +} + +function f_str2floatOperationTests() +{ + const charstring cl_charstring1 := "0101"; + const charstring cl_charstring2 := "5.5"; + const charstring cl_charstring3 := "+5.5"; + const charstring cl_charstring4 := "-5.5"; + const charstring cl_charstring5 := "-0.0"; + const charstring cl_charstring6 := "5.5e2"; + const charstring cl_charstring7 := " INF "; + const charstring cl_charstring8 := " -INF "; + + {const float cl_i := str2float("0101");} + {const float cl_i := str2float("5.5");} + {const float cl_i := str2float("+5.5");} + {const float cl_i := str2float("-5.5");} + {const float cl_i := str2float("-0.0");} + {const float cl_i := str2float("5.5e2");} + {const float cl_i := str2float(" INF ");} + {const float cl_i := str2float(" -INF ");} + {const float cl_i := str2float("1");} + {const float cl_i := str2float("-1");} + {const float cl_i := str2float("-1.");} + {const float cl_i := str2float("+1");} + {const float cl_i := str2float("+1.");} + {const float cl_i := str2float("+001");} + {const float cl_i := str2float("-001");} + {const float cl_i := str2float("-0");} + {const float cl_i := str2float("-0.");} + {const float cl_i := str2float("-0.0");} + {const float cl_i := str2float("+0");} + {const float cl_i := str2float("+0.");} + {const float cl_i := str2float("+0.0");} + {const float cl_i := str2float(cl_charstring1);} + {const float cl_i := str2float(cl_charstring2);} + {const float cl_i := str2float(cl_charstring3);} + {const float cl_i := str2float(cl_charstring4);} + {const float cl_i := str2float(cl_charstring5);} + {const float cl_i := str2float(cl_charstring6);} + {const float cl_i := str2float(cl_charstring7);} + {const float cl_i := str2float(cl_charstring8);} + + {if (str2float("0101") == 101.0) {} + if (str2float("5.5") == 5.5) {} + if (str2float("5.") == 5.0) {} + if (str2float("+5.5") == 5.5) {} + if (str2float("-5.5") == -5.5) {} + if (str2float("INF") == infinity) {} + if (str2float("-INF") == -infinity) {} + } + + {var float vl_i := str2float( omit );} + {var float vl_i := str2float( true );} + {var float vl_i := str2float( false );} + {var float vl_i := str2float( char(0,0,0,0) );} + {var float vl_i := str2float( 5 );} + {var float vl_i := str2float( 5.5 );} + {var float vl_i := str2float( pass );} + {var float vl_i := str2float( xx1 );} + {var float vl_i := str2float( null );} + {var float vl_i := str2float( cg_boolean );} + {var float vl_i := str2float( cg_integer );} + {var float vl_i := str2float( cg_float );} + {var float vl_i := str2float( cg_bitstring );} + {var float vl_i := str2float( cg_hexstring );} + {var float vl_i := str2float( cg_universalchar );} + {var float vl_i := str2float( "akarmi" );} +} + +function f_str2hexOperationTests() +{ + const charstring cl_charstring1 := "0101"; + const charstring cl_charstring2 := "ABBA"; + + {const hexstring cl_i := str2hex("0101");} + {var hexstring vl_i := str2hex("ABBA");} + {var hexstring vl_i := str2hex(cl_charstring1);} + {var hexstring vl_i := str2hex(cl_charstring2);} + + {const hexstring cl_i := str2hex("0101"); + if (cl_i == '0101'H) {} + if (str2hex("0101") == '0101'H) {} + } + + {var hexstring vl_i := str2hex( omit );} + {var hexstring vl_i := str2hex( true );} + {var hexstring vl_i := str2hex( false );} + {var hexstring vl_i := str2hex( char(0,0,0,0) );} + {var hexstring vl_i := str2hex( 5 );} + {var hexstring vl_i := str2hex( 5.5 );} + {var hexstring vl_i := str2hex( pass );} + {var hexstring vl_i := str2hex( xx1 );} + {var hexstring vl_i := str2hex( null );} + {var hexstring vl_i := str2hex( cg_boolean );} + {var hexstring vl_i := str2hex( cg_integer );} + {var hexstring vl_i := str2hex( cg_float );} + {var hexstring vl_i := str2hex( cg_bitstring );} + {var hexstring vl_i := str2hex( cg_hexstring );} + {var hexstring vl_i := str2hex( cg_universalchar );} + {var hexstring vl_i := str2hex("akarmi");} +} + +function f_str2intOperationTests() +{ + const charstring cl_charstring1 := "5"; + const charstring cl_charstring2 := "-5"; + + {const integer cl_i := str2int("5");} + {var integer vl_i := str2int("-5");} + {var integer vl_i := str2int(cl_charstring1);} + {var integer vl_i := str2int(cl_charstring2);} + + {const integer cl_i := str2int("5"); + if (cl_i == 5) {} + if (str2int("5") == 5) {} + } + + {var integer vl_i := str2int( omit );} + {var integer vl_i := str2int( true );} + {var integer vl_i := str2int( false );} + {var integer vl_i := str2int( "akarmi" );} + {var integer vl_i := str2int( char(0,0,0,0) );} + {var integer vl_i := str2int( 5 );} + {var integer vl_i := str2int( 5.5 );} + {var integer vl_i := str2int( pass );} + {var integer vl_i := str2int( xx1 );} + {var integer vl_i := str2int( null );} + {var integer vl_i := str2int( cg_boolean );} + {var integer vl_i := str2int( cg_integer );} + {var integer vl_i := str2int( cg_float );} + {var integer vl_i := str2int( cg_bitstring );} + {var integer vl_i := str2int( cg_hexstring );} + {var integer vl_i := str2int( cg_octetstring );} + {var integer vl_i := str2int( cg_universalchar );} + {var integer vl_i := str2int("akarmi");} +} + +function f_str2octOperationTests() +{ + const charstring cl_charstring1 := "55"; + const charstring cl_charstring2 := "ABBA"; + + {const octetstring cl_i := str2oct("55");} + {var octetstring vl_i := str2oct("ABBA");} + {var octetstring vl_i := str2oct(cl_charstring1);} + {var octetstring vl_i := str2oct(cl_charstring2);} + + {const octetstring cl_i := str2oct("55"); + if (cl_i == '55'O) {} + if (str2oct("55") == '55'O) {} + } + + {var octetstring vl_i := str2oct( omit );} + {var octetstring vl_i := str2oct( true );} + {var octetstring vl_i := str2oct( false );} + {var octetstring vl_i := str2oct( "akarmi" );} + {var octetstring vl_i := str2oct( char(0,0,0,0) );} + {var octetstring vl_i := str2oct( 5 );} + {var octetstring vl_i := str2oct( 5.5 );} + {var octetstring vl_i := str2oct( pass );} + {var octetstring vl_i := str2oct( xx1 );} + {var octetstring vl_i := str2oct( null );} + {var octetstring vl_i := str2oct( cg_boolean );} + {var octetstring vl_i := str2oct( cg_integer );} + {var octetstring vl_i := str2oct( cg_float );} + {var octetstring vl_i := str2oct( cg_bitstring );} + {var octetstring vl_i := str2oct( cg_hexstring );} + {var octetstring vl_i := str2oct( cg_octetstring );} + {var octetstring vl_i := str2oct( cg_universalchar );} + {var octetstring vl_i := str2oct("5");} + {var octetstring vl_i := str2oct("akarmi");} +} + +function f_unichar2intOperationTests() +{ + {var integer vl_i := unichar2int(char(0,0,0,0));} + {var integer vl_i := unichar2int(cg_universalchar);} + + {const integer cl_i := unichar2int(char(0,0,0,0)); + if (cl_i == 0) {} + if (unichar2int(char(0,0,0,0)) == 0) {} + } + + {const integer cl_i := unichar2int( omit );} + {var integer vl_i := unichar2int( true );} + {var integer vl_i := unichar2int( false );} + {var integer vl_i := unichar2int( "akarmi" );} + {var integer vl_i := unichar2int( 5 );} + {var integer vl_i := unichar2int( 5.5 );} + {var integer vl_i := unichar2int( pass );} + {var integer vl_i := unichar2int( xx1 );} + {var integer vl_i := unichar2int( null );} + {var integer vl_i := unichar2int( cg_boolean );} + {var integer vl_i := unichar2int( cg_integer );} + {var integer vl_i := unichar2int( cg_float );} + {var integer vl_i := unichar2int( cg_bitstring );} + {var integer vl_i := unichar2int( cg_hexstring );} + {var integer vl_i := unichar2int( cg_octetstring );} + {var integer vl_i := unichar2int( cg_charstring );} + {var integer vl_i := unichar2int(char(0,0,0,0) & char(0,0,0,0));} +} + +function f_unichar2charOperationTests() +{ + {var charstring vl_i := unichar2char(char(0,0,0,0));} + {var charstring vl_i := unichar2char(cg_universalchar);} + + {const charstring cl_i := unichar2char(char(0,0,0,53)); + if (cl_i == "5") {} + if (unichar2char(char(0,0,0,53)) == "5") {} + } + + {const charstring cl_i := unichar2char( omit );} + {var charstring vl_i := unichar2char( true );} + {var charstring vl_i := unichar2char( false );} + {var charstring vl_i := unichar2char( "akarmi" );} + {var charstring vl_i := unichar2char( 5 );} + {var charstring vl_i := unichar2char( 5.5 );} + {var charstring vl_i := unichar2char( pass );} + {var charstring vl_i := unichar2char( xx1 );} + {var charstring vl_i := unichar2char( null );} + {var charstring vl_i := unichar2char( cg_boolean );} + {var charstring vl_i := unichar2char( cg_integer );} + {var charstring vl_i := unichar2char( cg_float );} + {var charstring vl_i := unichar2char( cg_bitstring );} + {var charstring vl_i := unichar2char( cg_hexstring );} + {var charstring vl_i := unichar2char( cg_octetstring );} + {var charstring vl_i := unichar2char( cg_charstring );} + {var charstring vl_i := unichar2char(char(1,0,0,0));} + {var charstring vl_i := unichar2char(char(0,1,0,0));} + {var charstring vl_i := unichar2char(char(0,0,1,0));} + {var charstring vl_i := unichar2char(char(0,0,0,128));} +} + +function f_int2bitOperationTests() +{ + {var bitstring vl_i := int2bit(5, 5);} + {var bitstring vl_i := int2bit(cg_integer, cg_integer);} + + {const bitstring cl_i := int2bit(5, 5); + if (cl_i == '00101'B) {} + if (int2bit(5, 5) == '00101'B) {} + } + + {const bitstring cl_i := int2bit( omit , omit );} + {var bitstring vl_i := int2bit( true , true);} + {var bitstring vl_i := int2bit( false , false );} + {var bitstring vl_i := int2bit( char(0,0,0,0) , char(0,0,0,0) );} + {var bitstring vl_i := int2bit( 5.5 , 5.5);} + {var bitstring vl_i := int2bit( pass , pass );} + {var bitstring vl_i := int2bit( xx1 , xx1 );} + {var bitstring vl_i := int2bit( null , null);} + {var bitstring vl_i := int2bit( cg_boolean , cg_boolean );} + {var bitstring vl_i := int2bit( cg_float , cg_float );} + {var bitstring vl_i := int2bit( cg_bitstring , cg_bitstring );} + {var bitstring vl_i := int2bit( cg_hexstring , cg_hexstring );} + {var bitstring vl_i := int2bit( cg_octetstring , cg_octetstring );} + {var bitstring vl_i := int2bit( cg_charstring , cg_charstring );} + {var bitstring vl_i := int2bit( cg_universalchar , cg_universalchar );} + {var bitstring vl_i := int2bit("akarmi", "akarmi" );} + {var bitstring vl_i := int2bit( 5 , 1 );} + {var bitstring vl_i := int2bit( -5 , -1 );} +} + +function f_int2hexOperationTests() +{ + {var hexstring vl_i := int2hex(5, 5);} + {var hexstring vl_i := int2hex(cg_integer, cg_integer);} + + {const hexstring cl_i := int2hex(5, 5); + if (cl_i == '00005'H) {} + if (int2hex(5, 5) == '00005'H) {} + } + + {const hexstring cl_i := int2hex( omit , omit );} + {var hexstring vl_i := int2hex( true , true);} + {var hexstring vl_i := int2hex( false , false );} + {var hexstring vl_i := int2hex( char(0,0,0,0) , char(0,0,0,0) );} + {var hexstring vl_i := int2hex( 5.5 , 5.5);} + {var hexstring vl_i := int2hex( pass , pass );} + {var hexstring vl_i := int2hex( xx1 , xx1 );} + {var hexstring vl_i := int2hex( null , null);} + {var hexstring vl_i := int2hex( cg_boolean , cg_boolean );} + {var hexstring vl_i := int2hex( cg_float , cg_float );} + {var hexstring vl_i := int2hex( cg_bitstring , cg_bitstring );} + {var hexstring vl_i := int2hex( cg_hexstring , cg_hexstring );} + {var hexstring vl_i := int2hex( cg_octetstring, cg_octetstring );} + {var hexstring vl_i := int2hex( cg_charstring , cg_charstring );} + {var hexstring vl_i := int2hex( cg_universalchar , cg_universalchar );} + {var hexstring vl_i := int2hex("akarmi", "akarmi" );} + {var hexstring vl_i := int2hex( 50 , 1 );} + {var hexstring vl_i := int2hex( -5 , -1 );} +} + +function f_int2octOperationTests() +{ + {var octetstring vl_i := int2oct(5, 5);} + {var octetstring vl_i := int2oct(cg_integer, cg_integer);} + + {const octetstring cl_i := int2oct(5, 2); + if (cl_i == '0005'O) {} + if (int2oct(5, 5) == '0005'O) {} + } + + {const octetstring cl_i := int2oct( omit , omit );} + {var octetstring vl_i := int2oct( true , true);} + {var octetstring vl_i := int2oct( false , false );} + {var octetstring vl_i := int2oct( char(0,0,0,0) , char(0,0,0,0) );} + {var octetstring vl_i := int2oct( 5.5 , 5.5);} + {var octetstring vl_i := int2oct( pass , pass );} + {var octetstring vl_i := int2oct( xx1 , xx1 );} + {var octetstring vl_i := int2oct( null , null);} + {var octetstring vl_i := int2oct( cg_boolean , cg_boolean );} + {var octetstring vl_i := int2oct( cg_float , cg_float );} + {var octetstring vl_i := int2oct( cg_bitstring , cg_bitstring );} + {var octetstring vl_i := int2oct( cg_hexstring , cg_hexstring );} + {var octetstring vl_i := int2oct( cg_octetstring , cg_octetstring );} + {var octetstring vl_i := int2oct( cg_charstring , cg_charstring );} + {var octetstring vl_i := int2oct( cg_universalchar , cg_universalchar );} + {var octetstring vl_i := int2oct("akarmi", "akarmi" );} + {var octetstring vl_i := int2oct( 500 , 1 );} + {var octetstring vl_i := int2oct( -5 , -1 );} +} + +function f_decompOperationTests() +{ + { const objid cl_i := decomp(objid { itu_t(0) recommendation (0) 0}, 1, 1); } + + { const objid cl_i := decomp(1, 1, 1); } + { const integer cl_i := decomp(1,1,1); } +} + +function f_replaceOperationTests() +{ + const integer cl_small_int := 1; + const myrecof1 cl_myrecof := {1,2,3,4}; + const mysetof1 cl_mysetof := {1,2,3,4}; + const myarr1 cl_myarray := {1}; + var integer vl_int; + + {const bitstring cl_i := replace('1001'B, 1, 1, ''B);} + {var bitstring vl_i := replace(cg_bitstring,1 ,cl_small_int, ''B);} + {var hexstring vl_i := replace('BB'H, 1, 1, ''H);} + {var hexstring vl_i := replace(cg_hexstring,1 ,cl_small_int, ''H);} + {var octetstring vl_i := replace('DEADBEAF'O, 1, 1, ''O);} + {var octetstring vl_i := replace(cg_octetstring,0 ,cl_small_int, ''O);} + {var charstring vl_i := replace("akarmi", 1, 1, "");} + {var charstring vl_i := replace(cg_charstring, 1, 1, "");} + {var universal charstring vl_i := replace("akarmi", 1, 1, "");} + {var universal charstring vl_i := replace(cg_universalchar, 0, 1, cg_universalchar);} + {var myrecof1 vl_i := replace(cl_myrecof,1 ,cl_small_int, cl_myrecof);} + {var mysetof1 vl_i := replace(cl_mysetof,1 ,cl_small_int, cl_mysetof);} + + {const bitstring cl_i := replace('1001'B, 1, 1, '1'B); + if (cl_i == '1101'B) {} + if (replace('1001'B, 1, 1, '1'B) == '1101'B) {} + if (replace('BB'H, 1, 1, ''H) == 'B'H) {} + if (replace('DEADBEAF'O, 1, 1, ''O) == 'DEBEAF'O) {} + if (replace("akarmi", 1, 1, "") == "aarmi") {} + const myrecof1 cl_emptyrecof := {}; + if (replace(cl_myrecof,1 ,1, cl_emptyrecof) != cl_emptyrecof) {} + const mysetof1 cl_emptysetof := {}; + if (replace(cl_mysetof,1 ,1, cl_emptysetof) != cl_emptysetof) {} + } + + {var bitstring vl_i := replace(nonExi, nonExi, nonExi, nonExi);} + {var bitstring vl_i := replace(5, 1, 1, 9);} + {var bitstring vl_i := replace(cl_myrecof, 1, 1, cl_myrecof);} + {var bitstring vl_i := replace('1001'B, -4, -1, ''B);} + {var bitstring vl_i := replace('1001'B, 6, 1, ''B);} + {var bitstring vl_i := replace('1001'B, 6, vl_int, ''B);} + {var bitstring vl_i := replace('1001'B, vl_int, 6, ''B);} + {var bitstring vl_i := replace('1001'B, 2, 6, ''B);} + {var bitstring vl_i := replace('1001'B, 99999999999999999999999, 99999999999999999999999, ''B);} + {var charstring vl_i := replace(cg_charstring, 6, 1, "");} + {var charstring vl_i := replace(cg_charstring, 2, 6, "");} + {var universal charstring vl_i := replace(cg_universalchar, 6, 1, cg_universalchar);} + {var universal charstring vl_i := replace(cg_universalchar, 2, 6, cg_universalchar);} + {var bitstring vl_i := replace(cl_myrecof, 6, 1, cl_myrecof);} + {var bitstring vl_i := replace(cl_myrecof, 2, 6, cl_myrecof);} + {var bitstring vl_i := replace(cl_mysetof, 6, 1, cl_mysetof);} + {var bitstring vl_i := replace(cl_mysetof, 2, 6, cl_mysetof);} +} + +function f_rndOperationTests() +{ + {var float vl_i := rnd();} + {var float vl_i := rnd(5.5);} + {var float vl_i := rnd(cg_float);} + + {var float vl_i := rnd( omit );} + {var float vl_i := rnd( true );} + {var float vl_i := rnd( false );} + {var float vl_i := rnd( "akarmi" );} + {var float vl_i := rnd( 5 );} + {var float vl_i := rnd( '00'B );} + {var float vl_i := rnd( '00'H );} + {var float vl_i := rnd( '00'O );} + {var float vl_i := rnd( char(0,0,0,0) );} + {var float vl_i := rnd( pass );} + {var float vl_i := rnd( xx1 );} + {var float vl_i := rnd( null );} + {var float vl_i := rnd( cg_boolean );} + {var float vl_i := rnd( cg_integer );} + {var float vl_i := rnd( cg_bitstring );} + {var float vl_i := rnd( cg_hexstring );} + {var float vl_i := rnd( cg_octetstring );} + {var float vl_i := rnd( cg_charstring );} + {var float vl_i := rnd( cg_universalchar );} + {var float vl_i := rnd(infinity);} + {var float vl_i := rnd(-infinity);} +} + +function f_isboundTests(){ + const myrecof1 cl_i := {-, 5}; + const boolean cl_i2 := isbound(cl_i); + if (cl_i2 == true) {} else {} + + const recordOuter cl_rec := {f2 := 5}; + if(isbound(cl_rec.f1.f1)) {} else {} + if(isbound(cl_rec.f2)) {} else {} + if(isbound(cl_rec.f3.f1)) {} else {} + if(isbound(cl_rec.f1.f4)) {} else {} + + template recordOuter t_rec := {f2 := 5}; + if (isbound(t_rec.f1.f1)) {} else {} + if (isbound(t_rec.f2)) {} else {} + if (isbound(t_rec.f3.f1)) {} else {} + if (isbound(t_rec.f1.f4)) {} else {} + + const myuni cl_uni := {f2 := 5}; + if (isbound(cl_uni.f2)) {} else {} + if (isbound(cl_uni.f1)) {} else {} + + const myrecof1 cl_roi := { [1] := 5}; + if (isbound(cl_roi[1])) {} else {} + if (isbound(cl_roi[0])) {} else {} + if (isbound(cl_roi[10])) {} else {} + //FIXME implement +} + +function f_isvalueTests(){ + const myrecof1 cl_i := {-, 5}; + const boolean cl_i2 := isvalue(cl_i); + if (cl_i2 == true) {} + //FIXME implement +} + +function f_lengthofTests(){ + if (1 == lengthof('1'B)) {} + if (1 == lengthof('1'H)) {} + if (1 == lengthof('11'O)) {} + if (6 == lengthof("akarmi")) {} + if (5 == lengthof(charstring : "HELLO")) {} + if (1 == lengthof('1'B length(1))) {} + + const myrecof1 cl_myrecof1 := {1,2,3}; + if (3 == lengthof(cl_myrecof1)) {} + const mysetof1 cl_mysetof1 := {1,2,3}; + if (3 == lengthof(cl_mysetof1)) {} + const myarr1 cl_myarr1 := {1}; + if (1 == lengthof(cl_myarr1)) {} + + if (8 == lengthof(universal charstring : ? length(8))) {} + if (3 == lengthof(myrecof1 : {1,2,3})) {} + if (3 == lengthof(mysetof1 : {1,2,3})) {} + if (1 == lengthof(myarr1 : {1})) {} + + { var integer vl_i := lengthof(nonExi); } + { var integer vl_i := lengthof(1); } +} + +function f_ispresentTests(){ + const myrec5 cl_i := {f1 := 5, f2 := 1}; + const myrec5 cl_i2 := { f1 := omit, f2 := 1}; + template myrec5 t_i := {f1 := 5, f2 := 1}; + template myrec5 t_i2 := { f1 := omit, f2 := 1}; + const integer cl_wrongType := 5; + + { const boolean cll_i := ispresent(cl_i.f1);} + { const boolean cll_i := ispresent(cl_i2.f1);} + { var boolean vl_i := ispresent(t_i.f1);} + { var boolean vl_i := ispresent(t_i2.f1);} + + {if (ispresent(cl_i.f1)) {} + if (not ispresent(cl_i2.f1)) {} + if (ispresent(t_i.f1)) {} + if (not ispresent(t_i2.f1)) {} + } + + { const boolean cll_i := ispresent(t_i.f1);} + { const boolean cll_i := ispresent(t_i2.f1);} + { const boolean cll_i := ispresent(myrec3.f1);} + { const boolean cll_i := ispresent(cl_i.nonExi);} + { const boolean cll_i := ispresent(cl_wrongType.f1);} + { const boolean cll_i := ispresent(cl_i.f2);} +} + +function f_ischoosenTests(){ + const myuni cl_i := {f1 := 5}; + const myuni cl_i2 := { f2 := 1}; + template myuni t_i := {f1 := 5}; + template myuni t_i2 := { f2 := 1}; + const integer cl_wrongType := 5; + + { const boolean cll_i := ischosen(cl_i.f1);} + { const boolean cll_i := ischosen(cl_i2.f2);} + { var boolean vl_i := ischosen(t_i.f1);} + { var boolean vl_i := ischosen(t_i2.f2);} + + {if (ischosen(cl_i.f1)) {} + if (not ischosen(cl_i2.f1)) {} + if (ischosen(t_i.f1)) {} + if (not ischosen(t_i2.f1)) {} + } + + { const boolean cll_i := ischosen(t_i.f1);} + { const boolean cll_i := ischosen(t_i2.f2);} + { const boolean cll_i := ischosen(myrec3.f1);} + { const boolean cll_i := ischosen(cl_i.nonExi);} + { const boolean cll_i := ischosen(cl_wrongType.f1);} +} + +function f_sizeofHelper() return charstring { + return "ab"; +} + +function f_sizeofHelper2() return template charstring { + return "ab"; +} + +function f_sizeof(in integer pl_par1 := sizeof(f_sizeofHelper()), in template integer pl_par2){ + { const myrec1 cl_i := {f1 := 1}; + if(sizeof(cl_i) == 1) {};} + { const myrecof1 cl_i := {1}; + if(sizeof(cl_i) == 1) {};} + { const myset1 cl_i := {f1 := 1}; + if(sizeof(cl_i) == 1) {};} + { const mysetof1 cl_i := {1}; + if(sizeof(cl_i) == 1) {};} + { const myarr1 cl_i := {1}; + if(sizeof(cl_i) == 1) {};} + { template myrec1 t_i := {f1 := 1}; + if(sizeof(t_i) == 1) {};} + { template myrecof1 t_i := {1}; + if(sizeof(t_i) == 1) {};} + { template myset1 t_i := {f1 := 1}; + if(sizeof(t_i) == 1) {};} + { template mysetof1 t_i := {1}; + if(sizeof(t_i) == 1) {};} + { template myarr1 t_i := {1}; + if(sizeof(t_i) == 1) {};} + { template myrecof1 t_i := {*, 1} length(5); + if(sizeof(t_i) == 5) {};} + { template myrecof1 t_i := {*, 1} length(5 .. 5); + if(sizeof(t_i) == 5) {};} + + // inline templates + { if (sizeof(myrec1:{1}) == 1 ) {};} + { if (sizeof(myrec6:{1, omit}) == 1 ) {};} + { if (sizeof(myrecof1:{1, 2, 3}) == 3 ) {};} + { if (sizeof(myset1:{f1 := 1}) == 1) {};} + { if (sizeof(myset6:{f1 := 1, f2 := omit}) == 1 ) {};} + { if (sizeof(mysetof1:{1, 2, 3}) == 3 ) {};} + + // inline modified templates + { template myrec1 t_i := {f1 := 1}; + if(sizeof(modifies t_i := {2}) == 1) {};} + { template myrecof1 t_i := {1, 2, 3}; + if(sizeof(modifies t_i := {2, 3, 4, 5}) == 4) {};} + { template myset1 t_i := {f1 := 1}; // set templ + if(sizeof(modifies t_i := {f1 := 2}) == 1) {};} + { template mysetof1 t_i := {1, 2, 3}; + if(sizeof(modifies t_i := {2, 3, 4, 5}) == 4) {};} + + + { const myrecof1 cl_i := {[0] := 1}; + if(sizeof(cl_i) == 1) {};} + { const mysetof1 cl_i := {[0] := 1}; + if(sizeof(cl_i) == 1) {};} + { const integer cl_i[2] := {[0] := 1, [1] := 2}; + const integer cl_i2 := sizeof(cl_i);} + + { var myuni3 vl_myuni3:= {f1 := {}}; + if (sizeof(vl_myuni3.f1) == 42) {};} + + { template myrecof1 t_i := {*, 1}; + if(sizeof(t_i) == 1) {};} + { template myrecof1 t_i := {*, 1} length(1 .. 5); + if(sizeof(t_i) == 1) {};} + { template myrecof1 t_i := {*, 1} length(1 .. infinity); + if(sizeof(t_i) == 1) {};} + { timer TL_i[1] := 5.0; + const integer cl_i2 := sizeof(TL_i);} + { var integer vl_i := sizeof(ec_ext_integer);} + { var integer vl_i := sizeof(tsppar_integer);} + { var integer vl_i := sizeof(pl_par1);} + { var integer vl_i := sizeof(pl_par2);} + { var integer vl_i := sizeof(f_sizeofHelper());} + { template integer t_i := sizeof(f_sizeofHelper2());} + + { const integer cl_i := sizeof(f_sizeofHelper());} + { const integer cl_i := sizeof(ec_ext_integer);} + { const integer cl_i := sizeof(tsppar_integer);} + { const integer cl_i := sizeof(pl_par1);} + { const integer cl_i := sizeof(pl_par2);} + { const integer cl_i := sizeof(componentName_CT);} + { template integer t_i := sizeof(componentName_CT);} + { const integer cl_i := sizeof(f_sizeofHelper2());} + { timer TL_i := 5.0; + const integer cl_i2 := sizeof(TL_i);} + { timer TL_i[1] := {5.0}; + const integer cl_i2 := sizeof(TL_i[0]);} + { timer TL_i[1][1] := {{5.0}}; + const integer cl_i2 := sizeof(TL_i);} + { template integer t_i := ?; + const integer cl_i2 := sizeof(t_i);} + { template mysetof1 t_i := *; + if(sizeof(t_i) == 1) {};} +} + +type component empty { } +testcase tc_testcasenameTests() runs on empty { + {const charstring cl_i := testcasename()} + {var charstring vl_i := substr(testcasename(), 0, 1)} +} + +function f_testcasenameTests() { + {const charstring cl_i := testcasename()} + {var charstring vl_i := substr(testcasename(), 0, 1)} +} + +function f_regexpOperationTests() +{ + {const charstring cl_i := regexp("akarmi","akarmi", 0);} + {var charstring vl_i := regexp(cg_charstring,"akarmi", 0);} + {var universal charstring vl_i := regexp("akarmi","akarmi", 0);} + {var universal charstring vl_i := regexp(cg_universalchar,"akarmi", 0);} + + {var charstring vl_i := regexp( omit ,omit, omit );} + {var charstring vl_i := regexp( true ,true, true);} + {var charstring vl_i := regexp( false , false, false);} + {var charstring vl_i := regexp( 5 , 5, 5);} + {var charstring vl_i := regexp( '00'B , '00'B, '00'B);} + {var charstring vl_i := regexp( '00'H , '00'H, '00'H);} + {var charstring vl_i := regexp( '00'O , '00'O, '00'O);} + {var charstring vl_i := regexp( char(0,0,0,0) , char(0,0,0,0), char(0,0,0,0));} + {var charstring vl_i := regexp( pass , pass, pass);} + {var charstring vl_i := regexp( xx1 ,"akarm", 0);} + {var charstring vl_i := regexp( null , null, null);} + {var charstring vl_i := regexp( cg_boolean , cg_boolean, cg_boolean);} + {var charstring vl_i := regexp( cg_integer , cg_integer, cg_integer);} + {var charstring vl_i := regexp( cg_float , cg_float, cg_float);} + {var charstring vl_i := regexp( cg_bitstring , cg_bitstring, cg_bitstring);} + {var charstring vl_i := regexp( cg_hexstring , cg_hexstring, cg_hexstring);} + {var charstring vl_i := regexp( cg_octetstring , cg_octetstring, cg_octetstring);} + {var charstring vl_i := regexp( cg_charstring, cg_charstring, cg_charstring);} + {var charstring vl_i := regexp( cg_universalchar , cg_universalchar, cg_universalchar);} + //TODO add regexp specific tests once they are implemented +} + +function f_valueofTests(){ + //FIXME implement + + var template myCharstringRecof vt_akarmi := {"elso", "masodik"}; + const charstring cl_ize := valueof(vt_akarmi[0]); +} + +function f_matchTests(){ + { const boolean cl_i := match(5, 5);} + + { const boolean cl_i := match(nonExi, 5);} + { const boolean cl_i := match(5, nonExi);} + { const boolean cl_i := match(nonExi, nonExi);} +} + +function f_mtcTests(){ + const componentName_CT cl_comp := mtc; +} + +testcase tc_mtcTests() +runs on componentName_CT +system componentName_CT +{ +const componentName_CT2 cl_comp := mtc; +} + +function f_systemTests(){ + const componentName_CT cl_comp := system; +} + +testcase tc_systemTests() +runs on componentName_CT +system componentName_CT +{ +const componentName_CT2 cl_comp := system; +} + +function f_selfTests(){ + const componentName_CT cl_comp := self; +} + +testcase tc_selfTests() +runs on componentName_CT +system componentName_CT +{ +var componentName_CT2 vl_comp := self; +} + +function f_componentRunningTests() { + var componentName_CT vl_comp := componentName_CT.create; + const componentName_CT cl_comp2 := mtc; + const componentName_CT cl_comp3 := system; + const componentName_CT cl_comp4 := null; + + {var boolean vl_i := vl_comp.running;} + + {var boolean vl_i := nonExi.running;} + {var boolean vl_i := cg_integer.running;} + {var boolean vl_i := cl_comp2.running;} + {var boolean vl_i := cl_comp3.running;} + {var boolean vl_i := cl_comp4.running;} +} + +function f_componentAliveTests() { + var componentName_CT vl_comp := componentName_CT.create; + const componentName_CT cl_comp2 := mtc; + const componentName_CT cl_comp3 := system; + const componentName_CT cl_comp4 := null; + + {var boolean vl_i := vl_comp.alive;} + + {var boolean vl_i := nonExi.alive;} + {var boolean vl_i := cg_integer.alive;} + {var boolean vl_i := cl_comp2.alive;} + {var boolean vl_i := cl_comp3.alive;} + {var boolean vl_i := cl_comp4.alive;} +} + +function f_anycomponentrunningTests(){ + { var boolean vl_i := any component . running; } + + { const boolean cl_i := any component . running; } +} + +function f_allcomponentrunningTests(){ + { var boolean vl_i := all component . running; } + + { const boolean cl_i := all component . running; } +} + +function f_anycomponentaliveTests(){ + { var boolean vl_i := any component . alive; } + + { const boolean cl_i := any component . alive; } +} + +function f_allcomponentaliveTests(){ + { var boolean vl_i := all component . alive; } + + { const boolean cl_i := all component . alive; } +} + +function f_anytimerrunningTests(){ + { var boolean vl_i := any timer . running; } + + { const boolean cl_i := any timer . running; } +} + +function f_referredcomponentrunningTests(){ + //FIXME implement +} + +function f_referredcomponentaliveTests(){ + //FIXME implement +} + +function f_referredtimerreadTests(){ + //FIXME implement +} + +function f_componentcreateTests(){ + var componentName_CT vl_comp1 := componentName_CT.create; + var componentName_CT vl_comp2 := componentName_CT.create("name", "location"); + + const componentName_CT cl_compbad1 := componentName_CT.create; + const componentName_CT cl_compbad2 := componentName_CT.create("name", "location"); + const componentName_CT cl_compbad3 := componentName_CT.create(5, 6); + var componentName_CT vl_compbad4 := nonExi.create; + var componentName_CT vl_compbad5 := cg_boolean.create; + var componentName_CT vl_compbad6 := componentName_CT.nonExi.create; + var componentName_CT vl_compbad7 := myrecof1.create; + var componentName_CT2 vl_compbad8 := componentName_CT.create; +} + +function f_activateTests() runs on componentName_CT2{ + var integer vl_parameter := 1; + var default vl_defaultgood1 := activate(as_altstepName(vl_parameter)); + + var default vl_defaultbad1 := activate(nonExi()); + var default vl_defaultbad2 := activate(vl_parameter()); + var default vl_defaultbad3 := activate(as_altstepName()); + var default vl_defaultbad4 := activate(as_altstepName(1)); + var default vl_defaultbad5 := activate(as_altstepName(1, 1)); +} + +function f_activateTests2() { + var integer vl_parameter := 1; + var default vl_defaultgood1 := activate(as_altstepName(vl_parameter)); + + + var default vl_defaultbad3 := activate(as_altstepName(1)); +} + +function f_activate_referredTests(){ + var integer vl_parameter := 1; + var t_altstep2 vl_altstep1; + var default vl_defaultgood1 := activate(derefers(vl_altstep1)(vl_parameter)); + + var default vl_defaultbad1 := activate(derefers(nonExi)(vl_parameter)); + var default vl_defaultbad2 := activate(derefers(vl_parameter)(vl_parameter)); + var default vl_defaultbad3 := activate(derefers(vl_altstep1)()); + var default vl_defaultbad4 := activate(derefers(vl_altstep1)(1)); + var default vl_defaultbad5 := activate(derefers(vl_altstep1)(1, 1)); +} + +function f_executeTests(){ + var verdicttype vl_verdict := execute(tc_c_testcase(), 5.0); + + const verdicttype cl_verdict2 := execute(tc_c_testcase(), 5); + vl_verdict := execute(tc_c_testcase(), -5.0); + vl_verdict := execute(f_functionName(), 5.0); + vl_verdict := execute(tc_c_testcase(1), 5.0); + vl_verdict := execute(tc_c_testcase(), infinity); + vl_verdict := execute(tc_c_testcase(), -infinity); +} + +function f_execute_referredTests(){ + var t_testcase vl_test; + var t_function vl_test2; + var verdicttype vl_verdict := execute(derefers(vl_test)(), 5.0); + + vl_verdict := execute(derefers(vl_test)(), 5); + vl_verdict := execute(derefers(vl_test)(), -5.0); + vl_verdict := execute(derefers(vl_test2)(), 5.0); + const verdicttype cl_verdict2 := execute(derefers(vl_test)(1), 5.0); + vl_verdict := execute(derefers(vl_test)(), infinity); + vl_verdict := execute(derefers(vl_test)(), -infinity); +} + +function f_timerrunningTests(timer pl_par_temp){ + timer TL_temp := 5.0; + timer TL_temp2[1..3] := {5.0, 5.0}; + { const boolean cl_i := TL_temp.running;} + { const boolean cl_i := pl_par_temp.running;} + { const boolean cl_i := TL_temp2[1].running;} + + { const boolean cl_i := tem[0].running;} + { const boolean cl_i := TL_temp[0].running;} + { const boolean cl_i := TL_temp2.running;} + { const boolean cl_i := TL_temp2[2][1].running;} + { const boolean cl_i := TL_temp2[0].running;} + { const boolean cl_i := TL_temp2[5].running;} + { const boolean cl_i := pl_par_temp[0].running;} + { const boolean cl_i := pl_par_temp[0].running;} +} + +function f_timerreadTests(timer pl_par_temp){ + timer TL_temp := 5.0; + timer TL_temp2[1..3] := {5.0, 5.0}; + { const float cl_i := TL_temp.read;} + { const float cl_i := pl_par_temp.read;} + { const float cl_i := TL_temp2[1].read;} + + { timer TL_i := "akarmi";} + { timer TL_i := -5.0;} + { const float cl_i := nonExi[0].read;} + { const float cl_i := TL_temp[0].read;} + { const float cl_i := TL_temp2.read;} + { const float cl_i := TL_temp2[2][1].read;} + { const float cl_i := TL_temp2[0].read;} + { const float cl_i := TL_temp2[5].read;} + { const float cl_i := pl_par_temp[0].read}; +} + +type float encdec_MyFloat with { encode "BER:2002" variant "length accept short" }; +type integer encdec_MyInt with { encode "TEXT" }; +type bitstring encdec_MyBitstring with { encode "RAW" }; + +const bitstring cg_decvalue_i := ''B; +template bitstring t_decvalue_ti := ''B; +const integer cg_decvalue_i2 := decvalue(cg_decvalue_i, decvalue_i2); +const integer cg_decvalue_ti2 := decvalue(t_decvalue_ti, decvalue_ti2); + +function f_encvalueTests(bitstring pl_val, in bitstring pl_in + , out bitstring pl_out, inout bitstring pl_inout) +{ + { // checking the parameters + const encdec_MyInt cl_encdecConst := 42; + var integer vl_1 := decvalue(pl_val, cl_encdecConst); + var integer vl_2 := decvalue(pl_in, cl_encdecConst); + var integer vl_3 := decvalue(pl_out, cl_encdecConst); + var integer vl_4 := decvalue(pl_inout, cl_encdecConst); + } + + const encdec_MyFloat cl_encdecConst1 := 23E-25; + const encdec_MyInt cl_encdecConst2 := 2345; + const encdec_MyBitstring cl_encdecConst3 := '01010101'B; + template encdec_MyBitstring t_encdecTemp1 := '01010101'B; + template encdec_MyBitstring t_encdecTemp2 := *; + var encdec_MyFloat vl_encdecres1; + var encdec_MyInt vl_encdecres2; + var encdec_MyBitstring vl_encdecres3; + + {const bitstring cl_encdecvar_bs1 := encvalue(cl_encdecConst1); + const integer cl_j := decvalue(cl_encdecvar_bs1, vl_encdecres1); + } + {const bitstring cl_encdecvar_bs2 := encvalue(cl_encdecConst2); + var integer vl_i := decvalue(cl_encdecvar_bs2, vl_encdecres2); + } + {const bitstring cl_encdecvar_bs3 := encvalue(cl_encdecConst3); + var integer vl_i := decvalue(cl_encdecvar_bs3, vl_encdecres3); + } + {var integer vl_i := decvalue(t_encdecTemp1, t_encdecTemp1);} + + {const bitstring cl_encdecvar_bsbad1 := encvalue(nonExi);} + {const bitstring cl_encdecvar_bsbad2 := encvalue(null);} + {const bitstring cl_encdecvar_bsbad3 := encvalue(pass);} + {var integer vl_i := decvalue(f_encvalueTests, vl_encdecres3);} + {var integer vl_i := decvalue(cl_encdecConst1, vl_encdecres3);} + {var integer vl_i := decvalue(t_encdecTemp2, t_encdecTemp2);} + {var integer vl_i := decvalue(t_encdecTemp1, t_function);} + + var integer vl_i := decvalue(vl_i, encdecres1); + var componentName_CT vl_comp; + vl_i := decvalue(t_encdecvar3, vl_comp); +} + +type component staticValueExpected_CT +{ + var integer v_variable := rnd(); + var boolean v_variabl2 := getverdict; +} + +function f_getverdictTests() { + var verdittype vl_i := getverdict; +} + +function f_applyTests(){ + var t_function vl_functionVar; + var t_function2 vl_functionVar2; + var t_function3 vl_functionVar3; + var t_function4 vl_functionVar4; + var integer vl_variable; + + { var integer vl_i := functionVar2.apply(); } + { var integer vl_i := nonExi.apply(); } + { var integer vl_i := t_function.apply(); } + { var integer vl_i := variable.apply(); } + { var integer vl_i := vl_functionVar3.apply(); } + { const integer cl_i := vl_functionVar.apply(); } + { log(vl_functionVar2.apply()); } + { var integer vl_i := vl_functionVar4.apply(); } +} + +function f_applyTests2() runs on componentName_CT2 { + var t_function3 vl_functionVar3; + +{ var integer vl_i := vl_functionVar3.apply(); } + +} + +function f_enumTests() { + const TTCN3EnumeratedType cl_TTCN3Enum := item3; + const integer cl_ASNNamedInteger := c_ASNInteger2; + + if (2 == enum2int(cl_TTCN3Enum)) {} + if (2 == enum2int(c_ASNenum) ) {} + if (enum2int(cl_TTCN3Enum) == enum2int(c_ASNenum) ) {} + if (enum2int(c_ASNenum) == enum2int(cl_TTCN3Enum) ) {} + if (cl_TTCN3Enum == item3 ) {} + if (c_ASNenum == a ) {} + if (cl_TTCN3Enum != item1 ) {} + if (c_ASNenum != b ) {} + if (cl_TTCN3Enum > item1 ) {} + if (cl_TTCN3Enum >= item1 ) {} + if (cl_TTCN3Enum < item2 ) {} + if (cl_TTCN3Enum <= item2 ) {} + if (cl_ASNNamedInteger == -100) {} + if (cl_ASNNamedInteger != 100) {} + if (cl_ASNNamedInteger < 100) {} + if (cl_ASNNamedInteger <= 100) {} + if (cl_ASNNamedInteger > -200) {} + if (cl_ASNNamedInteger >= -200) {} + + if (cl_TTCN3Enum == item1 ) {} + if (c_ASNenum == b ) {} + if (cl_TTCN3Enum < item1 ) {} + if (cl_TTCN3Enum <= item1 ) {} + if (cl_TTCN3Enum > item2 ) {} + if (cl_TTCN3Enum >= item2 ) {} + const integer cl_i := enum2int(cl_TTCN3Enum) + enum2int(c_ASNenum); + if (cl_i == 4) {} + if (cl_ASNNamedInteger == 100) {} + if (cl_ASNNamedInteger != -100) {} + if (cl_ASNNamedInteger > 100) {} + if (cl_ASNNamedInteger >= 100) {} + if (cl_ASNNamedInteger < -200) {} + if (cl_ASNNamedInteger <= -200) {} +} + +testcase tc_FloatComparison() runs on empty { + var float minus_zero := -0.0; + var float plus_zero := 0.0; + + //---------------- + + if (minus_zero == -0.0) { } else { } + if (minus_zero <= 0.0) { } else { } + if (minus_zero < 0.0) { } else { } + if (minus_zero <= plus_zero) { } else { } + if (minus_zero < plus_zero) { } else { } + if (plus_zero >= minus_zero) { } else { } + if (plus_zero > minus_zero) { } else { } + + if (-infinity < minus_zero ) { } else { } + if (-infinity <= minus_zero ) { } else { } + if (minus_zero < infinity) { } else { } + if (minus_zero <= infinity) { } else { } + if (minus_zero < not_a_number) { } else { } + if (minus_zero <= not_a_number) { } else { } + if (not_a_number > minus_zero) { } else { } + if (not_a_number >= minus_zero) { } else { } + + //---------------- + + var float plus_inf := infinity; + if (plus_inf == infinity) { } else { } + if (-infinity < plus_inf ) { } else { } + if (-infinity <= plus_inf ) { } else { } + if (plus_inf < not_a_number) { } else { } + if (plus_inf <= not_a_number) { } else { } + + //---------------- + + var float minus_inf := -infinity; + if (minus_inf == -infinity) { } else { } + if (minus_inf < not_a_number) { } else { } + if (minus_inf <= not_a_number) { } else { } + + //---------------- + + var float NaN := not_a_number; + if (NaN == not_a_number) { } else { } +} + +testcase tc_constFloatComparison() runs on empty { + const float minus_zero := -0.0; + const float plus_zero := 0.0; + + //---------------- + + if (minus_zero == -0.0) { } else { } + if (minus_zero <= 0.0) { } else { } + if (minus_zero < 0.0) { } else { } + if (minus_zero <= plus_zero) { } else { } + if (minus_zero < plus_zero) { } else { } + if (plus_zero >= minus_zero) { } else { } + if (plus_zero > minus_zero) { } else { } + + if (-infinity < minus_zero ) { } else { } + if (-infinity <= minus_zero ) { } else { } + if (minus_zero < infinity) { } else { } + if (minus_zero <= infinity) { } else { } + if (minus_zero < not_a_number) { } else { } + if (minus_zero <= not_a_number) { } else { } + if (not_a_number > minus_zero) { } else { } + if (not_a_number >= minus_zero) { } else { } + + //---------------- + + const float plus_inf := infinity; + if (plus_inf == infinity) { } else { } + if (-infinity < plus_inf ) { } else { } + if (-infinity <= plus_inf ) { } else { } + if (plus_inf < not_a_number) { } else { } + if (plus_inf <= not_a_number) { } else { } + + //---------------- + + const float minus_inf := -infinity; + if (minus_inf == -infinity) { } else { } + if (minus_inf < not_a_number) { } else { } + if (minus_inf <= not_a_number) { } else { } + + //---------------- + + const float NaN := not_a_number; + if (NaN == not_a_number) { } else { } +} + +control { + var verdicttype vl_i := getverdict; +} + +} with { extension "anytype myrec1, myrec2" } diff --git a/Semantic_Analizer_Tests/src/Basic_tests/namingConvention.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/namingConvention.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..eeb7b3591ef18af0d0b79829cb4156d8e52e1e69 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/namingConvention.ttcn @@ -0,0 +1,81 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module namingConvention +{ +type component empty_CT {} + +const integer cg_good := 0; +const integer cbad := 0; +external const integer ec_good; +external const integer e_bad; + +modulepar integer tsp_good := 0; +modulepar integer bad_modulepar := 0; + +type port goodtestport_PT message { in integer; } + +template integer t_good := 5; +template integer bad_template := 5; + +type integer good_type; + +type component good_CT +{ + const integer c_good := 0; + const integer bad_const := 0; + var integer v_good; + var integer bad_var; + timer T_good; + timer bad_timer; + port goodtestport_PT p_good_PT; + port goodtestport_PT pbad; +}; + + +group G_good {} +group g_bad {} + +function f_good(){} +function fbad(){} +external function ef_good() +external function ebad() + +function f_parameters(in integer pl_good, in integer badParameter){} + +altstep as_good() runs on empty_CT +{ + [else] { } +} + +altstep altstep_bad() runs on empty_CT +{ + [else] { } +} + + +testcase tc_good() runs on empty_CT system empty_CT {} +testcase bad_testcase() runs on empty_CT system empty_CT {} + +control { + const integer cl_good := 0; + const integer c_bad := 0; + var integer vl_good; + var integer v_bad; + template integer t_localgood := 0; + template integer bad_localtemplate := 0; + var template integer vt_good; + var template integer bad_vartemplate; + timer TL_good := 5.0; + timer T_bad := 5.0; +} +} // end of module diff --git a/Semantic_Analizer_Tests/src/Basic_tests/negativeTesting.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/negativeTesting.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b0ba7d89f1db0f9f94b34720c4890b0070a7ca57 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/negativeTesting.ttcn @@ -0,0 +1,92 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module negativeTesting +{ + group TEXT_grp { + type record MYREC + { + integer i, + boolean b, + MYREC r optional + } + type record of integer MYROFI; + type union MYU { + integer i, + boolean b, + MYREC r + } + } + with { encode "TEXT" variant "" } + type record MYREC2 { integer i } + + const MYREC cg_myrec1 := {i:=1} + with { + erroneous "value := 2" + erroneous (x) "value := 2" + erroneous (i, r.i, r.r.i) "value := 2" + } + const MYREC cg_myrec2 := {i:=1} with { erroneous (b) "after := omit" } + const MYREC cg_myrec3 := {i:=1} with { erroneous (b) "before := omit" } + const MYREC cg_myrec4 := {i:=1} with { erroneous (b) "value := omit all" } + const MYREC cg_myrec5 := {i:=1} with { erroneous (b) "value := 123 all" } + const MYREC cg_myrec6 := {i:=1} with { erroneous (b) "value := {1,2,3}" } + const MYREC cg_myrec7 := {i:=1} with { erroneous (b) "value := nonexi" } + const MYREC cg_myrec8 := {i:=1} with { erroneous (b) "value(raw) := 123" } + const MYREC cg_myrec9 := {i:=1} with { erroneous (b) "value := MYROFI:'A'H" } + const MYREC cg_myrec10 := {i:=1} with { erroneous (b) "value := MYROFI:{1,2,*}" } + + const MYREC cg_myrec11 := {i:=1} with { + + erroneous (b) "after := omit all" + erroneous (r) "value := 0" + } + const MYREC cg_myrec12 := {i:=1} with { + erroneous (r) "before := omit all" + erroneous (b) "value := 0" + } + const MYU cg_myu13 := {i:=1} with { erroneous (b) "after := omit all" erroneous (r) "value:=12" } + const MYU cg_myu14 := {i:=1} with { erroneous (b) "value := omit" } + const MYREC cg_myrec15 := {i:=1} with { + erroneous (r) "after := omit all" + erroneous (i) "before := omit all" + } + const MYREC cg_myrec16 := {i:=1} with { + erroneous (b,b) "value := 1" + erroneous (b,b) "after := 1" + erroneous (b,b) "before := 1" + } + const MYREC cg_myrec17 := {i:=1} with { + erroneous (r.b) "value := 1" + erroneous (r) "value := 1" + } + const MYREC cg_myrec18 := {i:=1} with { + erroneous (b) "before := omit all" + erroneous (r) "before := omit all" + } + const MYREC cg_myrec19 := {i:=1} with { + erroneous (b) "value := 1" + erroneous (r) "before := omit all" + } + const MYREC cg_myrec20 := {i:=1} with { + erroneous (b) "after := omit all" + erroneous (i) "after := omit all" + } + const MYREC cg_myrec21 := {i:=1} with { + erroneous (r) "value := 1" + erroneous (b) "after := omit all" + } + const MYREC cg_myrec22 := {i:=1} with { + erroneous (r) "value := omit" + erroneous (r.i) "value := 1" + } + const MYREC cg_myrec23 := {i:=1} with { erroneous (b) "value(raw) := ""proba""" } + const MYREC cg_myrec24 := {i:=1} with { erroneous (b) "value(raw) := universal charstring:""proba""" } + + function f_fv() {} with{erroneous ""} +control {} with{erroneous ""} +} with{erroneous ""} diff --git a/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/Five.ttcnin b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/Five.ttcnin new file mode 100644 index 0000000000000000000000000000000000000000..8d7707df0cd73bd4297a245e983b292b13cf351b --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/Five.ttcnin @@ -0,0 +1,8 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +5 \ No newline at end of file diff --git a/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_import_macro_test.ttcnpp b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_import_macro_test.ttcnpp new file mode 100644 index 0000000000000000000000000000000000000000..590a303b87109992c05e47c97721a019444ec32f --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_import_macro_test.ttcnpp @@ -0,0 +1,28 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module ttcnpp_import_macro_test +{ + +type component My_CT {} + +testcase tc_import() runs on My_CT { + var charstring vl_ch := int2char( +#include "Five.ttcnin" + ); + var integer vl_i := + #include "Five.ttcnin" + var octetstring vl_os := int2oct( + #include "Five.ttcnin" + ,2); + log(vl_ch, vl_os, vl_i); +} + +control{ + execute(tc_import()); +} +} // end of module diff --git a/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_imported_B.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_imported_B.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e866244d97d2b17630c4e1f0e8056052612b2f21 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_imported_B.ttcn @@ -0,0 +1,12 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module ttcnpp_test_imported_B +{ +const integer cg_B_i:= 1; + +} // end of module diff --git a/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_marker_test_with_syntax_errors.ttcnpp b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_marker_test_with_syntax_errors.ttcnpp new file mode 100644 index 0000000000000000000000000000000000000000..7568b60199dbe5ce9ec30e873fa5ac1fb0af649b --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_marker_test_with_syntax_errors.ttcnpp @@ -0,0 +1,689 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module ttcnpp_marker_test_with_syntax_errors { +//This file is generally excluded from build +type component My_CT1 {} + +//TODO: 15 level nested #include +//TODO: 4095 macro +//TODO: nesting flevel of #if is 63 +//TODO: Levels of parenthesized expressions within a full expression:63 +//TODO: Number of parameters in a macro definition and arguments in a macro call:127 +//TODO: Number of characters on a logical source line:4096 +//TODO: macros defined in Makefile by -D +#warning this \ +test is ready \ +-already + +#error this\ + is a wrong line \ + what will be signed by a\ + marker + +#line 1 "blabla" +#pragma anything + +testcase tc_macro1() runs on My_CT1 { + +#define ZERO 0 +#define ONE 1 +#define TWO 2 +#define THREE 3 + +#if 0 + xxx //error marker not expected +#endif + + +#ifndef ZERO +error_marker_not_expected //this is not inserted +error_marker_not_expected //this is not inserted +#endif + +#ifndef ZERO +error_marker_not_expected //this is not inserted +error_marker_not_expected //this is not inserted +#else +error_marker_expected +#endif + +//not too big: +#if 21474836488 + error_marker_expected +#endif + +//too big number: +#if 214748364888888888888 + error_marker_not_expected +#endif + +#if 1 +xxx; //error expected, pass +#else +xxx; //commented out +#endif +//verdict:pass + +#if 100 +x1; //error expected, pass +#elif -2 +x2 +#else //commented out +xxx +#endif +//verdict:pass + +#if 0 +x1; //commented out, error not expected +#elif -2 +x2; //error expected +#else //commented out +xxx //commented out, error not expected +#endif +//verdict:pass + + +#if 0 +x1; //error expected, fail +#elif 0 +x2; +#else //commented out +xxx; //error expected, pass +#endif +//verdict:pass + +#if ((ONE+ONE)*THREE==6) +xxxx; //error expected, fail +#else +xxx; //commented out +#endif +//verdict:fail + +#if(THREE-TWO==ONE) +xxxy //error expected +#endif +//verict: fail + +#if(THREE>TWO) +xxxz //error expected +#endif + +}//tc_macro1 + +#line 6 "First marker" +#define A_IMPORTED +#if defined A_IMPORTED +import from ttcnpp_test_imported_A all; +#endif +#line 24 "Second Marker" +#define B_IMPORTED +#if defined B_IMPORTED +import from ttcnpp_test_imported_B all; +#endif + +//================================================================== +// From this point the code is mapping of ttcnpp_test_main.ttcnpp +// Just the evaluation is not at runtime but at preprocessing time +//================================================================== + +type component My_CT {} + +//========================================================================= +// Functions +//========================================================================= +function f_include_test() runs on My_CT { + var integer vl_i:=1; + #include "ttcnpp_test_incl1.ttcnin" + log(vl_i); + if(vl_i==124){setverdict(pass);} else {setverdict(fail)} + + #if defined VL_I + error_expected + #else + error_notexpected + #endif +} +//========================================================================= +// Testcases for #if, #ifdef, #ifndef #define, #undefine +//========================================================================= +testcase tc_if_and_macro_expr() runs on My_CT { + #define ZERO 0 + #define ONE 1 + #define TWO 2 + #define THREE 3 + #define FOUR 4 + + // #if false constructs + #if 0 + error_marker_not_expected + #endif + //verdict:pass (because its background is grey ) + + #if 0 + error_marker_not_expected + #else + error_marker_expected + #endif + + #if 0 + error_marker_not_expected + #elif -3 + error_marker_expected + #else //commented out + error_marker_not_expected + #endif + //verdict:pass + + #if 0 + error_marker_not_expected + #elif 0 + error_marker_not_expected + #elif ZERO + error_marker_not_expected + #else + error_marker_expected + #endif + //verdict:pass + + //#if true constructs + #if 1 + error_marker_expected + #endif + + #if 2147483647 + error_marker_expected + #endif + + #if -2147483647 + error_marker_expected + #endif + + #if -1 + error_marker_expected + #endif + + //verdict:pass + #if 1 + error_marker_expected + #else + error_marker_not_expected + #endif + //verdict:pass + + #if 100 + error_marker_expected + #elif -2 + error_marker_not_expected + #else //commented out + error_marker_not_expected + #endif + //verdict:pass + + #if 100 + error_marker_expected + #elif 0 + error_marker_not_expected + #else //commented out + error_marker_not_expected + #endif + //verdict:pass + + #if ((ONE+ONE)*THREE==6) + error_marker_expected + #endif + //verdict:pass + + #if ((ONE+ONE)*THREE==6) + error_marker_expected + #else + error_marker_not_expected + #endif + //verdict:pass + + #if (ONE+TWO*THREE==7) + error_marker_expected + #else + error_marker_not_expected + #endif + //verdict:pass + + #if(THREE-TWO==ONE) + error_marker_expected + #else + error_marker_not_expected + #endif + //verict: fail + + #if(THREE>TWO) + error_marker_expected + #endif + +}//tc_if + +testcase tc_define_ifdef() runs on My_CT { + //************** define and ifdef************************************/ + error_marker_expected//wrong highlighting, if */ removed from the prev line + + #define MYMACRO1 + + #ifdef MYMACRO1 + error_marker_expected + #endif + + #ifdef MYMACRO1 + error_marker_expected + #else + error_marker_not_expected + #endif + + #ifdef MYMACRO1 + error_marker_expected + #elif 12 + error_marker_not_expected + #else + error_marker_not_expected + #endif + + #ifdef MYMACRO1 + error_marker_expected + #define MYMACRO2 + #ifdef MYMACRO2 + error_marker_expected + #else + error_marker_not_expected + #endif + error_marker_expected + #else + setverdict(false); + #endif + + #ifdef MYMACRO + error_marker_expected + #endif + + #undef MYMACRO1 + #ifdef MYMACRO1 + error_marker_not_expected + #endif + + #ifdef MYMACRO1 + error_marker_not_expected + #else + error_marker_expected + #endif + + #ifdef MYMACRO1 + error_marker_not_expected + #elif 12 + error_marker_expected + #else + error_marker_not_expected + #endif + + + #undef MYMACRO1 + #undef MYMACRO2 +} + +testcase tc_define_ifndef() runs on My_CT { + + #define MYMACRO1 + #ifndef MYMACRO1 + error_marker_not_expected + #endif + + #ifndef MYMACRO1 + error_marker_not_expected + #else + error_marker_expected + #endif + + #ifndef MYMACRO1 + error_marker_not_expected + #elif 12 + error_marker_expected + #else + error_marker_not_expected + #endif + + #ifndef MYMACRO1 + error_marker_not_expected + #define MYMACRO2 + #ifdef MYMACRO2 + error_marker_not_expected + #else + error_marker_not_expected + #endif + error_marker_expected + #else + error_marker_expected + #define MYMACRO2 + #ifndef MYMACRO2 + error_marker_not_expected + #else + error_marker_expected + #endif + #endif +} + + + +testcase tc_undef_ifndef() runs on My_CT { + #undef MYMACRO1 + + #ifndef MYMACRO1 + error_marker_expected + #endif + + #ifndef MYMACRO1 + error_marker_expected + #else + error_marker_not_expected + #endif + + #ifndef MYMACRO1 + error_marker_expected + #elif 12 + error_marker_not_expected + #else + error_marker_not_expected + #endif + +} + +testcase tc_undef_ifdef() runs on My_CT { + #undef MYMACRO1 + + #ifdef MYMACRO1 + error_marker_not_expected + #endif + + #ifdef MYMACRO1 + error_marker_not_expected + #else + error_marker_expected + #endif + + #ifdef MYMACRO1 + error_marker_not_expected + #elif 12 + error_marker_expected + #else + error_marker_not_expected + #endif + +} + +testcase tc_embedded_ifs() runs on My_CT { + #if 1 && -1 + error_marker_expected + #if 0 + setvedict(fail) + #else + error_marker_expected + #endif + #else + error_marker_not_expected + #if 0 + setvedict(fail) + #else + error_marker_not_expected + #endif + #endif + + #if 0 + error_marker_not_expected + #if 0 + setvedict(fail) + #else + error_marker_not_expected + #endif + #else + error_marker_expected + #if 0 + setvedict(fail) + #else + error_marker_expected + #endif + #endif +} + +testcase tc_cascade() runs on My_CT { + #define TWENTY 20 + #define TWENTY2 TWENTY + #define TWENTY3 TWENTY2 + #define TWENTY4 TWENTY3 + #define TWENTY5 TWENTY4 + + #if TWENTY2 == 20 + error_marker_expected + #else + error_marker_not_expected + #endif + + #if TWENTY5 == 20 + error_marker_expected + #else + error_marker_not_expected + #endif + + #if TWENTY5 != 20 + error_marker_not_expected + #else + error_marker_expected + #endif + +} + +testcase tc_three_operands() runs on My_CT { + #define AAA 1 + #if AAA ? 0 : 1 + error_marker_not_expected + #else + error_marker_expected + #endif + + #define AAA 1 + #if AAA ? 1 : 0 + error_marker_expected + #else + error_marker_not_expected + #endif + + #define AAA 0 + #if AAA ? 1 : 0 + error_marker_not_expected + #else + error_marker_expected + #endif + + #define AAA 0 + #if AAA ? 0 : 1 + error_marker_expected + #else + error_marker_not_expected + #endif +} +//========================================================================= +// Testcases for #defined - import +//========================================================================= +testcase tc_A() runs on My_CT { + #if defined A_IMPORTED + var integer vl_i:=cg_A_i; + log(vl_i); + error_marker_expected + #else + error_marker_not_expected + #endif +} + +testcase tc_B() runs on My_CT { + #if defined B_IMPORTED + var integer vl_i:=cg_B_i; + log(vl_i); + error_marker_expected + #else + error_marker_not_expected + #endif +} + +#if defined A_IMPORTED +#if defined B_IMPORTED +#define A_AND_B_DEFINED +#endif +#endif + +testcase tc_AandB() runs on My_CT { + #if defined A_AND_B_DEFINED + var integer vl_i:=cg_A_i+cg_B_i; + error_marker_expected + #else + error_marker_not_expected + #endif + log(vl_i); +} + +#undef A_IMPORTED +testcase tc_if_defined() runs on My_CT { + #if defined A_IMPORTED + var integer vl_i:=c_A_i; + log(vl_i); + error_marker_not_expected + #else + error_marker_expected + #endif +} + +#undef A_IMPORTED +//this line inserts: #define A_IMPORTED +#include "ttcnpp_test_incl2.ttcnin" +testcase tc_include_ttcnin() runs on My_CT { + #if defined A_IMPORTED + var integer vl_i:=cg_A_i; + log(vl_i); + error_marker_expected + #else + error_marker_not_expected + #endif +} + +testcase tc_bitoperands() runs on My_CT{ + #define A 0xFF + #define B 0x00 + + #if (A & B == B) + error_marker_expected + #else + error_marker_not_expected + #endif + + #if ((A & B) == A) + error_marker_not_expected + #else + error_marker_expected + #endif + + #if (A|B == B) + error_marker_expected + #else + error_marker_not_expected + #endif + + #if (A|B == A) + error_marker_expected + #else + error_marker_not_expected + #endif + + #define A 0x03 + #define B 0x04 + + //0000 0011 && 0000 0100 + #if ((A & B) == B) + error_marker_not_expected + #else + error_marker_expected + #endif + + #if ((A | B) == A) + error_marker_not_expected + #else + error_marker_expected + #endif + +} + +testcase tc_wrap() runs on My_CT{ + +#define FO\ +O 10\ +20 +#if FOO == 1020 +error_marker_expected +#else +error_marker_not_expected +#endif +} + +//none of these macros is defined +#undef GENAPP_COMPILE_SIP +testcase tc_defined_or_defined1() runs on My_CT{ +setverdict(pass) +#if defined GENAPP_COMPILE_MWIAS +#define GENAPP_COMPILE_SIP //MWIAS=SIP +error_marker_not_expected +} +#endif //#if defined GENAPP_COMPILE_MWIAS + +#if defined GENAPP_COMPILE_ALL || defined GENAPP_COMPILE_SIP || defined GENAPP_COMPILE_COMBINED_SIP +error_marker_not_expected +#endif //#if defined GENAPP_COMPILE_ALL || defined GENAPP_COMPILE_SIP || defined GENAPP_COMPILE_COMBINED_SIP +} + +//none of these macros is defined +#undef GENAPP_COMPILE_SIP +testcase tc_defined_or_defined2() runs on My_CT{ +setverdict(pass) +#if defined GENAPP_COMPILE_MWIAS +#define GENAPP_COMPILE_SIP //MWIAS=SIP +error_marker_not_expected +#endif + +#if defined GENAPP_COMPILE_ALL || defined GENAPP_COMPILE_SIP || defined GENAPP_COMPILE_COMBINED_SIP + setverdict(fail); + error_marker_not_expected +#else + setverdict(pass); + error_marker_expected +#endif +} + +//========================================================================= +// Control +//========================================================================= + +control{ + execute(tc_if_and_macro_expr()); + execute(tc_define_ifdef()); + execute(tc_define_ifndef()); + execute(tc_undef_ifndef()); + execute(tc_undef_ifdef()); + execute(tc_embedded_ifs()); + execute(tc_cascade()); + execute(tc_three_operands()); + execute(tc_A()); + execute(tc_B()); + execute(tc_AandB()); + execute(tc_if_defined()); + execute(tc_include_ttcnin()); + execute(tc_bitoperands()); + execute(tc_wrap()); + execute(tc_macro1()); +} + +} \ No newline at end of file diff --git a/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_test_imported_A.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_test_imported_A.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..164325952b2901abd341378ed9d1a1177eac8fc1 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_test_imported_A.ttcn @@ -0,0 +1,17 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module ttcnpp_test_imported_A +{ +const integer cg_A_i:= 1; + +} // end of module diff --git a/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_test_incl1.ttcnin b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_test_incl1.ttcnin new file mode 100644 index 0000000000000000000000000000000000000000..7f49eac421d3c2a82c04c5b1e47c161411cdd4db --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_test_incl1.ttcnin @@ -0,0 +1,9 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ + vl_i:=vl_i+123; +#define VL_I \ No newline at end of file diff --git a/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_test_incl2.ttcnin b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_test_incl2.ttcnin new file mode 100644 index 0000000000000000000000000000000000000000..63ea9121da79a4ed7a62be104de4170426a2c19f --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_test_incl2.ttcnin @@ -0,0 +1,8 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +#define A_IMPORTED \ No newline at end of file diff --git a/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_test_main.ttcnpp b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_test_main.ttcnpp new file mode 100644 index 0000000000000000000000000000000000000000..cfbe912dda42e6e2406e1568a87ea19d3d769cfe --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/preprocessor_test/ttcnpp_test_main.ttcnpp @@ -0,0 +1,544 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: ethbaat +//DATE: 2012-06-12 +//VERSION: +*/ +module ttcnpp_test_main +{ +#line 6 "First marker" +#define A_IMPORTED +#if defined A_IMPORTED +import from ttcnpp_test_imported_A all; +#endif +#line 24 "Second Marker" +#define B_IMPORTED +#if defined B_IMPORTED +import from ttcnpp_test_imported_B all; +#endif + +type component My_CT {} + +//========================================================================= +// Functions +//========================================================================= +function f_include_test() runs on My_CT { + var integer vl_i:=1; + #include "ttcnpp_test_incl1.ttcnin" + log(vl_i); + if(vl_i==124){ setverdict(pass)} else {setverdict(fail)} +} +//========================================================================= +// Testcases for #if, #ifdef, #ifndef #define, #undefine +//========================================================================= +testcase tc_if_and_macro_expr() runs on My_CT { + #define ZERO 0 + #define ONE 1 + #define TWO 2 + #define THREE 3 + #define FOUR 4 + + //var integer i:= ONE ; + // #if false constructs + #if 0 + setverdict(fail); + #endif + //verdict:pass (because its background is grey ) + + #if 0 + setverdict(fail); + #else + setverdict(pass); + #endif + + #if 0 + setverdict(fail); + #elif -3 + setverdict(pass); + #else //commented out + setverdict(fail); + #endif + //verdict:pass + + #if 0 + setverdict(fail); + #elif 0 + setverdict(fail); + #elif ZERO + setverdict(fail); + #else + setverdict(pass); + #endif + //verdict:pass + + //#if true constructs + #if 1 + setverdict(pass); + #endif + + #if 2147483647 + setverdict(pass); + #endif + + #if -2147483647 + setverdict(pass); + #endif + + #if -1 + setverdict(pass); + #endif + + //verdict:pass + #if 1 + setverdict(pass); + #else + setverdict(fail); + #endif + //verdict:pass + + #if 100 + setverdict(pass); + #elif -2 + setverdict(fail); + #else //commented out + setverdict(fail); + #endif + //verdict:pass + + #if 100 + setverdict(pass); + #elif 0 + setverdict(fail); + #else //commented out + setverdict(fail); + #endif + //verdict:pass + + #if ((ONE+ONE)*THREE==6) + setverdict(pass); + #endif + //verdict:pass + + #if ((ONE+ONE)*THREE==6) + setverdict(pass); + #else + setverdict(fail); + #endif + //verdict:pass + + #if (ONE+TWO*THREE==7) + setverdict(pass); + #else + setverdict(fail); + #endif + //verdict:pass + + #if(THREE-TWO==ONE) + setverdict(pass); + #else + setverdict(fail); + #endif + //verict: fail + + #if(THREE>TWO) + setverdict(pass); + #endif + +}//tc_if + +testcase tc_define_ifdef() runs on My_CT { + //************** define and ifdef************************************/ + setverdict(pass);//wrong highlighting, if */ removed from the prev line + + #define MYMACRO1 + + #ifdef MYMACRO1 + setverdict(pass); + #endif + + #ifdef MYMACRO1 + setverdict(pass); + #else + setverdict(fail); + #endif + + #ifdef MYMACRO1 + setverdict(pass); + #elif 12 + setverdict(fail); + #else + setverdict(fail); + #endif + + #ifdef MYMACRO1 + setverdict(pass); + #define MYMACRO2 + #ifdef MYMACRO2 + setverdict(pass); + #else + setverdict(fail) + #endif + setverdict(pass); + #else + setverdict(false); + #endif + + #ifdef MYMACRO + setverdict(pass); + #endif + + #undef MYMACRO1 + #ifdef MYMACRO1 + setverdict(fail); + #endif + + #ifdef MYMACRO1 + setverdict(fail); + #else + setverdict(pass); + #endif + + #ifdef MYMACRO1 + setverdict(fail); + #elif 12 + setverdict(pass); + #else + setverdict(fail); + #endif + + + #undef MYMACRO1 + #undef MYMACRO2 +} + +testcase tc_define_ifndef() runs on My_CT { + + #define MYMACRO1 + #ifndef MYMACRO1 + setverdict(fail); + #endif + + #ifndef MYMACRO1 + setverdict(fail); + #else + setverdict(pass); + #endif + + #ifndef MYMACRO1 + setverdict(fail); + #elif 12 + setverdict(pass); + #else + setverdict(fail); + #endif + + #ifndef MYMACRO1 + setverdict(fail); + #define MYMACRO2 + #ifdef MYMACRO2 + setverdict(fail); + #else + setverdict(fail) + #endif + setverdict(pass); + #else + setverdict(pass); + #define MYMACRO2 + #ifndef MYMACRO2 + setverdict(fail); + #else + setverdict(pass) + #endif + #endif +} + + + +testcase tc_undef_ifndef() runs on My_CT { + #undef MYMACRO1 + + #ifndef MYMACRO1 + setverdict(pass); + #endif + + #ifndef MYMACRO1 + setverdict(pass); + #else + setverdict(fail); + #endif + + #ifndef MYMACRO1 + setverdict(pass); + #elif 12 + setverdict(fail); + #else + setverdict(fail); + #endif + +} + +testcase tc_undef_ifdef() runs on My_CT { + #undef MYMACRO1 + + #ifdef MYMACRO1 + setverdict(fail); + #endif + + #ifdef MYMACRO1 + setverdict(fail); + #else + setverdict(pass); + #endif + + #ifdef MYMACRO1 + setverdict(fail); + #elif 12 + setverdict(pass); + #else + setverdict(fail); + #endif + +} + +testcase tc_embedded_ifs() runs on My_CT { + #if 1 && -1 + setverdict(pass) + #if 0 + setvedict(fail) + #else + setverdict(pass) + #endif + #else + setverdict(fail) + #if 0 + setvedict(fail) + #else + setverdict(fail) + #endif + #endif + + #if 0 + setverdict(fail) + #if 0 + setvedict(fail) + #else + setverdict(fail) + #endif + #else + setverdict(pass) + #if 0 + setvedict(fail) + #else + setverdict(pass) + #endif + #endif +} + +testcase tc_cascade() runs on My_CT { + #define TWENTY 20 + #define TWENTY2 TWENTY + #define TWENTY3 TWENTY2 + #define TWENTY4 TWENTY3 + #define TWENTY5 TWENTY4 + + #if TWENTY2 == 20 + setverdict(pass) + #else + setverdict(fail) + #endif + + #if TWENTY5 == 20 + setverdict(pass) + #else + setverdict(fail) + #endif + + #if TWENTY5 != 20 + setverdict(fail) + #else + setverdict(pass) + #endif + +} + +testcase tc_three_operands() runs on My_CT { + #define AAA 1 + #if AAA ? 0 : 1 + setverdict(fail) + #else + setverdict(pass); + #endif + + #define AAA 1 + #if AAA ? 1 : 0 + setverdict(pass); + #else + setverdict(fail); + #endif + + #define AAA 0 + #if AAA ? 1 : 0 + setverdict(fail) + #else + setverdict(pass); + #endif + + #define AAA 0 + #if AAA ? 0 : 1 + setverdict(pass) + #else + setverdict(fail); + #endif +} +//========================================================================= +// Testcases for #defined - import +//========================================================================= +testcase tc_A() runs on My_CT { + #if defined A_IMPORTED + var integer vl_i:=cg_A_i; + log(vl_i); + setverdict(pass); + #else + setverdict(fail); + #endif +} + +testcase tc_B() runs on My_CT { + #if defined B_IMPORTED + var integer vl_i:=cg_B_i; + log(vl_i); + setverdict(pass); + #else + setverdict(fail); + #endif +} + +#if defined A_IMPORTED +#if defined B_IMPORTED +#define A_AND_B_DEFINED +#endif +#endif + +testcase tc_AandB() runs on My_CT { + #if defined A_AND_B_DEFINED + var integer vl_i:=cg_A_i+cg_B_i; + setverdict(pass); + #else + setverdict(fail) + #endif + log(vl_i); +} + +#undef A_IMPORTED +testcase tc_if_defined() runs on My_CT { + #if defined A_IMPORTED + var integer vl_i:=c_A_i; + log(vl_i); + setverdict(fail); + #else + setverdict(pass); + #endif +} + +#undef A_IMPORTED +//this line inserts: #define A_IMPORTED +#include "ttcnpp_test_incl2.ttcnin" +testcase tc_include_ttcnin() runs on My_CT { + #if defined A_IMPORTED + var integer vl_i:=cg_A_i; + log(vl_i); + setverdict(pass); + #else + setverdict(fail); + #endif +} + +testcase tc_bitoperands() runs on My_CT{ + #define A 0xFF + #define B 0x00 + + #if (A & B == B) + setverdict(pass); + #else + setverdict(fail); + #endif + + #if ((A & B) == A) + setverdict(fail); + #else + setverdict(pass); + #endif + + #if (A|B == B) + setverdict(pass) + #else + setverdict(fail); + #endif + + #if (A|B == A) + setverdict(pass) + #else + setverdict(fail); + #endif + + #define A 0x03 + #define B 0x04 + + //0000 0011 && 0000 0100 + #if ((A & B) == B) + setverdict(fail); + #else + setverdict(pass); + #endif + + #if ((A | B) == A) + setverdict(fail) + #else + setverdict(pass); + #endif + +} + +testcase tc_wrap() runs on My_CT{ + +#define FO\ +O 10\ +20 +#if FOO == 1020 +setverdict(pass) +#else +setverdict(fail); +#endif +} + + + +//========================================================================= +// Control +//========================================================================= + +control{ + execute(tc_if_and_macro_expr()); + execute(tc_define_ifdef()); + execute(tc_define_ifndef()); + execute(tc_undef_ifndef()); + execute(tc_undef_ifdef()); + execute(tc_embedded_ifs()); + execute(tc_cascade()); + execute(tc_three_operands()); + execute(tc_A()); + execute(tc_B()); + execute(tc_AandB()); + execute(tc_if_defined()); + execute(tc_include_ttcnin()); + execute(tc_bitoperands()); + execute(tc_wrap()); +} + +} // end of module diff --git a/Semantic_Analizer_Tests/src/Basic_tests/specificValue_template_tests.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/specificValue_template_tests.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..40145bb69bd356319d000322608bdd92313b043b --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/specificValue_template_tests.ttcn @@ -0,0 +1,5115 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module specific_template_tests +{ +import from ASNTypes all; + +type enumerated enumeration +{ + item1(1), + item2(1), + item2(2), + item3(3) +}; + +//FIXME add tests for ispresent, ischoosen, valueof + +type enumerated myenum1 {xx1,xx2,xx3}; +type enumerated myenum2 {xx4,xx5,xx6}; +type default mydefault; +type component mycomponent{}; +type record of integer myrecordofType; +type set of integer mysetofType; +type integer myarrayType[3]; + +type set ASNSetType +{ + integer field1, + charstring field2 +}; + +type record ASNSequenceType +{ + integer field1, + charstring field2, + integer field3 optional +}; + +type union ASNChoiceType +{ + integer field1, + charstring field2 +}; + +const integer cg_integer := 5; +const myrecordofType cg_recordof := {1}; + +type component mycomponent2{}; +type function t_function(); +type function t_function2() runs on mycomponent; +external function ef_ext_function(); + +type altstep t_altstep() runs on mycomponent; +type altstep t_altstep2(); +altstep as_altstep() +runs on mycomponent +{ + [guard2] timerName.timeout + {} + [else] + {} +} + + +type testcase t_testcase() runs on mycomponent system mycomponent; +testcase tc_testcase() +runs on mycomponent +system mycomponent +{ + //local declarations + + //dynamic behaviour +} + + +function f_comp_return() return mycomponent{} + +signature mySignature(in integer Par1, out integer Par2, inout integer Par3) return integer; + +function f_integerValueTest() +{ + timer TL_t := 5; + + { template integer t_i := omit; } + { template integer t_i := (1 .. 2); } + { template integer t_i := (1,2,3); } + { template integer t_i := 5; } + { template integer t_i := 5+5; } + { template integer t_i := 5-5; } + { template integer t_i := 5*5; } + { template integer t_i := 5/5; } + { template integer t_i := bit2int('00'B); } + { template integer t_i := char2int("5"); } + { template integer t_i := float2int( 5.5); } + { template integer t_i := hex2int('00'H); } + { template integer t_i := oct2int('0F'O); } + { template integer t_i := str2int("5"); } + { template integer t_i := unichar2int(char(0,0,0,0)); } + { template integer t_i := lengthof("akarmi"); } + { template integer t_i := sizeof(cg_recordof); } + + { template integer t_i := null; } + { template integer t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template integer t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template integer t_i := {field1:=1, field1:="akarmi"}; } + { template integer t_i := true; } + { template integer t_i := false; } + { template integer t_i := pass; } + { template integer t_i := not false; } + { template integer t_i := t_i; } + { template integer t_i := 5.5; } + { template integer t_i := "akarmi"; } + { template integer t_i := char(0,0,0,0); } + { template integer t_i := 'aa'O; } + { template integer t_i := '00'B; } + { template integer t_i := '00'H; } + { template integer t_i := 5.5 * 5.5; } + { template integer t_i := 5.5 + 5.5; } + { template integer t_i := 5.5 - 5.5; } + { template integer t_i := 5.5 / 5.5; } + { template integer t_i := true and true; } + { template integer t_i := true or true; } + { template integer t_i := not4b 'aa'O; } + { template integer t_i := not4b '00'B; } + { template integer t_i := not4b '00'H; } + { template integer t_i := '00'B and4b '00'B; } + { template integer t_i := '00'H and4b '00'H; } + { template integer t_i := '00'O and4b '00'O; } + { template integer t_i := '00'B or4b '00'B; } + { template integer t_i := '00'H or4b '00'H; } + { template integer t_i := '00'O or4b '00'O; } + { template integer t_i := '00'B xor4b '00'B; } + { template integer t_i := '00'H xor4b '00'H; } + { template integer t_i := '00'O xor4b '00'O; } + { template integer t_i := '00'B << 1; } + { template integer t_i := '00'H << 1; } + { template integer t_i := '00'O << 1; } + { template integer t_i := '00'B >> 1; } + { template integer t_i := '00'H >> 1; } + { template integer t_i := '00'O >> 1; } + { template integer t_i := '00'B <@ 1; } + { template integer t_i := '00'H <@ 1; } + { template integer t_i := '00'O <@ 1; } + { template integer t_i := '00'B @> 1; } + { template integer t_i := '00'H @> 1; } + { template integer t_i := '00'O @> 1; } + { template integer t_i := '00'B & '00'B; } + { template integer t_i := '00'H & '00'H; } + { template integer t_i := '00'O & '00'O; } + { template integer t_i := "akarmi" & "akarmi2"; } + { template integer t_i := 5 == 5; } + { template integer t_i := 5 != 5; } + { template integer t_i := 5 < 5; } + { template integer t_i := 5 > 5; } + { template integer t_i := 5 <= 5; } + { template integer t_i := 5 >= 5; } + { template integer t_i := bit2hex('00'B); } + { template integer t_i := bit2oct('00'B); } + { template integer t_i := bit2str('00'B); } + { template integer t_i := char2oct("akarmi"); } + { template integer t_i := float2str(5.5); } + { template integer t_i := hex2oct('FF00'H); } + { template integer t_i := hex2str('FF00'H); } + { template integer t_i := int2char(5); } + { template integer t_i := int2float(5); } + { template integer t_i := int2str(5); } + { template integer t_i := int2unichar(5); } + { template integer t_i := oct2bit('00FF'O); } + { template integer t_i := oct2char('0F'O); } + { template integer t_i := oct2hex('0F'O); } + { template integer t_i := oct2str('0F'O); } + { template integer t_i := str2bit("0101"); } + { template integer t_i := str2float("5.5"); } + { template integer t_i := str2hex("0101"); } + { template integer t_i := str2oct("0101"); } + { template integer t_i := unichar2char(char(0,0,0,0)); } + { template integer t_i := int2bit(1,3); } + { template integer t_i := int2hex(1,3); } + { template integer t_i := int2oct(1,3); } + { template integer t_i := rnd(); } + { template integer t_i := rnd(5.5); } + { template integer t_i := isbound(5.5); } + { template integer t_i := isvalue(5.5); } + { template integer t_i := regexp("akarmi","akarmi", 0); } + { template integer t_i := match(5,5); } + { template integer t_i := mtc; } + { template integer t_i := system; } + { template integer t_i := self; } + { template integer t_i := any component . running; } + { template integer t_i := all component . running; } + { template integer t_i := any component . alive; } + { template integer t_i := all component . alive; } + { template integer t_i := any timer . running; } + { template integer t_i := f_comp_return().running; } + { template integer t_i := f_comp_return().alive; } + { template integer t_i := TL_t.read; } + { template integer t_i := mycomponent.create; } + { template integer t_i := activate(temp_altstep()); } + { template integer t_i := activate(derefers(temp_altstep_pointer)()); } + { template integer t_i := execute(temp_altstep(), 5); } + { template integer t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template integer t_i := refers(f_functiontypeValueTest); } + { template integer t_i := refers(ef_ext_function); } + { template integer t_i := refers(as_altstep); } + { template integer t_i := refers(tc_testcase); } +} + +function f_floatValueTests() +{ + timer TL_t := 5; + + { template float t_i := omit; } + { template float t_i := (1.0 .. 2.0); } + { template float t_i := (1.0,2.0,3.0); } + { template float t_i := 5.5; } + { template float t_i := 5.5+5.5; } + { template float t_i := 5.5-5.5; } + { template float t_i := 5.5*5.5; } + { template float t_i := 5.5/5.5; } + { template float t_i := int2float(5); } + { template float t_i := str2float("5.5"); } + { template float t_i := rnd(); } + { template float t_i := rnd(5.5); } + { template float t_i := TL_t.read; } + + { template float t_i := null; } + { template float t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template float t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template float t_i := {field1:=1, field1:="akarmi"}; } + { template float t_i := true; } + { template float t_i := false; } + { template float t_i := pass; } + { template float t_i := not false; } + { template float t_i := t_i; } + { template float t_i := 5; } + { template float t_i := "akarmi"; } + { template float t_i := char(0,0,0,0); } + { template float t_i := 'aa'O; } + { template float t_i := '00'B; } + { template float t_i := '00'H; } + { template float t_i := {1,2,3}; } + { template float t_i := 5 * 5; } + { template float t_i := 5 + 5; } + { template float t_i := 5 - 5; } + { template float t_i := 5 / 5; } + { template float t_i := 5 mod 5; } + { template float t_i := 5 rem 5; } + { template float t_i := true and true; } + { template float t_i := true or true; } + { template float t_i := not4b 'aa'O; } + { template float t_i := not4b '00'B; } + { template float t_i := not4b '00'H; } + { template float t_i := '00'B and4b '00'B; } + { template float t_i := '00'H and4b '00'H; } + { template float t_i := '00'O and4b '00'O; } + { template float t_i := '00'B or4b '00'B; } + { template float t_i := '00'H or4b '00'H; } + { template float t_i := '00'O or4b '00'O; } + { template float t_i := '00'B xor4b '00'B; } + { template float t_i := '00'H xor4b '00'H; } + { template float t_i := '00'O xor4b '00'O; } + { template float t_i := '00'B << 1; } + { template float t_i := '00'H << 1; } + { template float t_i := '00'O << 1; } + { template float t_i := '00'B >> 1; } + { template float t_i := '00'H >> 1; } + { template float t_i := '00'O >> 1; } + { template float t_i := '00'B <@ 1; } + { template float t_i := '00'H <@ 1; } + { template float t_i := '00'O <@ 1; } + { template float t_i := '00'B @> 1; } + { template float t_i := '00'H @> 1; } + { template float t_i := '00'O @> 1; } + { template float t_i := '00'B & '00'B; } + { template float t_i := '00'H & '00'H; } + { template float t_i := '00'O & '00'O; } + { template float t_i := "akarmi" & "akarmi2"; } + { template float t_i := 5.5 == 5.5; } + { template float t_i := 5.5 != 5.5; } + { template float t_i := 5.5 < 5.5; } + { template float t_i := 5.5 > 5.5; } + { template float t_i := 5.5 <= 5.5; } + { template float t_i := 5.5 >= 5.5; } + { template float t_i := bit2hex('00'B); } + { template float t_i := bit2int('00'B); } + { template float t_i := bit2oct('00'B); } + { template float t_i := bit2str('00'B); } + { template float t_i := char2int("5"); } + { template float t_i := char2oct("akarmi"); } + { template float t_i := float2int( 5.5); } + { template float t_i := float2str(5.5); } + { template float t_i := hex2int('FF'H); } + { template float t_i := hex2oct('FF00'H); } + { template float t_i := hex2str('FF00'H); } + { template float t_i := int2char(5); } + { template float t_i := int2str(5); } + { template float t_i := int2unichar(5); } + { template float t_i := oct2bit('00FF'O); } + { template float t_i := oct2char('0F'O); } + { template float t_i := oct2hex('0F'O); } + { template float t_i := oct2int('0F'O); } + { template float t_i := oct2str('0F'O); } + { template float t_i := str2bit("0101"); } + { template float t_i := str2hex("0101"); } + { template float t_i := str2int("5"); } + { template float t_i := str2oct("0101"); } + { template float t_i := unichar2int(char(0,0,0,0)); } + { template float t_i := unichar2char(char(0,0,0,0)); } + { template float t_i := int2bit(1,3); } + { template float t_i := int2hex(1,3); } + { template float t_i := int2oct(1,3); } + { template float t_i := isbound(5.5); } + { template float t_i := isvalue(5.5); } + { template float t_i := lengthof("akarmi"); } + { template float t_i := sizeof(cg_recordof); } + { template float t_i := regexp("akarmi","akarmi", 0); } + { template float t_i := match(5,5); } + { template float t_i := mtc; } + { template float t_i := system; } + { template float t_i := self; } + { template float t_i := any component . running; } + { template float t_i := all component . running; } + { template float t_i := any component . alive; } + { template float t_i := all component . alive; } + { template float t_i := any timer . running; } + { template float t_i := f_comp_return().running; } + { template float t_i := f_comp_return().alive; } + { template float t_i := mycomponent.create; } + { template float t_i := activate(temp_altstep()); } + { template float t_i := activate(derefers(temp_altstep_pointer)()); } + { template float t_i := execute(temp_altstep(), 5); } + { template float t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template float t_i := refers(f_functiontypeValueTest); } + { template float t_i := refers(ef_ext_function); } + { template float t_i := refers(as_altstep); } + { template float t_i := refers(tc_testcase); } +} + +function f_booleanValueTests() +{ + timer TL_t := 5; + + { template boolean t_i := omit; } + { template boolean t_i := (true, true, false); } + { template boolean t_i := true; } + { template boolean t_i := false; } + { template boolean t_i := true and true; } + { template boolean t_i := true or true; } + { template boolean t_i := not true; } + { template boolean t_i := 5 == 5; } + { template boolean t_i := 5 != 5; } + { template boolean t_i := 5 < 5; } + { template boolean t_i := 5 > 5; } + { template boolean t_i := 5 <= 5; } + { template boolean t_i := 5 >= 5; } + { template boolean t_i := isbound(5.5); } + { template boolean t_i := isvalue(5.5); } + { template boolean t_i := match(5,5); } + { template boolean t_i := any component . running; } + { template boolean t_i := all component . running; } + { template boolean t_i := any component . alive; } + { template boolean t_i := all component . alive; } + { template boolean t_i := any timer . running; } + { template boolean t_i := f_comp_return().running; } + { template boolean t_i := f_comp_return().alive; } + + { template boolean t_i := null; } + { template boolean t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template boolean t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template boolean t_i := {field1:=1, field1:="akarmi"}; } + { template boolean t_i := pass; } + { template boolean t_i := t_i; } + { template boolean t_i := 5; } + { template boolean t_i := 5.5; } + { template boolean t_i := "akarmi"; } + { template boolean t_i := char(0,0,0,0); } + { template boolean t_i := 'aa'O; } + { template boolean t_i := '00'B; } + { template boolean t_i := '00'H; } + { template boolean t_i := {1,2,3}; } + { template boolean t_i := 5 * 5; } + { template boolean t_i := 5 + 5; } + { template boolean t_i := 5 - 5; } + { template boolean t_i := 5 / 5; } + { template boolean t_i := 5 mod 5; } + { template boolean t_i := 5 rem 5; } + { template boolean t_i := not4b 'aa'O; } + { template boolean t_i := not4b '00'B; } + { template boolean t_i := not4b '00'H; } + { template boolean t_i := '00'B and4b '00'B; } + { template boolean t_i := '00'H and4b '00'H; } + { template boolean t_i := '00'O and4b '00'O; } + { template boolean t_i := '00'B or4b '00'B; } + { template boolean t_i := '00'H or4b '00'H; } + { template boolean t_i := '00'O or4b '00'O; } + { template boolean t_i := '00'B xor4b '00'B; } + { template boolean t_i := '00'H xor4b '00'H; } + { template boolean t_i := '00'O xor4b '00'O; } + { template boolean t_i := '00'B << 1; } + { template boolean t_i := '00'H << 1; } + { template boolean t_i := '00'O << 1; } + { template boolean t_i := '00'B >> 1; } + { template boolean t_i := '00'H >> 1; } + { template boolean t_i := '00'O >> 1; } + { template boolean t_i := '00'B <@ 1; } + { template boolean t_i := '00'H <@ 1; } + { template boolean t_i := '00'O <@ 1; } + { template boolean t_i := '00'B @> 1; } + { template boolean t_i := '00'H @> 1; } + { template boolean t_i := '00'O @> 1; } + { template boolean t_i := '00'B & '00'B; } + { template boolean t_i := '00'H & '00'H; } + { template boolean t_i := '00'O & '00'O; } + { template boolean t_i := "akarmi" & "akarmi2"; } + { template boolean t_i := bit2hex('00'B); } + { template boolean t_i := bit2int('00'B); } + { template boolean t_i := bit2oct('00'B); } + { template boolean t_i := bit2str('00'B); } + { template boolean t_i := char2int("5"); } + { template boolean t_i := char2oct("akarmi"); } + { template boolean t_i := float2int( 5.5); } + { template boolean t_i := float2str(5.5); } + { template boolean t_i := hex2int('FF'H); } + { template boolean t_i := hex2oct('FF00'H); } + { template boolean t_i := hex2str('FF00'H); } + { template boolean t_i := int2char(5); } + { template boolean t_i := int2float(5); } + { template boolean t_i := int2str(5); } + { template boolean t_i := int2unichar(5); } + { template boolean t_i := oct2bit('00FF'O); } + { template boolean t_i := oct2char('0F'O); } + { template boolean t_i := oct2hex('0F'O); } + { template boolean t_i := oct2int('0F'O); } + { template boolean t_i := oct2str('0F'O); } + { template boolean t_i := str2bit("0101"); } + { template boolean t_i := str2float("5.5"); } + { template boolean t_i := str2hex("0101"); } + { template boolean t_i := str2int("5"); } + { template boolean t_i := str2oct("0101"); } + { template boolean t_i := unichar2int(char(0,0,0,0)); } + { template boolean t_i := unichar2char(char(0,0,0,0)); } + { template boolean t_i := int2bit(1,3); } + { template boolean t_i := int2hex(1,3); } + { template boolean t_i := int2oct(1,3); } + { template boolean t_i := rnd(); } + { template boolean t_i := rnd(5.5); } + { template boolean t_i := lengthof("akarmi"); } + { template boolean t_i := sizeof(cg_recordof); } + { template boolean t_i := regexp("akarmi","akarmi", 0); } + { template boolean t_i := mtc; } + { template boolean t_i := system; } + { template boolean t_i := self; } + { template boolean t_i := TL_t.read; } + { template boolean t_i := mycomponent.create; } + { template boolean t_i := activate(temp_altstep()); } + { template boolean t_i := activate(derefers(temp_altstep_pointer)()); } + { template boolean t_i := execute(temp_altstep(), 5); } + { template boolean t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template boolean t_i := refers(f_functiontypeValueTest); } + { template boolean t_i := refers(ef_ext_function); } + { template boolean t_i := refers(as_altstep); } + { template boolean t_i := refers(tc_testcase); } +} + +function f_bitstringValueTests() +{ + timer TL_t := 5; + + { template bitstring t_i := omit; } + { template bitstring t_i := ('00'B, '11'B, '0*?0'B); } + { template bitstring t_i := '00'B; } + { template bitstring t_i := not4b '00'B; } + { template bitstring t_i := '00'B and4b '00'B; } + { template bitstring t_i := '00'B or4b '00'B; } + { template bitstring t_i := '00'B xor4b '00'B; } + { template bitstring t_i := '00'B << 1; } + { template bitstring t_i := '00'B >> 1; } + { template bitstring t_i := '00'B <@ 1; } + { template bitstring t_i := '00'B @> 1; } + { template bitstring t_i := '00'B & '00'B; } + { template bitstring t_i := oct2bit('00FF'O); } + { template bitstring t_i := str2bit("0101"); } + { template bitstring t_i := int2bit(1,3); } + + { template bitstring t_i := null; } + { template bitstring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5.5, char(0,0,0,0)}; } + { template bitstring t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5.5, char(0,0,0,0)); } + { template bitstring t_i := {field1:=1, field1:="akarmi"}; } + { template bitstring t_i := true; } + { template bitstring t_i := false; } + { template bitstring t_i := pass; } + { template bitstring t_i := not false; } + { template bitstring t_i := t_i; } + { template bitstring t_i := 5; } + { template bitstring t_i := 5.5; } + { template bitstring t_i := "akarmi"; } + { template bitstring t_i := char(0,0,0,0); } + { template bitstring t_i := 'aa'O; } + { template bitstring t_i := '00'H; } + { template bitstring t_i := {1,2,3}; } + { template bitstring t_i := 5 * 5; } + { template bitstring t_i := 5 + 5; } + { template bitstring t_i := 5 - 5; } + { template bitstring t_i := 5 / 5; } + { template bitstring t_i := 5 mod 5; } + { template bitstring t_i := 5 rem 5; } + { template bitstring t_i := true and true; } + { template bitstring t_i := true or true; } + { template bitstring t_i := not4b 'aa'O; } + { template bitstring t_i := not4b '00'H; } + { template bitstring t_i := '00'H and4b '00'H; } + { template bitstring t_i := '00'O and4b '00'O; } + { template bitstring t_i := '00'H or4b '00'H; } + { template bitstring t_i := '00'O or4b '00'O; } + { template bitstring t_i := '00'H xor4b '00'H; } + { template bitstring t_i := '00'O xor4b '00'O; } + { template bitstring t_i := '00'H << 1; } + { template bitstring t_i := '00'O << 1; } + { template bitstring t_i := '00'H >> 1; } + { template bitstring t_i := '00'O >> 1; } + { template bitstring t_i := '00'H <@ 1; } + { template bitstring t_i := '00'O <@ 1; } + { template bitstring t_i := '00'H @> 1; } + { template bitstring t_i := '00'O @> 1; } + { template bitstring t_i := '00'H & '00'H; } + { template bitstring t_i := '00'O & '00'O; } + { template bitstring t_i := "akarmi" & "akarmi2"; } + { template bitstring t_i := 5 == 5; } + { template bitstring t_i := 5 != 5; } + { template bitstring t_i := 5 < 5; } + { template bitstring t_i := 5 > 5; } + { template bitstring t_i := 5 <= 5; } + { template bitstring t_i := 5 >= 5; } + { template bitstring t_i := bit2hex('00'B); } + { template bitstring t_i := bit2int('00'B); } + { template bitstring t_i := bit2oct('00'B); } + { template bitstring t_i := bit2str('00'B); } + { template bitstring t_i := char2int("5"); } + { template bitstring t_i := char2oct("akarmi"); } + { template bitstring t_i := float2int( 5.5); } + { template bitstring t_i := float2str(5.5); } + { template bitstring t_i := hex2int('FF'H); } + { template bitstring t_i := hex2oct('FF00'H); } + { template bitstring t_i := hex2str('FF00'H); } + { template bitstring t_i := int2char(5); } + { template bitstring t_i := int2float(5); } + { template bitstring t_i := int2str(5); } + { template bitstring t_i := int2unichar(5); } + { template bitstring t_i := oct2char('0F'O); } + { template bitstring t_i := oct2hex('0F'O); } + { template bitstring t_i := oct2int('0F'O); } + { template bitstring t_i := oct2str('0F'O); } + { template bitstring t_i := str2float("5.5"); } + { template bitstring t_i := str2hex("0101"); } + { template bitstring t_i := str2int("5"); } + { template bitstring t_i := str2oct("0101"); } + { template bitstring t_i := unichar2int(char(0,0,0,0)); } + { template bitstring t_i := unichar2char(char(0,0,0,0)); } + { template bitstring t_i := int2hex(1,3); } + { template bitstring t_i := int2oct(1,3); } + { template bitstring t_i := rnd(); } + { template bitstring t_i := rnd(5.5); } + { template bitstring t_i := isbound(5.5); } + { template bitstring t_i := isvalue(5.5); } + { template bitstring t_i := lengthof("akarmi"); } + { template bitstring t_i := sizeof(cg_recordof); } + { template bitstring t_i := regexp("akarmi","akarmi", 0); } + { template bitstring t_i := match(5,5); } + { template bitstring t_i := mtc; } + { template bitstring t_i := system; } + { template bitstring t_i := self; } + { template bitstring t_i := any component . running; } + { template bitstring t_i := all component . running; } + { template bitstring t_i := any component . alive; } + { template bitstring t_i := all component . alive; } + { template bitstring t_i := any timer . running; } + { template bitstring t_i := f_comp_return().running; } + { template bitstring t_i := f_comp_return().alive; } + { template bitstring t_i := TL_t.read; } + { template bitstring t_i := mycomponent.create; } + { template bitstring t_i := activate(temp_altstep()); } + { template bitstring t_i := activate(derefers(temp_altstep_pointer)()); } + { template bitstring t_i := execute(temp_altstep(), 5); } + { template bitstring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template bitstring t_i := refers(f_functiontypeValueTest); } + { template bitstring t_i := refers(ef_ext_function); } + { template bitstring t_i := refers(as_altstep); } + { template bitstring t_i := refers(tc_testcase); } +} + +function f_hexstringValueTests() +{ + timer TL_t := 5; + + { template hexstring t_i := omit; } + { template hexstring t_i := ('00'H, '11'H, '0*?0'H); } + { template hexstring t_i := '00'H; } + { template hexstring t_i := not4b '00'H; } + { template hexstring t_i := '00'H and4b '00'H; } + { template hexstring t_i := '00'H or4b '00'H; } + { template hexstring t_i := '00'H xor4b '00'H; } + { template hexstring t_i := '00'H << 1; } + { template hexstring t_i := '00'H >> 1; } + { template hexstring t_i := '00'H <@ 1; } + { template hexstring t_i := '00'H @> 1; } + { template hexstring t_i := '00'H & '00'H; } + { template hexstring t_i := bit2hex('00'B); } + { template hexstring t_i := oct2hex('0F'O); } + { template hexstring t_i := str2hex("0101"); } + { template hexstring t_i := int2hex(1,3); } + + { template hexstring t_i := null; } + { template hexstring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template hexstring t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template hexstring t_i := {field1:=1, field1:="akarmi"}; } + { template hexstring t_i := true; } + { template hexstring t_i := false; } + { template hexstring t_i := pass; } + { template hexstring t_i := not false; } + { template hexstring t_i := t_i; } + { template hexstring t_i := 5; } + { template hexstring t_i := 5.5; } + { template hexstring t_i := "akarmi"; } + { template hexstring t_i := char(0,0,0,0); } + { template hexstring t_i := 'aa'O; } + { template hexstring t_i := '00'B; } + { template hexstring t_i := {1,2,3}; } + { template hexstring t_i := 5 * 5; } + { template hexstring t_i := 5 + 5; } + { template hexstring t_i := 5 - 5; } + { template hexstring t_i := 5 / 5; } + { template hexstring t_i := 5 mod 5; } + { template hexstring t_i := 5 rem 5; } + { template hexstring t_i := true and true; } + { template hexstring t_i := true or true; } + { template hexstring t_i := not4b 'aa'O; } + { template hexstring t_i := not4b '00'B; } + { template hexstring t_i := '00'B and4b '00'B; } + { template hexstring t_i := '00'O and4b '00'O; } + { template hexstring t_i := '00'B or4b '00'B; } + { template hexstring t_i := '00'O or4b '00'O; } + { template hexstring t_i := '00'B xor4b '00'B; } + { template hexstring t_i := '00'O xor4b '00'O; } + { template hexstring t_i := '00'B << 1; } + { template hexstring t_i := '00'O << 1; } + { template hexstring t_i := '00'B >> 1; } + { template hexstring t_i := '00'O >> 1; } + { template hexstring t_i := '00'B <@ 1; } + { template hexstring t_i := '00'O <@ 1; } + { template hexstring t_i := '00'B @> 1; } + { template hexstring t_i := '00'O @> 1; } + { template hexstring t_i := '00'B & '00'B; } + { template hexstring t_i := '00'O & '00'O; } + { template hexstring t_i := "akarmi" & "akarmi2"; } + { template hexstring t_i := 5 == 5; } + { template hexstring t_i := 5 != 5; } + { template hexstring t_i := 5 < 5; } + { template hexstring t_i := 5 > 5; } + { template hexstring t_i := 5 <= 5; } + { template hexstring t_i := 5 >= 5; } + { template hexstring t_i := bit2int('00'B); } + { template hexstring t_i := bit2oct('00'B); } + { template hexstring t_i := bit2str('00'B); } + { template hexstring t_i := char2int("5"); } + { template hexstring t_i := char2oct("akarmi"); } + { template hexstring t_i := float2int( 5.5); } + { template hexstring t_i := float2str(5.5); } + { template hexstring t_i := hex2int('FF'H); } + { template hexstring t_i := hex2oct('FF00'H); } + { template hexstring t_i := hex2str('FF00'H); } + { template hexstring t_i := int2char(5); } + { template hexstring t_i := int2float(5); } + { template hexstring t_i := int2str(5); } + { template hexstring t_i := int2unichar(5); } + { template hexstring t_i := oct2bit('00FF'O); } + { template hexstring t_i := oct2char('0F'O); } + { template hexstring t_i := oct2int('0F'O); } + { template hexstring t_i := oct2str('0F'O); } + { template hexstring t_i := str2bit("0101"); } + { template hexstring t_i := str2float("5.5"); } + { template hexstring t_i := str2int("5"); } + { template hexstring t_i := str2oct("0101"); } + { template hexstring t_i := unichar2int(char(0,0,0,0)); } + { template hexstring t_i := unichar2char(char(0,0,0,0)); } + { template hexstring t_i := int2bit(1,3); } + { template hexstring t_i := int2oct(1,3); } + { template hexstring t_i := rnd(); } + { template hexstring t_i := rnd(5.5); } + { template hexstring t_i := isbound(5.5); } + { template hexstring t_i := isvalue(5.5); } + { template hexstring t_i := lengthof("akarmi"); } + { template hexstring t_i := sizeof(cg_recordof); } + { template hexstring t_i := regexp("akarmi","akarmi", 0); } + { template hexstring t_i := match(5,5); } + { template hexstring t_i := mtc; } + { template hexstring t_i := system; } + { template hexstring t_i := self; } + { template hexstring t_i := any component . running; } + { template hexstring t_i := all component . running; } + { template hexstring t_i := any component . alive; } + { template hexstring t_i := all component . alive; } + { template hexstring t_i := any timer . running; } + { template hexstring t_i := f_comp_return().running; } + { template hexstring t_i := f_comp_return().alive; } + { template hexstring t_i := TL_t.read; } + { template hexstring t_i := mycomponent.create; } + { template hexstring t_i := activate(temp_altstep()); } + { template hexstring t_i := activate(derefers(temp_altstep_pointer)()); } + { template hexstring t_i := execute(temp_altstep(), 5); } + { template hexstring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template hexstring t_i := refers(f_functiontypeValueTest); } + { template hexstring t_i := refers(ef_ext_function); } + { template hexstring t_i := refers(as_altstep); } + { template hexstring t_i := refers(tc_testcase); } +} + +function f_octetstringValueTests() +{ + timer TL_t := 5; + + { template octetstring t_i := omit; } + { template octetstring t_i := ('00'O, '11'O, '0000'O); } + { template octetstring t_i := 'aa'O; } + { template octetstring t_i := not4b 'aa'O; } + { template octetstring t_i := '00'O and4b '00'O; } + { template octetstring t_i := '00'O or4b '00'O; } + { template octetstring t_i := '00'O xor4b '00'O; } + { template octetstring t_i := '00'O << 1; } + { template octetstring t_i := '00'O >> 1; } + { template octetstring t_i := '1100'O <@ 1; } + { template octetstring t_i := '1100'O @> 1; } + { template octetstring t_i := '00'O & '00'O; } + { template octetstring t_i := bit2oct('00'B); } + { template octetstring t_i := char2oct("akarmi"); } + { template octetstring t_i := hex2oct('FF00'H); } + { template octetstring t_i := str2oct("0101"); } + { template octetstring t_i := int2oct(1,3); } + + { template octetstring t_i := null; } + { template octetstring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template octetstring t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template octetstring t_i := {field1:=1, field1:="akarmi"}; } + { template octetstring t_i := true; } + { template octetstring t_i := false; } + { template octetstring t_i := pass; } + { template octetstring t_i := not false; } + { template octetstring t_i := t_i; } + { template octetstring t_i := 5; } + { template octetstring t_i := 5.5; } + { template octetstring t_i := "akarmi"; } + { template octetstring t_i := char(0,0,0,0); } + { template octetstring t_i := 'aa'H; } + { template octetstring t_i := '00'B; } + { template octetstring t_i := {1,2,3}; } + { template octetstring t_i := 5 * 5; } + { template octetstring t_i := 5 + 5; } + { template octetstring t_i := 5 - 5; } + { template octetstring t_i := 5 / 5; } + { template octetstring t_i := 5 mod 5; } + { template octetstring t_i := 5 rem 5; } + { template octetstring t_i := true and true; } + { template octetstring t_i := true or true; } + { template octetstring t_i := not4b 'aa'H; } + { template octetstring t_i := not4b '00'B; } + { template octetstring t_i := '00'B and4b '00'B; } + { template octetstring t_i := '00'H and4b '00'H; } + { template octetstring t_i := '00'B or4b '00'B; } + { template octetstring t_i := '00'H or4b '00'H; } + { template octetstring t_i := '00'B xor4b '00'B; } + { template octetstring t_i := '00'H xor4b '00'H; } + { template octetstring t_i := '00'B << 1; } + { template octetstring t_i := '00'H << 1; } + { template octetstring t_i := '00'B >> 1; } + { template octetstring t_i := '00'H >> 1; } + { template octetstring t_i := '00'B <@ 1; } + { template octetstring t_i := '00'H <@ 1; } + { template octetstring t_i := '00'B @> 1; } + { template octetstring t_i := '00'H @> 1; } + { template octetstring t_i := '00'B & '00'B; } + { template octetstring t_i := '00'H & '00'H; } + { template octetstring t_i := "akarmi" & "akarmi2"; } + { template octetstring t_i := 5 == 5; } + { template octetstring t_i := 5 != 5; } + { template octetstring t_i := 5 < 5; } + { template octetstring t_i := 5 > 5; } + { template octetstring t_i := 5 <= 5; } + { template octetstring t_i := 5 >= 5; } + { template octetstring t_i := bit2hex('00'B); } + { template octetstring t_i := bit2int('00'B); } + { template octetstring t_i := bit2str('00'B); } + { template octetstring t_i := char2int("5"); } + { template octetstring t_i := float2int( 5.5); } + { template octetstring t_i := float2str(5.5); } + { template octetstring t_i := hex2int('FF'H); } + { template octetstring t_i := hex2str('FF00'H); } + { template octetstring t_i := int2char(5); } + { template octetstring t_i := int2float(5); } + { template octetstring t_i := int2str(5); } + { template octetstring t_i := int2unichar(5); } + { template octetstring t_i := oct2bit('00FF'O); } + { template octetstring t_i := oct2char('0F'O); } + { template octetstring t_i := oct2hex('0F'O); } + { template octetstring t_i := oct2int('0F'O); } + { template octetstring t_i := oct2str('0F'O); } + { template octetstring t_i := str2bit("0101"); } + { template octetstring t_i := str2float("5.5"); } + { template octetstring t_i := str2hex("0101"); } + { template octetstring t_i := str2int("5"); } + { template octetstring t_i := unichar2int(char(0,0,0,0)); } + { template octetstring t_i := unichar2char(char(0,0,0,0)); } + { template octetstring t_i := int2bit(1,3); } + { template octetstring t_i := int2hex(1,3); } + { template octetstring t_i := rnd(); } + { template octetstring t_i := rnd(5.5); } + { template octetstring t_i := isbound(5.5); } + { template octetstring t_i := isvalue(5.5); } + { template octetstring t_i := lengthof("akarmi"); } + { template octetstring t_i := sizeof(cg_recordof); } + { template octetstring t_i := regexp("akarmi","akarmi", 0); } + { template octetstring t_i := match(5,5); } + { template octetstring t_i := mtc; } + { template octetstring t_i := system; } + { template octetstring t_i := self; } + { template octetstring t_i := any component . running; } + { template octetstring t_i := all component . running; } + { template octetstring t_i := any component . alive; } + { template octetstring t_i := all component . alive; } + { template octetstring t_i := any timer . running; } + { template octetstring t_i := f_comp_return().running; } + { template octetstring t_i := f_comp_return().alive; } + { template octetstring t_i := TL_t.read; } + { template octetstring t_i := mycomponent.create; } + { template octetstring t_i := activate(temp_altstep()); } + { template octetstring t_i := activate(derefers(temp_altstep_pointer)()); } + { template octetstring t_i := execute(temp_altstep(), 5); } + { template octetstring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template octetstring t_i := refers(f_functiontypeValueTest); } + { template octetstring t_i := refers(ef_ext_function); } + { template octetstring t_i := refers(as_altstep); } + { template octetstring t_i := refers(tc_testcase); } +} + +function f_verdicttypeValueTests() +{ + timer TL_t := 5; + + { template verdicttype t_i := omit; } + { template verdicttype t_i := pass; } + { template verdicttype t_i := inconc; } + { template verdicttype t_i := error; } + { template verdicttype t_i := fail; } + { template verdicttype t_i := none; } + { template verdicttype t_i := (pass, inconc, error, fail ,none); } + { template verdicttype t_i := execute(temp_altstep(), 5); } + { template verdicttype t_i := execute(derefers(temp_altstep_pointer)(),5); } + + { template verdicttype t_i := null; } + { template verdicttype t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template verdicttype t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template verdicttype t_i := {field1:=1, field1:="akarmi"}; } + { template verdicttype t_i := true; } + { template verdicttype t_i := false; } + { template verdicttype t_i := not false; } + { template verdicttype t_i := t_i; } + { template verdicttype t_i := 5; } + { template verdicttype t_i := 5.5; } + { template verdicttype t_i := "akarmi"; } + { template verdicttype t_i := char(0,0,0,0); } + { template verdicttype t_i := 'aa'H; } + { template verdicttype t_i := '00'B; } + { template verdicttype t_i := {1,2,3}; } + { template verdicttype t_i := 5 * 5; } + { template verdicttype t_i := 5 + 5; } + { template verdicttype t_i := 5 - 5; } + { template verdicttype t_i := 5 / 5; } + { template verdicttype t_i := 5 mod 5; } + { template verdicttype t_i := 5 rem 5; } + { template verdicttype t_i := true and true; } + { template verdicttype t_i := true or true; } + { template verdicttype t_i := not4b 'aa'H; } + { template verdicttype t_i := not4b '00'B; } + { template verdicttype t_i := '00'B and4b '00'B; } + { template verdicttype t_i := '00'H and4b '00'H; } + { template verdicttype t_i := '00'B or4b '00'B; } + { template verdicttype t_i := '00'H or4b '00'H; } + { template verdicttype t_i := '00'B xor4b '00'B; } + { template verdicttype t_i := '00'H xor4b '00'H; } + { template verdicttype t_i := '00'B << 1; } + { template verdicttype t_i := '00'H << 1; } + { template verdicttype t_i := '00'B >> 1; } + { template verdicttype t_i := '00'H >> 1; } + { template verdicttype t_i := '00'B <@ 1; } + { template verdicttype t_i := '00'H <@ 1; } + { template verdicttype t_i := '00'B @> 1; } + { template verdicttype t_i := '00'H @> 1; } + { template verdicttype t_i := '00'B & '00'B; } + { template verdicttype t_i := '00'H & '00'H; } + { template verdicttype t_i := "akarmi" & "akarmi2"; } + { template verdicttype t_i := 5 == 5; } + { template verdicttype t_i := 5 != 5; } + { template verdicttype t_i := 5 < 5; } + { template verdicttype t_i := 5 > 5; } + { template verdicttype t_i := 5 <= 5; } + { template verdicttype t_i := 5 >= 5; } + { template verdicttype t_i := bit2hex('00'B); } + { template verdicttype t_i := bit2int('00'B); } + { template verdicttype t_i := bit2oct('00'B); } + { template verdicttype t_i := bit2str('00'B); } + { template verdicttype t_i := char2int("5"); } + { template verdicttype t_i := char2oct("akarmi"); } + { template verdicttype t_i := float2int( 5.5); } + { template verdicttype t_i := float2str(5.5); } + { template verdicttype t_i := hex2int('FF'H); } + { template verdicttype t_i := hex2oct('FF00'H); } + { template verdicttype t_i := hex2str('FF00'H); } + { template verdicttype t_i := int2char(5); } + { template verdicttype t_i := int2float(5); } + { template verdicttype t_i := int2str(5); } + { template verdicttype t_i := int2unichar(5); } + { template verdicttype t_i := oct2bit('00FF'O); } + { template verdicttype t_i := oct2char('0F'O); } + { template verdicttype t_i := oct2hex('0F'O); } + { template verdicttype t_i := oct2int('0F'O); } + { template verdicttype t_i := oct2str('0F'O); } + { template verdicttype t_i := str2bit("0101"); } + { template verdicttype t_i := str2float("5.5"); } + { template verdicttype t_i := str2hex("0101"); } + { template verdicttype t_i := str2int("5"); } + { template verdicttype t_i := str2oct("0101"); } + { template verdicttype t_i := unichar2int(char(0,0,0,0)); } + { template verdicttype t_i := unichar2char(char(0,0,0,0)); } + { template verdicttype t_i := int2bit(1,3); } + { template verdicttype t_i := int2hex(1,3); } + { template verdicttype t_i := int2oct(1,3); } + { template verdicttype t_i := rnd(); } + { template verdicttype t_i := rnd(5.5); } + { template verdicttype t_i := isbound(5.5); } + { template verdicttype t_i := isvalue(5.5); } + { template verdicttype t_i := lengthof("akarmi"); } + { template verdicttype t_i := sizeof(cg_recordof); } + { template verdicttype t_i := regexp("akarmi","akarmi", 0); } + { template verdicttype t_i := match(5,5); } + { template verdicttype t_i := mtc; } + { template verdicttype t_i := system; } + { template verdicttype t_i := self; } + { template verdicttype t_i := any component . running; } + { template verdicttype t_i := all component . running; } + { template verdicttype t_i := any component . alive; } + { template verdicttype t_i := all component . alive; } + { template verdicttype t_i := any timer . running; } + { template verdicttype t_i := f_comp_return().running; } + { template verdicttype t_i := f_comp_return().alive; } + { template verdicttype t_i := TL_t.read; } + { template verdicttype t_i := mycomponent.create; } + { template verdicttype t_i := activate(temp_altstep()); } + { template verdicttype t_i := activate(derefers(temp_altstep_pointer)()); } + { template verdicttype t_i := refers(f_functiontypeValueTest); } + { template verdicttype t_i := refers(ef_ext_function); } + { template verdicttype t_i := refers(as_altstep); } + { template verdicttype t_i := refers(tc_testcase); } +} + +function f_enumeratedValueTests() +{ + timer TL_t := 5; + + { template myenum1 t_i := omit; } + { template myenum1 t_i := xx1; } + { template myenum1 t_i := xx2; } + { template myenum1 t_i := xx3; } + { template myenum1 t_i := (xx1, xx2); } + { template myenum2 t_i := xx4; } + { template myenum2 t_i := xx5; } + + { template myenum1 t_i := null; } + { template myenum1 t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template myenum1 t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template myenum1 t_i := {field1:=1, field1:="akarmi"}; } + { template myenum1 t_i := xx4; } + { template myenum1 t_i := true; } + { template myenum1 t_i := false; } + { template myenum1 t_i := not false; } + { template myenum1 t_i := t_i; } + { template myenum1 t_i := 5; } + { template myenum1 t_i := 5.5; } + { template myenum1 t_i := "akarmi"; } + { template myenum1 t_i := char(0,0,0,0); } + { template myenum1 t_i := 'aa'H; } + { template myenum1 t_i := '00'B; } + { template myenum1 t_i := {1,2,3}; } + { template myenum1 t_i := 5 * 5; } + { template myenum1 t_i := 5 + 5; } + { template myenum1 t_i := 5 - 5; } + { template myenum1 t_i := 5 / 5; } + { template myenum1 t_i := 5 mod 5; } + { template myenum1 t_i := 5 rem 5; } + { template myenum1 t_i := true and true; } + { template myenum1 t_i := true or true; } + { template myenum1 t_i := not4b 'aa'H; } + { template myenum1 t_i := not4b '00'B; } + { template myenum1 t_i := '00'B and4b '00'B; } + { template myenum1 t_i := '00'H and4b '00'H; } + { template myenum1 t_i := '00'B or4b '00'B; } + { template myenum1 t_i := '00'H or4b '00'H; } + { template myenum1 t_i := '00'B xor4b '00'B; } + { template myenum1 t_i := '00'H xor4b '00'H; } + { template myenum1 t_i := '00'B << 1; } + { template myenum1 t_i := '00'H << 1; } + { template myenum1 t_i := '00'B >> 1; } + { template myenum1 t_i := '00'H >> 1; } + { template myenum1 t_i := '00'B <@ 1; } + { template myenum1 t_i := '00'H <@ 1; } + { template myenum1 t_i := '00'B @> 1; } + { template myenum1 t_i := '00'H @> 1; } + { template myenum1 t_i := '00'B & '00'B; } + { template myenum1 t_i := '00'H & '00'H; } + { template myenum1 t_i := "akarmi" & "akarmi2"; } + { template myenum1 t_i := 5 == 5; } + { template myenum1 t_i := 5 != 5; } + { template myenum1 t_i := 5 < 5; } + { template myenum1 t_i := 5 > 5; } + { template myenum1 t_i := 5 <= 5; } + { template myenum1 t_i := 5 >= 5; } + { template myenum1 t_i := bit2hex('00'B); } + { template myenum1 t_i := bit2int('00'B); } + { template myenum1 t_i := bit2oct('00'B); } + { template myenum1 t_i := bit2str('00'B); } + { template myenum1 t_i := char2int("5"); } + { template myenum1 t_i := char2oct("akarmi"); } + { template myenum1 t_i := float2int( 5.5); } + { template myenum1 t_i := float2str(5.5); } + { template myenum1 t_i := hex2int('FF'H); } + { template myenum1 t_i := hex2oct('FF00'H); } + { template myenum1 t_i := hex2str('FF00'H); } + { template myenum1 t_i := int2char(5); } + { template myenum1 t_i := int2float(5); } + { template myenum1 t_i := int2str(5); } + { template myenum1 t_i := int2unichar(5); } + { template myenum1 t_i := oct2bit('00FF'O); } + { template myenum1 t_i := oct2char('0F'O); } + { template myenum1 t_i := oct2hex('0F'O); } + { template myenum1 t_i := oct2int('0F'O); } + { template myenum1 t_i := oct2str('0F'O); } + { template myenum1 t_i := str2bit("0101"); } + { template myenum1 t_i := str2float("5.5"); } + { template myenum1 t_i := str2hex("0101"); } + { template myenum1 t_i := str2int("5"); } + { template myenum1 t_i := str2oct("0101"); } + { template myenum1 t_i := unichar2int(char(0,0,0,0)); } + { template myenum1 t_i := unichar2char(char(0,0,0,0)); } + { template myenum1 t_i := int2bit(1,3); } + { template myenum1 t_i := int2hex(1,3); } + { template myenum1 t_i := int2oct(1,3); } + { template myenum1 t_i := rnd(); } + { template myenum1 t_i := rnd(5.5); } + { template myenum1 t_i := isbound(5.5); } + { template myenum1 t_i := isvalue(5.5); } + { template myenum1 t_i := lengthof("akarmi"); } + { template myenum1 t_i := sizeof(cg_recordof); } + { template myenum1 t_i := regexp("akarmi","akarmi", 0); } + { template myenum1 t_i := match(5,5); } + { template myenum1 t_i := mtc; } + { template myenum1 t_i := system; } + { template myenum1 t_i := self; } + { template myenum1 t_i := any component . running; } + { template myenum1 t_i := all component . running; } + { template myenum1 t_i := any component . alive; } + { template myenum1 t_i := all component . alive; } + { template myenum1 t_i := any timer . running; } + { template myenum1 t_i := f_comp_return().running; } + { template myenum1 t_i := f_comp_return().alive; } + { template myenum1 t_i := TL_t.read; } + { template myenum1 t_i := mycomponent.create; } + { template myenum1 t_i := activate(temp_altstep()); } + { template myenum1 t_i := activate(derefers(temp_altstep_pointer)()); } + { template myenum1 t_i := execute(temp_altstep(), 5); } + { template myenum1 t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template myenum1 t_i := refers(f_functiontypeValueTest); } + { template myenum1 t_i := refers(ef_ext_function); } + { template myenum1 t_i := refers(as_altstep); } + { template myenum1 t_i := refers(tc_testcase); } +} + +function f_defaultValueTests() +{ + timer TL_t := 5; + + { template mydefault t_i := omit; } + { template mydefault t_i := null; } + { template mydefault t_i := activate(temp_altstep()); } + { template mydefault t_i := activate(derefers(temp_altstep_pointer)()); } + { template mydefault t_i := (null, activate(temp_altstep())); } + + { template mydefault t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template mydefault t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template mydefault t_i := {field1:=1, field1:="akarmi"}; } + { template mydefault t_i := xx4; } + { template mydefault t_i := true; } + { template mydefault t_i := false; } + { template mydefault t_i := not false; } + { template mydefault t_i := t_i; } + { template mydefault t_i := 5; } + { template mydefault t_i := 5.5; } + { template mydefault t_i := "akarmi"; } + { template mydefault t_i := char(0,0,0,0); } + { template mydefault t_i := 'aa'H; } + { template mydefault t_i := '00'B; } + { template mydefault t_i := {1,2,3}; } + { template mydefault t_i := 5 * 5; } + { template mydefault t_i := 5 + 5; } + { template mydefault t_i := 5 - 5; } + { template mydefault t_i := 5 / 5; } + { template mydefault t_i := 5 mod 5; } + { template mydefault t_i := 5 rem 5; } + { template mydefault t_i := true and true; } + { template mydefault t_i := true or true; } + { template mydefault t_i := not4b 'aa'H; } + { template mydefault t_i := not4b '00'B; } + { template mydefault t_i := '00'B and4b '00'B; } + { template mydefault t_i := '00'H and4b '00'H; } + { template mydefault t_i := '00'B or4b '00'B; } + { template mydefault t_i := '00'H or4b '00'H; } + { template mydefault t_i := '00'B xor4b '00'B; } + { template mydefault t_i := '00'H xor4b '00'H; } + { template mydefault t_i := '00'B << 1; } + { template mydefault t_i := '00'H << 1; } + { template mydefault t_i := '00'B >> 1; } + { template mydefault t_i := '00'H >> 1; } + { template mydefault t_i := '00'B <@ 1; } + { template mydefault t_i := '00'H <@ 1; } + { template mydefault t_i := '00'B @> 1; } + { template mydefault t_i := '00'H @> 1; } + { template mydefault t_i := '00'B & '00'B; } + { template mydefault t_i := '00'H & '00'H; } + { template mydefault t_i := "akarmi" & "akarmi2"; } + { template mydefault t_i := 5 == 5; } + { template mydefault t_i := 5 != 5; } + { template mydefault t_i := 5 < 5; } + { template mydefault t_i := 5 > 5; } + { template mydefault t_i := 5 <= 5; } + { template mydefault t_i := 5 >= 5; } + { template mydefault t_i := bit2hex('00'B); } + { template mydefault t_i := bit2int('00'B); } + { template mydefault t_i := bit2oct('00'B); } + { template mydefault t_i := bit2str('00'B); } + { template mydefault t_i := char2int("5"); } + { template mydefault t_i := char2oct("akarmi"); } + { template mydefault t_i := float2int( 5.5); } + { template mydefault t_i := float2str(5.5); } + { template mydefault t_i := hex2int('FF'H); } + { template mydefault t_i := hex2oct('FF00'H); } + { template mydefault t_i := hex2str('FF00'H); } + { template mydefault t_i := int2char(5); } + { template mydefault t_i := int2float(5); } + { template mydefault t_i := int2str(5); } + { template mydefault t_i := int2unichar(5); } + { template mydefault t_i := oct2bit('00FF'O); } + { template mydefault t_i := oct2char('0F'O); } + { template mydefault t_i := oct2hex('0F'O); } + { template mydefault t_i := oct2int('0F'O); } + { template mydefault t_i := oct2str('0F'O); } + { template mydefault t_i := str2bit("0101"); } + { template mydefault t_i := str2float("5.5"); } + { template mydefault t_i := str2hex("0101"); } + { template mydefault t_i := str2int("5"); } + { template mydefault t_i := str2oct("0101"); } + { template mydefault t_i := unichar2int(char(0,0,0,0)); } + { template mydefault t_i := unichar2char(char(0,0,0,0)); } + { template mydefault t_i := int2bit(1,3); } + { template mydefault t_i := int2hex(1,3); } + { template mydefault t_i := int2oct(1,3); } + { template mydefault t_i := rnd(); } + { template mydefault t_i := rnd(5.5); } + { template mydefault t_i := isbound(5.5); } + { template mydefault t_i := isvalue(5.5); } + { template mydefault t_i := lengthof("akarmi"); } + { template mydefault t_i := sizeof(cg_recordof); } + { template mydefault t_i := regexp("akarmi","akarmi", 0); } + { template mydefault t_i := match(5,5); } + { template mydefault t_i := mtc; } + { template mydefault t_i := system; } + { template mydefault t_i := self; } + { template mydefault t_i := any component . running; } + { template mydefault t_i := all component . running; } + { template mydefault t_i := any component . alive; } + { template mydefault t_i := all component . alive; } + { template mydefault t_i := any timer . running; } + { template mydefault t_i := f_comp_return().running; } + { template mydefault t_i := f_comp_return().alive; } + { template mydefault t_i := TL_t.read; } + { template mydefault t_i := mycomponent.create; } + { template mydefault t_i := execute(temp_altstep(), 5); } + { template mydefault t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template mydefault t_i := refers(f_functiontypeValueTest); } + { template mydefault t_i := refers(ef_ext_function); } + { template mydefault t_i := refers(as_altstep); } + { template mydefault t_i := refers(tc_testcase); } +} + +function f_charstringValueTests() +{ + timer TL_t := 5; + + { template charstring t_i := omit; } + { template charstring t_i := "akarmi"; } + { template charstring t_i := "akarmi" & "akarmi2"; } + { template charstring t_i := ("akarmi", "akarmi2"); } + { template charstring t_i := bit2str('00'B); } + { template charstring t_i := float2str(5.5); } + { template charstring t_i := hex2str('FF00'H); } + { template charstring t_i := int2char(5); } + { template charstring t_i := int2str(5); } + { template charstring t_i := int2unichar(5); } + { template charstring t_i := oct2char('0F'O); } + { template charstring t_i := oct2str('0F'O); } + { template charstring t_i := unichar2char(char(0,0,0,0)); } + { template charstring t_i := regexp("akarmi","akarmi", 0); } + + { template charstring t_i := null; } + { template charstring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template charstring t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template charstring t_i := {field1:=1, field1:="akarmi"}; } + { template charstring t_i := xx4; } + { template charstring t_i := true; } + { template charstring t_i := false; } + { template charstring t_i := not false; } + { template charstring t_i := t_i; } + { template charstring t_i := 5; } + { template charstring t_i := 5.5; } + { template charstring t_i := 'aa'H; } + { template charstring t_i := '00'B; } + { template charstring t_i := {1,2,3}; } + { template charstring t_i := 5 * 5; } + { template charstring t_i := 5 + 5; } + { template charstring t_i := 5 - 5; } + { template charstring t_i := 5 / 5; } + { template charstring t_i := 5 mod 5; } + { template charstring t_i := 5 rem 5; } + { template charstring t_i := true and true; } + { template charstring t_i := true or true; } + { template charstring t_i := not4b 'aa'H; } + { template charstring t_i := not4b '00'B; } + { template charstring t_i := '00'B and4b '00'B; } + { template charstring t_i := '00'H and4b '00'H; } + { template charstring t_i := '00'B or4b '00'B; } + { template charstring t_i := '00'H or4b '00'H; } + { template charstring t_i := '00'B xor4b '00'B; } + { template charstring t_i := '00'H xor4b '00'H; } + { template charstring t_i := '00'B << 1; } + { template charstring t_i := '00'H << 1; } + { template charstring t_i := '00'B >> 1; } + { template charstring t_i := '00'H >> 1; } + { template charstring t_i := '00'B <@ 1; } + { template charstring t_i := '00'H <@ 1; } + { template charstring t_i := '00'B @> 1; } + { template charstring t_i := '00'H @> 1; } + { template charstring t_i := '00'B & '00'B; } + { template charstring t_i := '00'H & '00'H; } + { template charstring t_i := 5 == 5; } + { template charstring t_i := 5 != 5; } + { template charstring t_i := 5 < 5; } + { template charstring t_i := 5 > 5; } + { template charstring t_i := 5 <= 5; } + { template charstring t_i := 5 >= 5; } + { template charstring t_i := bit2hex('00'B); } + { template charstring t_i := bit2int('00'B); } + { template charstring t_i := bit2oct('00'B); } + { template charstring t_i := char2int("5"); } + { template charstring t_i := char2oct("akarmi"); } + { template charstring t_i := float2int( 5.5); } + { template charstring t_i := hex2int('FF'H); } + { template charstring t_i := hex2oct('FF00'H); } + { template charstring t_i := int2float(5); } + { template charstring t_i := oct2bit('0F'O); } + { template charstring t_i := oct2hex('0F'O); } + { template charstring t_i := oct2int('0F'O); } + { template charstring t_i := str2bit("0101"); } + { template charstring t_i := str2float("5.5"); } + { template charstring t_i := str2hex("0101"); } + { template charstring t_i := str2int("5"); } + { template charstring t_i := str2oct("0101"); } + { template charstring t_i := unichar2int(char(0,0,0,0)); } + { template charstring t_i := int2bit(1,3); } + { template charstring t_i := int2hex(1,3); } + { template charstring t_i := int2oct(1,3); } + { template charstring t_i := rnd(); } + { template charstring t_i := rnd(5.5); } + { template charstring t_i := isbound(5.5); } + { template charstring t_i := isvalue(5.5); } + { template charstring t_i := lengthof("akarmi"); } + { template charstring t_i := sizeof(cg_recordof); } + { template charstring t_i := match(5,5); } + { template charstring t_i := mtc; } + { template charstring t_i := system; } + { template charstring t_i := self; } + { template charstring t_i := any component . running; } + { template charstring t_i := all component . running; } + { template charstring t_i := any component . alive; } + { template charstring t_i := all component . alive; } + { template charstring t_i := any timer . running; } + { template charstring t_i := f_comp_return().running; } + { template charstring t_i := f_comp_return().alive; } + { template charstring t_i := TL_t.read; } + { template charstring t_i := mycomponent.create; } + { template charstring t_i := activate(temp_altstep()); } + { template charstring t_i := activate(derefers(temp_altstep_pointer)()); } + { template charstring t_i := execute(temp_altstep(), 5); } + { template charstring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template charstring t_i := refers(f_functiontypeValueTest); } + { template charstring t_i := refers(ef_ext_function); } + { template charstring t_i := refers(as_altstep); } + { template charstring t_i := refers(tc_testcase); } +} + +function f_universalcharstringValueTests() +{ + timer TL_t := 5; + + { template universal charstring t_i := omit; } + { template universal charstring t_i := "akarmi"; } + { template universal charstring t_i := char(0,0,0,0); } + { template universal charstring t_i := (char(0,0,0,0), "0"); } + { template universal charstring t_i := "akarmi" & "akarmi2"; } + { template universal charstring t_i := bit2str('00'B); } + { template universal charstring t_i := float2str(5.5); } + { template universal charstring t_i := hex2str('FF00'H); } + { template universal charstring t_i := int2char(5); } + { template universal charstring t_i := int2str(5); } + { template universal charstring t_i := int2unichar(5); } + { template universal charstring t_i := oct2char('0F'O); } + { template universal charstring t_i := oct2str('0F'O); } + { template universal charstring t_i := regexp("akarmi","akarmi", 0); } + + { template universal charstring t_i := null; } + { template universal charstring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template universal charstring t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template universal charstring t_i := {field1:=1, field1:="akarmi"}; } + { template universal charstring t_i := xx4; } + { template universal charstring t_i := true; } + { template universal charstring t_i := false; } + { template universal charstring t_i := not false; } + { template universal charstring t_i := t_i; } + { template universal charstring t_i := 5; } + { template universal charstring t_i := 5.5; } + { template universal charstring t_i := 'aa'H; } + { template universal charstring t_i := '00'B; } + { template universal charstring t_i := {1,2,3}; } + { template universal charstring t_i := 5 * 5; } + { template universal charstring t_i := 5 + 5; } + { template universal charstring t_i := 5 - 5; } + { template universal charstring t_i := 5 / 5; } + { template universal charstring t_i := 5 mod 5; } + { template universal charstring t_i := 5 rem 5; } + { template universal charstring t_i := true and true; } + { template universal charstring t_i := true or true; } + { template universal charstring t_i := not4b 'aa'H; } + { template universal charstring t_i := not4b '00'B; } + { template universal charstring t_i := '00'B and4b '00'B; } + { template universal charstring t_i := '00'H and4b '00'H; } + { template universal charstring t_i := '00'B or4b '00'B; } + { template universal charstring t_i := '00'H or4b '00'H; } + { template universal charstring t_i := '00'B xor4b '00'B; } + { template universal charstring t_i := '00'H xor4b '00'H; } + { template universal charstring t_i := '00'B << 1; } + { template universal charstring t_i := '00'H << 1; } + { template universal charstring t_i := '00'B >> 1; } + { template universal charstring t_i := '00'H >> 1; } + { template universal charstring t_i := '00'B <@ 1; } + { template universal charstring t_i := '00'H <@ 1; } + { template universal charstring t_i := '00'B @> 1; } + { template universal charstring t_i := '00'H @> 1; } + { template universal charstring t_i := '00'B & '00'B; } + { template universal charstring t_i := '00'H & '00'H; } + { template universal charstring t_i := 5 == 5; } + { template universal charstring t_i := 5 != 5; } + { template universal charstring t_i := 5 < 5; } + { template universal charstring t_i := 5 > 5; } + { template universal charstring t_i := 5 <= 5; } + { template universal charstring t_i := 5 >= 5; } + { template universal charstring t_i := bit2hex('00'B); } + { template universal charstring t_i := bit2int('00'B); } + { template universal charstring t_i := bit2oct('00'B); } + { template universal charstring t_i := char2int("5"); } + { template universal charstring t_i := char2oct("akarmi"); } + { template universal charstring t_i := float2int( 5.5); } + { template universal charstring t_i := hex2int('FF'H); } + { template universal charstring t_i := hex2oct('FF00'H); } + { template universal charstring t_i := int2float(5); } + { template universal charstring t_i := oct2bit('00FF'O); } + { template universal charstring t_i := oct2hex('0F'O); } + { template universal charstring t_i := oct2int('0F'O); } + { template universal charstring t_i := str2bit("0101"); } + { template universal charstring t_i := str2float("5.5"); } + { template universal charstring t_i := str2hex("0101"); } + { template universal charstring t_i := str2int("5"); } + { template universal charstring t_i := str2oct("0101"); } + { template universal charstring t_i := unichar2int(char(0,0,0,0)); } + { template universal charstring t_i := unichar2char(char(0,0,0,0)); } + { template universal charstring t_i := int2bit(1,3); } + { template universal charstring t_i := int2hex(1,3); } + { template universal charstring t_i := int2oct(1,3); } + { template universal charstring t_i := rnd(); } + { template universal charstring t_i := rnd(5.5); } + { template universal charstring t_i := isbound(5.5); } + { template universal charstring t_i := isvalue(5.5); } + { template universal charstring t_i := lengthof("akarmi"); } + { template universal charstring t_i := sizeof(cg_recordof); } + { template universal charstring t_i := match(5,5); } + { template universal charstring t_i := mtc; } + { template universal charstring t_i := system; } + { template universal charstring t_i := self; } + { template universal charstring t_i := any component . running; } + { template universal charstring t_i := all component . running; } + { template universal charstring t_i := any component . alive; } + { template universal charstring t_i := all component . alive; } + { template universal charstring t_i := any timer . running; } + { template universal charstring t_i := f_comp_return().running; } + { template universal charstring t_i := f_comp_return().alive; } + { template universal charstring t_i := TL_t.read; } + { template universal charstring t_i := mycomponent.create; } + { template universal charstring t_i := activate(temp_altstep()); } + { template universal charstring t_i := activate(derefers(temp_altstep_pointer)()); } + { template universal charstring t_i := execute(temp_altstep(), 5); } + { template universal charstring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template universal charstring t_i := refers(f_functiontypeValueTest); } + { template universal charstring t_i := refers(ef_ext_function); } + { template universal charstring t_i := refers(as_altstep); } + { template universal charstring t_i := refers(tc_testcase); } +} + +function f_componentValueTests() +{ + timer TL_t := 5; + + { template mycomponent t_i := omit; } + { template mycomponent t_i := null; } + { template mycomponent t_i := mtc; } + { template mycomponent t_i := system; } + { template mycomponent t_i := self; } + { template mycomponent t_i := (mtc, system, null, self); } + { template mycomponent t_i := mycomponent.create; } + + { template mycomponent t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template mycomponent t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template mycomponent t_i := {field1:=1, field1:="akarmi"}; } + { template mycomponent t_i := xx4; } + { template mycomponent t_i := true; } + { template mycomponent t_i := false; } + { template mycomponent t_i := not false; } + { template mycomponent t_i := t_i; } + { template mycomponent t_i := 5; } + { template mycomponent t_i := 5.5; } + { template mycomponent t_i := "akarmi"; } + { template mycomponent t_i := char(0,0,0,0); } + { template mycomponent t_i := 'aa'H; } + { template mycomponent t_i := '00'B; } + { template mycomponent t_i := {1,2,3}; } + { template mycomponent t_i := 5 * 5; } + { template mycomponent t_i := 5 + 5; } + { template mycomponent t_i := 5 - 5; } + { template mycomponent t_i := 5 / 5; } + { template mycomponent t_i := 5 mod 5; } + { template mycomponent t_i := 5 rem 5; } + { template mycomponent t_i := true and true; } + { template mycomponent t_i := true or true; } + { template mycomponent t_i := not4b 'aa'H; } + { template mycomponent t_i := not4b '00'B; } + { template mycomponent t_i := '00'B and4b '00'B; } + { template mycomponent t_i := '00'H and4b '00'H; } + { template mycomponent t_i := '00'B or4b '00'B; } + { template mycomponent t_i := '00'H or4b '00'H; } + { template mycomponent t_i := '00'B xor4b '00'B; } + { template mycomponent t_i := '00'H xor4b '00'H; } + { template mycomponent t_i := '00'B << 1; } + { template mycomponent t_i := '00'H << 1; } + { template mycomponent t_i := '00'B >> 1; } + { template mycomponent t_i := '00'H >> 1; } + { template mycomponent t_i := '00'B <@ 1; } + { template mycomponent t_i := '00'H <@ 1; } + { template mycomponent t_i := '00'B @> 1; } + { template mycomponent t_i := '00'H @> 1; } + { template mycomponent t_i := '00'B & '00'B; } + { template mycomponent t_i := '00'H & '00'H; } + { template mycomponent t_i := "akarmi" & "akarmi2"; } + { template mycomponent t_i := 5 == 5; } + { template mycomponent t_i := 5 != 5; } + { template mycomponent t_i := 5 < 5; } + { template mycomponent t_i := 5 > 5; } + { template mycomponent t_i := 5 <= 5; } + { template mycomponent t_i := 5 >= 5; } + { template mycomponent t_i := bit2hex('00'B); } + { template mycomponent t_i := bit2int('00'B); } + { template mycomponent t_i := bit2oct('00'B); } + { template mycomponent t_i := bit2str('00'B); } + { template mycomponent t_i := char2int("5"); } + { template mycomponent t_i := char2oct("akarmi"); } + { template mycomponent t_i := float2int( 5.5); } + { template mycomponent t_i := float2str(5.5); } + { template mycomponent t_i := hex2int('FF'H); } + { template mycomponent t_i := hex2oct('FF00'H); } + { template mycomponent t_i := hex2str('FF00'H); } + { template mycomponent t_i := int2char(5); } + { template mycomponent t_i := int2float(5); } + { template mycomponent t_i := int2str(5); } + { template mycomponent t_i := int2unichar(5); } + { template mycomponent t_i := oct2bit('00FF'O); } + { template mycomponent t_i := oct2char('0F'O); } + { template mycomponent t_i := oct2hex('0F'O); } + { template mycomponent t_i := oct2int('0F'O); } + { template mycomponent t_i := oct2str('0F'O); } + { template mycomponent t_i := str2bit("0101"); } + { template mycomponent t_i := str2float("5.5"); } + { template mycomponent t_i := str2hex("0101"); } + { template mycomponent t_i := str2int("5"); } + { template mycomponent t_i := str2oct("0101"); } + { template mycomponent t_i := unichar2int(char(0,0,0,0)); } + { template mycomponent t_i := unichar2char(char(0,0,0,0)); } + { template mycomponent t_i := int2bit(1,3); } + { template mycomponent t_i := int2hex(1,3); } + { template mycomponent t_i := int2oct(1,3); } + { template mycomponent t_i := rnd(); } + { template mycomponent t_i := rnd(5.5); } + { template mycomponent t_i := isbound(5.5); } + { template mycomponent t_i := isvalue(5.5); } + { template mycomponent t_i := lengthof("akarmi"); } + { template mycomponent t_i := sizeof(cg_recordof); } + { template mycomponent t_i := regexp("akarmi","akarmi", 0); } + { template mycomponent t_i := match(5,5); } + { template mycomponent t_i := any component . running; } + { template mycomponent t_i := all component . running; } + { template mycomponent t_i := any component . alive; } + { template mycomponent t_i := all component . alive; } + { template mycomponent t_i := any timer . running; } + { template mycomponent t_i := f_comp_return().running; } + { template mycomponent t_i := f_comp_return().alive; } + { template mycomponent t_i := TL_t.read; } + { template mycomponent t_i := activate(temp_altstep()); } + { template mycomponent t_i := activate(derefers(temp_altstep_pointer)()); } + { template mycomponent t_i := execute(temp_altstep(), 5); } + { template mycomponent t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template mycomponent t_i := refers(f_functiontypeValueTest); } + { template mycomponent t_i := refers(ef_ext_function); } + { template mycomponent t_i := refers(as_altstep); } + { template mycomponent t_i := refers(tc_testcase); } +} + +function f_recordofValueTests() +{ + timer TL_t := 5; + + { template myrecordofType t_i := omit; } + { template myrecordofType t_i := {}; } + { template myrecordofType t_i := {1,2,3,4}; } + { template myrecordofType t_i := {[0] := 0, [1] := 1}; } + + { template myrecordofType t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template myrecordofType t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template myrecordofType t_i := {field1:=1, field1:="akarmi"}; } + { template myrecordofType t_i := null; } + { template myrecordofType t_i := xx4; } + { template myrecordofType t_i := true; } + { template myrecordofType t_i := false; } + { template myrecordofType t_i := not false; } + { template myrecordofType t_i := t_i; } + { template myrecordofType t_i := 5; } + { template myrecordofType t_i := 5.5; } + { template myrecordofType t_i := "akarmi"; } + { template myrecordofType t_i := char(0,0,0,0); } + { template myrecordofType t_i := 'aa'H; } + { template myrecordofType t_i := '00'B; } + { template myrecordofType t_i := 5 * 5; } + { template myrecordofType t_i := 5 + 5; } + { template myrecordofType t_i := 5 - 5; } + { template myrecordofType t_i := 5 / 5; } + { template myrecordofType t_i := 5 mod 5; } + { template myrecordofType t_i := 5 rem 5; } + { template myrecordofType t_i := true and true; } + { template myrecordofType t_i := true or true; } + { template myrecordofType t_i := not4b 'aa'H; } + { template myrecordofType t_i := not4b '00'B; } + { template myrecordofType t_i := '00'B and4b '00'B; } + { template myrecordofType t_i := '00'H and4b '00'H; } + { template myrecordofType t_i := '00'B or4b '00'B; } + { template myrecordofType t_i := '00'H or4b '00'H; } + { template myrecordofType t_i := '00'B xor4b '00'B; } + { template myrecordofType t_i := '00'H xor4b '00'H; } + { template myrecordofType t_i := '00'B << 1; } + { template myrecordofType t_i := '00'H << 1; } + { template myrecordofType t_i := '00'B >> 1; } + { template myrecordofType t_i := '00'H >> 1; } + { template myrecordofType t_i := '00'B <@ 1; } + { template myrecordofType t_i := '00'H <@ 1; } + { template myrecordofType t_i := '00'B @> 1; } + { template myrecordofType t_i := '00'H @> 1; } + { template myrecordofType t_i := '00'B & '00'B; } + { template myrecordofType t_i := '00'H & '00'H; } + { template myrecordofType t_i := "akarmi" & "akarmi2"; } + { template myrecordofType t_i := 5 == 5; } + { template myrecordofType t_i := 5 != 5; } + { template myrecordofType t_i := 5 < 5; } + { template myrecordofType t_i := 5 > 5; } + { template myrecordofType t_i := 5 <= 5; } + { template myrecordofType t_i := 5 >= 5; } + { template myrecordofType t_i := bit2hex('00'B); } + { template myrecordofType t_i := bit2int('00'B); } + { template myrecordofType t_i := bit2oct('00'B); } + { template myrecordofType t_i := bit2str('00'B); } + { template myrecordofType t_i := char2int("5"); } + { template myrecordofType t_i := char2oct("akarmi"); } + { template myrecordofType t_i := float2int( 5.5); } + { template myrecordofType t_i := float2str(5.5); } + { template myrecordofType t_i := hex2int('FF'H); } + { template myrecordofType t_i := hex2oct('FF00'H); } + { template myrecordofType t_i := hex2str('FF00'H); } + { template myrecordofType t_i := int2char(5); } + { template myrecordofType t_i := int2float(5); } + { template myrecordofType t_i := int2str(5); } + { template myrecordofType t_i := int2unichar(5); } + { template myrecordofType t_i := oct2bit('00FF'O); } + { template myrecordofType t_i := oct2char('0F'O); } + { template myrecordofType t_i := oct2hex('0F'O); } + { template myrecordofType t_i := oct2int('0F'O); } + { template myrecordofType t_i := oct2str('0F'O); } + { template myrecordofType t_i := str2bit("0101"); } + { template myrecordofType t_i := str2float("5.5"); } + { template myrecordofType t_i := str2hex("0101"); } + { template myrecordofType t_i := str2int("5"); } + { template myrecordofType t_i := str2oct("0101"); } + { template myrecordofType t_i := unichar2int(char(0,0,0,0)); } + { template myrecordofType t_i := unichar2char(char(0,0,0,0)); } + { template myrecordofType t_i := int2bit(1,3); } + { template myrecordofType t_i := int2hex(1,3); } + { template myrecordofType t_i := int2oct(1,3); } + { template myrecordofType t_i := rnd(); } + { template myrecordofType t_i := rnd(5.5); } + { template myrecordofType t_i := isbound(5.5); } + { template myrecordofType t_i := isvalue(5.5); } + { template myrecordofType t_i := lengthof("akarmi"); } + { template myrecordofType t_i := sizeof(cg_recordof); } + { template myrecordofType t_i := regexp("akarmi","akarmi", 0); } + { template myrecordofType t_i := match(5,5); } + { template myrecordofType t_i := mtc; } + { template myrecordofType t_i := system; } + { template myrecordofType t_i := self; } + { template myrecordofType t_i := any component . running; } + { template myrecordofType t_i := all component . running; } + { template myrecordofType t_i := any component . alive; } + { template myrecordofType t_i := all component . alive; } + { template myrecordofType t_i := any timer . running; } + { template myrecordofType t_i := f_comp_return().running; } + { template myrecordofType t_i := f_comp_return().alive; } + { template myrecordofType t_i := TL_t.read; } + { template myrecordofType t_i := mycomponent.create; } + { template myrecordofType t_i := activate(temp_altstep()); } + { template myrecordofType t_i := activate(derefers(temp_altstep_pointer)()); } + { template myrecordofType t_i := execute(temp_altstep(), 5); } + { template myrecordofType t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template myrecordofType t_i := refers(f_functiontypeValueTest); } + { template myrecordofType t_i := refers(ef_ext_function); } + { template myrecordofType t_i := refers(as_altstep); } + { template myrecordofType t_i := refers(tc_testcase); } + { template myrecordofType t_i := {[t] := 0, [-1] := 1, [1] := 1, [1] := 5, [99999999999999999] := 1}; } +} + +function f_setofValueTests() +{ + timer TL_t := 5; + + { template mysetofType t_i := omit; } + { template mysetofType t_i := {}; } + { template mysetofType t_i := {1,2,3,4}; } + { template mysetofType t_i := {[0] := 0, [1] := 1}; } + { template mysetofType t_i := subset(1,2,3); } + { template mysetofType t_i := superset(1,2,3); } + + { template mysetofType t_i := subset(1,2,3,*); } + { template mysetofType t_i := superset(1,2,3,*); } + + { template mysetofType t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template mysetofType t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template mysetofType t_i := {field1:=1, field1:="akarmi"}; } + { template mysetofType t_i := null; } + { template mysetofType t_i := xx4; } + { template mysetofType t_i := true; } + { template mysetofType t_i := false; } + { template mysetofType t_i := not false; } + { template mysetofType t_i := t_i; } + { template mysetofType t_i := 5; } + { template mysetofType t_i := 5.5; } + { template mysetofType t_i := "akarmi"; } + { template mysetofType t_i := char(0,0,0,0); } + { template mysetofType t_i := 'aa'H; } + { template mysetofType t_i := '00'B; } + { template mysetofType t_i := 5 * 5; } + { template mysetofType t_i := 5 + 5; } + { template mysetofType t_i := 5 - 5; } + { template mysetofType t_i := 5 / 5; } + { template mysetofType t_i := 5 mod 5; } + { template mysetofType t_i := 5 rem 5; } + { template mysetofType t_i := true and true; } + { template mysetofType t_i := true or true; } + { template mysetofType t_i := not4b 'aa'H; } + { template mysetofType t_i := not4b '00'B; } + { template mysetofType t_i := '00'B and4b '00'B; } + { template mysetofType t_i := '00'H and4b '00'H; } + { template mysetofType t_i := '00'B or4b '00'B; } + { template mysetofType t_i := '00'H or4b '00'H; } + { template mysetofType t_i := '00'B xor4b '00'B; } + { template mysetofType t_i := '00'H xor4b '00'H; } + { template mysetofType t_i := '00'B << 1; } + { template mysetofType t_i := '00'H << 1; } + { template mysetofType t_i := '00'B >> 1; } + { template mysetofType t_i := '00'H >> 1; } + { template mysetofType t_i := '00'B <@ 1; } + { template mysetofType t_i := '00'H <@ 1; } + { template mysetofType t_i := '00'B @> 1; } + { template mysetofType t_i := '00'H @> 1; } + { template mysetofType t_i := '00'B & '00'B; } + { template mysetofType t_i := '00'H & '00'H; } + { template mysetofType t_i := "akarmi" & "akarmi2"; } + { template mysetofType t_i := 5 == 5; } + { template mysetofType t_i := 5 != 5; } + { template mysetofType t_i := 5 < 5; } + { template mysetofType t_i := 5 > 5; } + { template mysetofType t_i := 5 <= 5; } + { template mysetofType t_i := 5 >= 5; } + { template mysetofType t_i := bit2hex('00'B); } + { template mysetofType t_i := bit2int('00'B); } + { template mysetofType t_i := bit2oct('00'B); } + { template mysetofType t_i := bit2str('00'B); } + { template mysetofType t_i := char2int("5"); } + { template mysetofType t_i := char2oct("akarmi"); } + { template mysetofType t_i := float2int( 5.5); } + { template mysetofType t_i := float2str(5.5); } + { template mysetofType t_i := hex2int('FF'H); } + { template mysetofType t_i := hex2oct('FF00'H); } + { template mysetofType t_i := hex2str('FF00'H); } + { template mysetofType t_i := int2char(5); } + { template mysetofType t_i := int2float(5); } + { template mysetofType t_i := int2str(5); } + { template mysetofType t_i := int2unichar(5); } + { template mysetofType t_i := oct2bit('00FF'O); } + { template mysetofType t_i := oct2char('0F'O); } + { template mysetofType t_i := oct2hex('0F'O); } + { template mysetofType t_i := oct2int('0F'O); } + { template mysetofType t_i := oct2str('0F'O); } + { template mysetofType t_i := str2bit("0101"); } + { template mysetofType t_i := str2float("5.5"); } + { template mysetofType t_i := str2hex("0101"); } + { template mysetofType t_i := str2int("5"); } + { template mysetofType t_i := str2oct("0101"); } + { template mysetofType t_i := unichar2int(char(0,0,0,0)); } + { template mysetofType t_i := unichar2char(char(0,0,0,0)); } + { template mysetofType t_i := int2bit(1,3); } + { template mysetofType t_i := int2hex(1,3); } + { template mysetofType t_i := int2oct(1,3); } + { template mysetofType t_i := rnd(); } + { template mysetofType t_i := rnd(5.5); } + { template mysetofType t_i := isbound(5.5); } + { template mysetofType t_i := isvalue(5.5); } + { template mysetofType t_i := lengthof("akarmi"); } + { template mysetofType t_i := sizeof(cg_recordof); } + { template mysetofType t_i := regexp("akarmi","akarmi", 0); } + { template mysetofType t_i := match(5,5); } + { template mysetofType t_i := mtc; } + { template mysetofType t_i := system; } + { template mysetofType t_i := self; } + { template mysetofType t_i := any component . running; } + { template mysetofType t_i := all component . running; } + { template mysetofType t_i := any component . alive; } + { template mysetofType t_i := all component . alive; } + { template mysetofType t_i := any timer . running; } + { template mysetofType t_i := f_comp_return().running; } + { template mysetofType t_i := f_comp_return().alive; } + { template mysetofType t_i := TL_t.read; } + { template mysetofType t_i := mycomponent.create; } + { template mysetofType t_i := activate(temp_altstep()); } + { template mysetofType t_i := activate(derefers(temp_altstep_pointer)()); } + { template mysetofType t_i := execute(temp_altstep(), 5); } + { template mysetofType t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template mysetofType t_i := refers(f_functiontypeValueTest); } + { template mysetofType t_i := refers(ef_ext_function); } + { template mysetofType t_i := refers(as_altstep); } + { template mysetofType t_i := refers(tc_testcase); } + { template mysetofType t_i := {[t] := 0, [-1] := 1, [1] := 1, [1] := 5, [99999999999999999] := 1}; } +} + +function f_setValueTests() +{ + timer TL_t := 5; + + { template ASNSetType t_i := omit; } + { template ASNSetType t_i := {field1:=1, field2:="akarmi"}; } + + { template ASNSetType t_i := {field2:=1}; } + { template ASNSetType t_i := {field3:=1}; } + { template ASNSetType t_i := {field1:=1, field1:="akarmi"}; } + { template ASNSetType t_i := {1, "akarmi"}; } + { template ASNSetType t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template ASNSetType t_i := {field1:='00'O, field2:='00'B}; } + { template ASNSetType t_i := null; } + { template ASNSetType t_i := xx4; } + { template ASNSetType t_i := true; } + { template ASNSetType t_i := false; } + { template ASNSetType t_i := not false; } + { template ASNSetType t_i := t_i; } + { template ASNSetType t_i := 5; } + { template ASNSetType t_i := 5.5; } + { template ASNSetType t_i := "akarmi"; } + { template ASNSetType t_i := char(0,0,0,0); } + { template ASNSetType t_i := 'aa'H; } + { template ASNSetType t_i := '00'B; } + { template ASNSetType t_i := 5 * 5; } + { template ASNSetType t_i := 5 + 5; } + { template ASNSetType t_i := 5 - 5; } + { template ASNSetType t_i := 5 / 5; } + { template ASNSetType t_i := 5 mod 5; } + { template ASNSetType t_i := 5 rem 5; } + { template ASNSetType t_i := true and true; } + { template ASNSetType t_i := true or true; } + { template ASNSetType t_i := not4b 'aa'H; } + { template ASNSetType t_i := not4b '00'B; } + { template ASNSetType t_i := '00'B and4b '00'B; } + { template ASNSetType t_i := '00'H and4b '00'H; } + { template ASNSetType t_i := '00'B or4b '00'B; } + { template ASNSetType t_i := '00'H or4b '00'H; } + { template ASNSetType t_i := '00'B xor4b '00'B; } + { template ASNSetType t_i := '00'H xor4b '00'H; } + { template ASNSetType t_i := '00'B << 1; } + { template ASNSetType t_i := '00'H << 1; } + { template ASNSetType t_i := '00'B >> 1; } + { template ASNSetType t_i := '00'H >> 1; } + { template ASNSetType t_i := '00'B <@ 1; } + { template ASNSetType t_i := '00'H <@ 1; } + { template ASNSetType t_i := '00'B @> 1; } + { template ASNSetType t_i := '00'H @> 1; } + { template ASNSetType t_i := '00'B & '00'B; } + { template ASNSetType t_i := '00'H & '00'H; } + { template ASNSetType t_i := "akarmi" & "akarmi2"; } + { template ASNSetType t_i := 5 == 5; } + { template ASNSetType t_i := 5 != 5; } + { template ASNSetType t_i := 5 < 5; } + { template ASNSetType t_i := 5 > 5; } + { template ASNSetType t_i := 5 <= 5; } + { template ASNSetType t_i := 5 >= 5; } + { template ASNSetType t_i := bit2hex('00'B); } + { template ASNSetType t_i := bit2int('00'B); } + { template ASNSetType t_i := bit2oct('00'B); } + { template ASNSetType t_i := bit2str('00'B); } + { template ASNSetType t_i := char2int("5"); } + { template ASNSetType t_i := char2oct("akarmi"); } + { template ASNSetType t_i := float2int( 5.5); } + { template ASNSetType t_i := float2str(5.5); } + { template ASNSetType t_i := hex2int('FF'H); } + { template ASNSetType t_i := hex2oct('FF00'H); } + { template ASNSetType t_i := hex2str('FF00'H); } + { template ASNSetType t_i := int2char(5); } + { template ASNSetType t_i := int2float(5); } + { template ASNSetType t_i := int2str(5); } + { template ASNSetType t_i := int2unichar(5); } + { template ASNSetType t_i := oct2bit('00FF'O); } + { template ASNSetType t_i := oct2char('0F'O); } + { template ASNSetType t_i := oct2hex('0F'O); } + { template ASNSetType t_i := oct2int('0F'O); } + { template ASNSetType t_i := oct2str('0F'O); } + { template ASNSetType t_i := str2bit("0101"); } + { template ASNSetType t_i := str2float("5.5"); } + { template ASNSetType t_i := str2hex("0101"); } + { template ASNSetType t_i := str2int("5"); } + { template ASNSetType t_i := str2oct("0101"); } + { template ASNSetType t_i := unichar2int(char(0,0,0,0)); } + { template ASNSetType t_i := unichar2char(char(0,0,0,0)); } + { template ASNSetType t_i := int2bit(1,3); } + { template ASNSetType t_i := int2hex(1,3); } + { template ASNSetType t_i := int2oct(1,3); } + { template ASNSetType t_i := rnd(); } + { template ASNSetType t_i := rnd(5.5); } + { template ASNSetType t_i := isbound(5.5); } + { template ASNSetType t_i := isvalue(5.5); } + { template ASNSetType t_i := lengthof("akarmi"); } + { template ASNSetType t_i := sizeof(cg_recordof); } + { template ASNSetType t_i := regexp("akarmi","akarmi", 0); } + { template ASNSetType t_i := match(5,5); } + { template ASNSetType t_i := mtc; } + { template ASNSetType t_i := system; } + { template ASNSetType t_i := self; } + { template ASNSetType t_i := any component . running; } + { template ASNSetType t_i := all component . running; } + { template ASNSetType t_i := any component . alive; } + { template ASNSetType t_i := all component . alive; } + { template ASNSetType t_i := any timer . running; } + { template ASNSetType t_i := f_comp_return().running; } + { template ASNSetType t_i := f_comp_return().alive; } + { template ASNSetType t_i := TL_t.read; } + { template ASNSetType t_i := mycomponent.create; } + { template ASNSetType t_i := activate(temp_altstep()); } + { template ASNSetType t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNSetType t_i := execute(temp_altstep(), 5); } + { template ASNSetType t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNSetType t_i := refers(f_functiontypeValueTest); } + { template ASNSetType t_i := refers(ef_ext_function); } + { template ASNSetType t_i := refers(as_altstep); } + { template ASNSetType t_i := refers(tc_testcase); } +} + +function f_recordValueTests() +{ + timer TL_t := 5; + + { template ASNSequenceType t_i := omit; } + { template ASNSequenceType t_i := {field1:=1, field2:="akarmi", field3:=omit}; } + + { template ASNSequenceType t_i := {}; } + { template ASNSequenceType t_i := {1,"akarmi",3,4,5}; } + { template ASNSequenceType t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template ASNSequenceType t_i := {field2:=1}; } + { template ASNSequenceType t_i := {field4:=1}; } + { template ASNSequenceType t_i := {field1:=1, field1:="akarmi"}; } + { template ASNSequenceType t_i := {field1:=omit, field2:=omit}; } + { template ASNSequenceType t_i := {field2:="akarmi", field1:=1}; } + { template ASNSequenceType t_i := {1}; } + { template ASNSequenceType t_i := {1,2,3}; } + { template ASNSequenceType t_i := {-,-}; } + { template ASNSequenceType t_i := {field1:='00'O, field2:='00'B}; } + { template ASNSequenceType t_i := null; } + { template ASNSequenceType t_i := xx4; } + { template ASNSequenceType t_i := true; } + { template ASNSequenceType t_i := false; } + { template ASNSequenceType t_i := not false; } + { template ASNSequenceType t_i := t_i; } + { template ASNSequenceType t_i := 5; } + { template ASNSequenceType t_i := 5.5; } + { template ASNSequenceType t_i := "akarmi"; } + { template ASNSequenceType t_i := char(0,0,0,0); } + { template ASNSequenceType t_i := 'aa'H; } + { template ASNSequenceType t_i := '00'B; } + { template ASNSequenceType t_i := 5 * 5; } + { template ASNSequenceType t_i := 5 + 5; } + { template ASNSequenceType t_i := 5 - 5; } + { template ASNSequenceType t_i := 5 / 5; } + { template ASNSequenceType t_i := 5 mod 5; } + { template ASNSequenceType t_i := 5 rem 5; } + { template ASNSequenceType t_i := true and true; } + { template ASNSequenceType t_i := true or true; } + { template ASNSequenceType t_i := not4b 'aa'H; } + { template ASNSequenceType t_i := not4b '00'B; } + { template ASNSequenceType t_i := '00'B and4b '00'B; } + { template ASNSequenceType t_i := '00'H and4b '00'H; } + { template ASNSequenceType t_i := '00'B or4b '00'B; } + { template ASNSequenceType t_i := '00'H or4b '00'H; } + { template ASNSequenceType t_i := '00'B xor4b '00'B; } + { template ASNSequenceType t_i := '00'H xor4b '00'H; } + { template ASNSequenceType t_i := '00'B << 1; } + { template ASNSequenceType t_i := '00'H << 1; } + { template ASNSequenceType t_i := '00'B >> 1; } + { template ASNSequenceType t_i := '00'H >> 1; } + { template ASNSequenceType t_i := '00'B <@ 1; } + { template ASNSequenceType t_i := '00'H <@ 1; } + { template ASNSequenceType t_i := '00'B @> 1; } + { template ASNSequenceType t_i := '00'H @> 1; } + { template ASNSequenceType t_i := '00'B & '00'B; } + { template ASNSequenceType t_i := '00'H & '00'H; } + { template ASNSequenceType t_i := "akarmi" & "akarmi2"; } + { template ASNSequenceType t_i := 5 == 5; } + { template ASNSequenceType t_i := 5 != 5; } + { template ASNSequenceType t_i := 5 < 5; } + { template ASNSequenceType t_i := 5 > 5; } + { template ASNSequenceType t_i := 5 <= 5; } + { template ASNSequenceType t_i := 5 >= 5; } + { template ASNSequenceType t_i := bit2hex('00'B); } + { template ASNSequenceType t_i := bit2int('00'B); } + { template ASNSequenceType t_i := bit2oct('00'B); } + { template ASNSequenceType t_i := bit2str('00'B); } + { template ASNSequenceType t_i := char2int("5"); } + { template ASNSequenceType t_i := char2oct("akarmi"); } + { template ASNSequenceType t_i := float2int( 5.5); } + { template ASNSequenceType t_i := float2str(5.5); } + { template ASNSequenceType t_i := hex2int('FF'H); } + { template ASNSequenceType t_i := hex2oct('FF00'H); } + { template ASNSequenceType t_i := hex2str('FF00'H); } + { template ASNSequenceType t_i := int2char(5); } + { template ASNSequenceType t_i := int2float(5); } + { template ASNSequenceType t_i := int2str(5); } + { template ASNSequenceType t_i := int2unichar(5); } + { template ASNSequenceType t_i := oct2bit('00FF'O); } + { template ASNSequenceType t_i := oct2char('0F'O); } + { template ASNSequenceType t_i := oct2hex('0F'O); } + { template ASNSequenceType t_i := oct2int('0F'O); } + { template ASNSequenceType t_i := oct2str('0F'O); } + { template ASNSequenceType t_i := str2bit("0101"); } + { template ASNSequenceType t_i := str2float("5.5"); } + { template ASNSequenceType t_i := str2hex("0101"); } + { template ASNSequenceType t_i := str2int("5"); } + { template ASNSequenceType t_i := str2oct("0101"); } + { template ASNSequenceType t_i := unichar2int(char(0,0,0,0)); } + { template ASNSequenceType t_i := unichar2char(char(0,0,0,0)); } + { template ASNSequenceType t_i := int2bit(1,3); } + { template ASNSequenceType t_i := int2hex(1,3); } + { template ASNSequenceType t_i := int2oct(1,3); } + { template ASNSequenceType t_i := rnd(); } + { template ASNSequenceType t_i := rnd(5.5); } + { template ASNSequenceType t_i := isbound(5.5); } + { template ASNSequenceType t_i := isvalue(5.5); } + { template ASNSequenceType t_i := lengthof("akarmi"); } + { template ASNSequenceType t_i := sizeof(cg_recordof); } + { template ASNSequenceType t_i := regexp("akarmi","akarmi", 0); } + { template ASNSequenceType t_i := match(5,5); } + { template ASNSequenceType t_i := mtc; } + { template ASNSequenceType t_i := system; } + { template ASNSequenceType t_i := self; } + { template ASNSequenceType t_i := any component . running; } + { template ASNSequenceType t_i := all component . running; } + { template ASNSequenceType t_i := any component . alive; } + { template ASNSequenceType t_i := all component . alive; } + { template ASNSequenceType t_i := any timer . running; } + { template ASNSequenceType t_i := f_comp_return().running; } + { template ASNSequenceType t_i := f_comp_return().alive; } + { template ASNSequenceType t_i := TL_t.read; } + { template ASNSequenceType t_i := mycomponent.create; } + { template ASNSequenceType t_i := activate(temp_altstep()); } + { template ASNSequenceType t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNSequenceType t_i := execute(temp_altstep(), 5); } + { template ASNSequenceType t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNSequenceType t_i := refers(f_functiontypeValueTest); } + { template ASNSequenceType t_i := refers(ef_ext_function); } + { template ASNSequenceType t_i := refers(as_altstep); } + { template ASNSequenceType t_i := refers(tc_testcase); } +} + +function f_unionValueTests() +{ + timer TL_t := 5.0; + + { template ASNChoiceType t_i := omit; } + { template ASNChoiceType t_i := {field1:=1}; } + { template ASNChoiceType t_i := {field2:="akarmi"}; } + + { template ASNChoiceType t_i := {}; } + { template ASNChoiceType t_i := {1,"akarmi",3,4,5}; } + { template ASNChoiceType t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template ASNChoiceType t_i := {field2:=1}; } + { template ASNChoiceType t_i := {field4:=1}; } + { template ASNChoiceType t_i := {field1:=1, field1:="akarmi"}; } + { template ASNChoiceType t_i := {field1:=omit, field2:=omit}; } + { template ASNChoiceType t_i := {field2:="akarmi", field1:=1}; } + { template ASNChoiceType t_i := {1}; } + { template ASNChoiceType t_i := {1,2,3}; } + { template ASNChoiceType t_i := {-,-}; } + { template ASNChoiceType t_i := {field1:='00'O, field2:='00'B}; } + { template ASNChoiceType t_i := null; } + { template ASNChoiceType t_i := xx4; } + { template ASNChoiceType t_i := true; } + { template ASNChoiceType t_i := false; } + { template ASNChoiceType t_i := not false; } + { template ASNChoiceType t_i := t_i; } + { template ASNChoiceType t_i := 5; } + { template ASNChoiceType t_i := 5.5; } + { template ASNChoiceType t_i := "akarmi"; } + { template ASNChoiceType t_i := char(0,0,0,0); } + { template ASNChoiceType t_i := 'aa'H; } + { template ASNChoiceType t_i := '00'B; } + { template ASNChoiceType t_i := 5 * 5; } + { template ASNChoiceType t_i := 5 + 5; } + { template ASNChoiceType t_i := 5 - 5; } + { template ASNChoiceType t_i := 5 / 5; } + { template ASNChoiceType t_i := 5 mod 5; } + { template ASNChoiceType t_i := 5 rem 5; } + { template ASNChoiceType t_i := true and true; } + { template ASNChoiceType t_i := true or true; } + { template ASNChoiceType t_i := not4b 'aa'H; } + { template ASNChoiceType t_i := not4b '00'B; } + { template ASNChoiceType t_i := '00'B and4b '00'B; } + { template ASNChoiceType t_i := '00'H and4b '00'H; } + { template ASNChoiceType t_i := '00'B or4b '00'B; } + { template ASNChoiceType t_i := '00'H or4b '00'H; } + { template ASNChoiceType t_i := '00'B xor4b '00'B; } + { template ASNChoiceType t_i := '00'H xor4b '00'H; } + { template ASNChoiceType t_i := '00'B << 1; } + { template ASNChoiceType t_i := '00'H << 1; } + { template ASNChoiceType t_i := '00'B >> 1; } + { template ASNChoiceType t_i := '00'H >> 1; } + { template ASNChoiceType t_i := '00'B <@ 1; } + { template ASNChoiceType t_i := '00'H <@ 1; } + { template ASNChoiceType t_i := '00'B @> 1; } + { template ASNChoiceType t_i := '00'H @> 1; } + { template ASNChoiceType t_i := '00'B & '00'B; } + { template ASNChoiceType t_i := '00'H & '00'H; } + { template ASNChoiceType t_i := "akarmi" & "akarmi2"; } + { template ASNChoiceType t_i := 5 == 5; } + { template ASNChoiceType t_i := 5 != 5; } + { template ASNChoiceType t_i := 5 < 5; } + { template ASNChoiceType t_i := 5 > 5; } + { template ASNChoiceType t_i := 5 <= 5; } + { template ASNChoiceType t_i := 5 >= 5; } + { template ASNChoiceType t_i := bit2hex('00'B); } + { template ASNChoiceType t_i := bit2int('00'B); } + { template ASNChoiceType t_i := bit2oct('00'B); } + { template ASNChoiceType t_i := bit2str('00'B); } + { template ASNChoiceType t_i := char2int("5"); } + { template ASNChoiceType t_i := char2oct("akarmi"); } + { template ASNChoiceType t_i := float2int( 5.5); } + { template ASNChoiceType t_i := float2str(5.5); } + { template ASNChoiceType t_i := hex2int('FF'H); } + { template ASNChoiceType t_i := hex2oct('FF00'H); } + { template ASNChoiceType t_i := hex2str('FF00'H); } + { template ASNChoiceType t_i := int2char(5); } + { template ASNChoiceType t_i := int2float(5); } + { template ASNChoiceType t_i := int2str(5); } + { template ASNChoiceType t_i := int2unichar(5); } + { template ASNChoiceType t_i := oct2bit('00FF'O); } + { template ASNChoiceType t_i := oct2char('0F'O); } + { template ASNChoiceType t_i := oct2hex('0F'O); } + { template ASNChoiceType t_i := oct2int('0F'O); } + { template ASNChoiceType t_i := oct2str('0F'O); } + { template ASNChoiceType t_i := str2bit("0101"); } + { template ASNChoiceType t_i := str2float("5.5"); } + { template ASNChoiceType t_i := str2hex("0101"); } + { template ASNChoiceType t_i := str2int("5"); } + { template ASNChoiceType t_i := str2oct("0101"); } + { template ASNChoiceType t_i := unichar2int(char(0,0,0,0)); } + { template ASNChoiceType t_i := unichar2char(char(0,0,0,0)); } + { template ASNChoiceType t_i := int2bit(1,3); } + { template ASNChoiceType t_i := int2hex(1,3); } + { template ASNChoiceType t_i := int2oct(1,3); } + { template ASNChoiceType t_i := rnd(); } + { template ASNChoiceType t_i := rnd(5.5); } + { template ASNChoiceType t_i := isbound(5.5); } + { template ASNChoiceType t_i := isvalue(5.5); } + { template ASNChoiceType t_i := lengthof("akarmi"); } + { template ASNChoiceType t_i := sizeof(cg_recordof); } + { template ASNChoiceType t_i := regexp("akarmi","akarmi", 0); } + { template ASNChoiceType t_i := match(5,5); } + { template ASNChoiceType t_i := mtc; } + { template ASNChoiceType t_i := system; } + { template ASNChoiceType t_i := self; } + { template ASNChoiceType t_i := any component . running; } + { template ASNChoiceType t_i := all component . running; } + { template ASNChoiceType t_i := any component . alive; } + { template ASNChoiceType t_i := all component . alive; } + { template ASNChoiceType t_i := any timer . running; } + { template ASNChoiceType t_i := f_comp_return().running; } + { template ASNChoiceType t_i := f_comp_return().alive; } + { template ASNChoiceType t_i := TL_t.read; } + { template ASNChoiceType t_i := mycomponent.create; } + { template ASNChoiceType t_i := activate(temp_altstep()); } + { template ASNChoiceType t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNChoiceType t_i := execute(temp_altstep(), 5); } + { template ASNChoiceType t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNChoiceType t_i := refers(f_functiontypeValueTest); } + { template ASNChoiceType t_i := refers(ef_ext_function); } + { template ASNChoiceType t_i := refers(as_altstep); } + { template ASNChoiceType t_i := refers(tc_testcase); } +} + +function f_arrayValueTests() +{ + timer TL_t := 5; + + { template myarrayType t_i := omit; } + { template myarrayType t_i := {1,2,3}; } + + { template myarrayType t_i := {1,2}; } + { template myarrayType t_i := {1,2,3,4}; } + { template myarrayType t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template myarrayType t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template myarrayType t_i := {field1:=1, field1:="akarmi"}; } + { template myarrayType t_i := null; } + { template myarrayType t_i := xx4; } + { template myarrayType t_i := true; } + { template myarrayType t_i := false; } + { template myarrayType t_i := not false; } + { template myarrayType t_i := t_i; } + { template myarrayType t_i := 5; } + { template myarrayType t_i := 5.5; } + { template myarrayType t_i := "akarmi"; } + { template myarrayType t_i := char(0,0,0,0); } + { template myarrayType t_i := 'aa'H; } + { template myarrayType t_i := '00'B; } + { template myarrayType t_i := 5 * 5; } + { template myarrayType t_i := 5 + 5; } + { template myarrayType t_i := 5 - 5; } + { template myarrayType t_i := 5 / 5; } + { template myarrayType t_i := 5 mod 5; } + { template myarrayType t_i := 5 rem 5; } + { template myarrayType t_i := true and true; } + { template myarrayType t_i := true or true; } + { template myarrayType t_i := not4b 'aa'H; } + { template myarrayType t_i := not4b '00'B; } + { template myarrayType t_i := '00'B and4b '00'B; } + { template myarrayType t_i := '00'H and4b '00'H; } + { template myarrayType t_i := '00'B or4b '00'B; } + { template myarrayType t_i := '00'H or4b '00'H; } + { template myarrayType t_i := '00'B xor4b '00'B; } + { template myarrayType t_i := '00'H xor4b '00'H; } + { template myarrayType t_i := '00'B << 1; } + { template myarrayType t_i := '00'H << 1; } + { template myarrayType t_i := '00'B >> 1; } + { template myarrayType t_i := '00'H >> 1; } + { template myarrayType t_i := '00'B <@ 1; } + { template myarrayType t_i := '00'H <@ 1; } + { template myarrayType t_i := '00'B @> 1; } + { template myarrayType t_i := '00'H @> 1; } + { template myarrayType t_i := '00'B & '00'B; } + { template myarrayType t_i := '00'H & '00'H; } + { template myarrayType t_i := "akarmi" & "akarmi2"; } + { template myarrayType t_i := 5 == 5; } + { template myarrayType t_i := 5 != 5; } + { template myarrayType t_i := 5 < 5; } + { template myarrayType t_i := 5 > 5; } + { template myarrayType t_i := 5 <= 5; } + { template myarrayType t_i := 5 >= 5; } + { template myarrayType t_i := bit2hex('00'B); } + { template myarrayType t_i := bit2int('00'B); } + { template myarrayType t_i := bit2oct('00'B); } + { template myarrayType t_i := bit2str('00'B); } + { template myarrayType t_i := char2int("5"); } + { template myarrayType t_i := char2oct("akarmi"); } + { template myarrayType t_i := float2int( 5.5); } + { template myarrayType t_i := float2str(5.5); } + { template myarrayType t_i := hex2int('FF'H); } + { template myarrayType t_i := hex2oct('FF00'H); } + { template myarrayType t_i := hex2str('FF00'H); } + { template myarrayType t_i := int2char(5); } + { template myarrayType t_i := int2float(5); } + { template myarrayType t_i := int2str(5); } + { template myarrayType t_i := int2unichar(5); } + { template myarrayType t_i := oct2bit('00FF'O); } + { template myarrayType t_i := oct2char('0F'O); } + { template myarrayType t_i := oct2hex('0F'O); } + { template myarrayType t_i := oct2int('0F'O); } + { template myarrayType t_i := oct2str('0F'O); } + { template myarrayType t_i := str2bit("0101"); } + { template myarrayType t_i := str2float("5.5"); } + { template myarrayType t_i := str2hex("0101"); } + { template myarrayType t_i := str2int("5"); } + { template myarrayType t_i := str2oct("0101"); } + { template myarrayType t_i := unichar2int(char(0,0,0,0)); } + { template myarrayType t_i := unichar2char(char(0,0,0,0)); } + { template myarrayType t_i := int2bit(1,3); } + { template myarrayType t_i := int2hex(1,3); } + { template myarrayType t_i := int2oct(1,3); } + { template myarrayType t_i := rnd(); } + { template myarrayType t_i := rnd(5.5); } + { template myarrayType t_i := isbound(5.5); } + { template myarrayType t_i := isvalue(5.5); } + { template myarrayType t_i := lengthof("akarmi"); } + { template myarrayType t_i := sizeof(cg_recordof); } + { template myarrayType t_i := regexp("akarmi","akarmi", 0); } + { template myarrayType t_i := match(5,5); } + { template myarrayType t_i := mtc; } + { template myarrayType t_i := system; } + { template myarrayType t_i := self; } + { template myarrayType t_i := any component . running; } + { template myarrayType t_i := all component . running; } + { template myarrayType t_i := any component . alive; } + { template myarrayType t_i := all component . alive; } + { template myarrayType t_i := any timer . running; } + { template myarrayType t_i := f_comp_return().running; } + { template myarrayType t_i := f_comp_return().alive; } + { template myarrayType t_i := TL_t.read; } + { template myarrayType t_i := mycomponent.create; } + { template myarrayType t_i := activate(temp_altstep()); } + { template myarrayType t_i := activate(derefers(temp_altstep_pointer)()); } + { template myarrayType t_i := execute(temp_altstep(), 5); } + { template myarrayType t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template myarrayType t_i := refers(f_functiontypeValueTest); } + { template myarrayType t_i := refers(ef_ext_function); } + { template myarrayType t_i := refers(as_altstep); } + { template myarrayType t_i := refers(tc_testcase); } +} + +function f_functiontypeValueTest() runs on mycomponent +{ + timer TL_t := 5; + + { template t_function t_i := omit; } + { template t_function2 t_i := refers(f_functiontypeValueTest); } + { template t_function t_i := refers(ef_ext_function); } + { template t_function t_i := null; } + { template t_function2 t_i := (null, refers(f_functiontypeValueTest), refers(ef_ext_function)); } + + { template t_function t_i := {}; } + { template t_function t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template t_function t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template t_function t_i := {field2:=1}; } + { template t_function t_i := {field4:=1}; } + { template t_function t_i := {field1:=1, field1:="akarmi"}; } + { template t_function t_i := {field1:=omit, field2:=omit}; } + { template t_function t_i := {field2:="akarmi", field1:=1}; } + { template t_function t_i := {1}; } + { template t_function t_i := {1,2,3}; } + { template t_function t_i := {-,-}; } + { template t_function t_i := {field1:='00'O, field2:='00'B}; } + { template t_function t_i := xx4; } + { template t_function t_i := true; } + { template t_function t_i := false; } + { template t_function t_i := not false; } + { template t_function t_i := t_i; } + { template t_function t_i := 5; } + { template t_function t_i := 5.5; } + { template t_function t_i := "akarmi"; } + { template t_function t_i := char(0,0,0,0); } + { template t_function t_i := 'aa'H; } + { template t_function t_i := '00'B; } + { template t_function t_i := 5 * 5; } + { template t_function t_i := 5 + 5; } + { template t_function t_i := 5 - 5; } + { template t_function t_i := 5 / 5; } + { template t_function t_i := 5 mod 5; } + { template t_function t_i := 5 rem 5; } + { template t_function t_i := true and true; } + { template t_function t_i := true or true; } + { template t_function t_i := not4b 'aa'H; } + { template t_function t_i := not4b '00'B; } + { template t_function t_i := '00'B and4b '00'B; } + { template t_function t_i := '00'H and4b '00'H; } + { template t_function t_i := '00'B or4b '00'B; } + { template t_function t_i := '00'H or4b '00'H; } + { template t_function t_i := '00'B xor4b '00'B; } + { template t_function t_i := '00'H xor4b '00'H; } + { template t_function t_i := '00'B << 1; } + { template t_function t_i := '00'H << 1; } + { template t_function t_i := '00'B >> 1; } + { template t_function t_i := '00'H >> 1; } + { template t_function t_i := '00'B <@ 1; } + { template t_function t_i := '00'H <@ 1; } + { template t_function t_i := '00'B @> 1; } + { template t_function t_i := '00'H @> 1; } + { template t_function t_i := '00'B & '00'B; } + { template t_function t_i := '00'H & '00'H; } + { template t_function t_i := "akarmi" & "akarmi2"; } + { template t_function t_i := 5 == 5; } + { template t_function t_i := 5 != 5; } + { template t_function t_i := 5 < 5; } + { template t_function t_i := 5 > 5; } + { template t_function t_i := 5 <= 5; } + { template t_function t_i := 5 >= 5; } + { template t_function t_i := bit2hex('00'B); } + { template t_function t_i := bit2int('00'B); } + { template t_function t_i := bit2oct('00'B); } + { template t_function t_i := bit2str('00'B); } + { template t_function t_i := char2int("5"); } + { template t_function t_i := char2oct("akarmi"); } + { template t_function t_i := float2int( 5.5); } + { template t_function t_i := float2str(5.5); } + { template t_function t_i := hex2int('FF'H); } + { template t_function t_i := hex2oct('FF00'H); } + { template t_function t_i := hex2str('FF00'H); } + { template t_function t_i := int2char(5); } + { template t_function t_i := int2float(5); } + { template t_function t_i := int2str(5); } + { template t_function t_i := int2unichar(5); } + { template t_function t_i := oct2bit('00FF'O); } + { template t_function t_i := oct2char('0F'O); } + { template t_function t_i := oct2hex('0F'O); } + { template t_function t_i := oct2int('0F'O); } + { template t_function t_i := oct2str('0F'O); } + { template t_function t_i := str2bit("0101"); } + { template t_function t_i := str2float("5.5"); } + { template t_function t_i := str2hex("0101"); } + { template t_function t_i := str2int("5"); } + { template t_function t_i := str2oct("0101"); } + { template t_function t_i := unichar2int(char(0,0,0,0)); } + { template t_function t_i := unichar2char(char(0,0,0,0)); } + { template t_function t_i := int2bit(1,3); } + { template t_function t_i := int2hex(1,3); } + { template t_function t_i := int2oct(1,3); } + { template t_function t_i := rnd(); } + { template t_function t_i := rnd(5.5); } + { template t_function t_i := isbound(5.5); } + { template t_function t_i := isvalue(5.5); } + { template t_function t_i := lengthof("akarmi"); } + { template t_function t_i := sizeof(cg_recordof); } + { template t_function t_i := regexp("akarmi","akarmi", 0); } + { template t_function t_i := match(5,5); } + { template t_function t_i := mtc; } + { template t_function t_i := system; } + { template t_function t_i := self; } + { template t_function t_i := any component . running; } + { template t_function t_i := all component . running; } + { template t_function t_i := any component . alive; } + { template t_function t_i := all component . alive; } + { template t_function t_i := any timer . running; } + { template t_function t_i := f_comp_return().running; } + { template t_function t_i := f_comp_return().alive; } + { template t_function t_i := TL_t.read; } + { template t_function t_i := mycomponent.create; } + { template t_function t_i := activate(temp_altstep()); } + { template t_function t_i := activate(derefers(temp_altstep_pointer)()); } + { template t_function t_i := execute(temp_altstep(), 5); } + { template t_function t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template t_function t_i := refers(tc_testcase); } + { template t_function t_i := refers(as_altstep); } + { template t_function t_i := refers(f_functiontypeValueTest); } +} + +function f_altsteptypeValueTest() +{ + timer TL_t := 5; + + { template t_altstep t_i := omit; } + { template t_altstep t_i := refers(as_altstep); } + { template t_altstep t_i := null; } + { template t_altstep t_i := (null, refers(as_altstep)); } + + { template t_altstep t_i := {}; } + { template t_altstep t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template t_altstep t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template t_altstep t_i := {field2:=1}; } + { template t_altstep t_i := {field4:=1}; } + { template t_altstep t_i := {field1:=1, field1:="akarmi"}; } + { template t_altstep t_i := {field1:=omit, field2:=omit}; } + { template t_altstep t_i := {field2:="akarmi", field1:=1}; } + { template t_altstep t_i := {1}; } + { template t_altstep t_i := {1,2,3}; } + { template t_altstep t_i := {-,-}; } + { template t_altstep t_i := {field1:='00'O, field2:='00'B}; } + { template t_altstep t_i := xx4; } + { template t_altstep t_i := true; } + { template t_altstep t_i := false; } + { template t_altstep t_i := not false; } + { template t_altstep t_i := t_i; } + { template t_altstep t_i := 5; } + { template t_altstep t_i := 5.5; } + { template t_altstep t_i := "akarmi"; } + { template t_altstep t_i := char(0,0,0,0); } + { template t_altstep t_i := 'aa'H; } + { template t_altstep t_i := '00'B; } + { template t_altstep t_i := 5 * 5; } + { template t_altstep t_i := 5 + 5; } + { template t_altstep t_i := 5 - 5; } + { template t_altstep t_i := 5 / 5; } + { template t_altstep t_i := 5 mod 5; } + { template t_altstep t_i := 5 rem 5; } + { template t_altstep t_i := true and true; } + { template t_altstep t_i := true or true; } + { template t_altstep t_i := not4b 'aa'H; } + { template t_altstep t_i := not4b '00'B; } + { template t_altstep t_i := '00'B and4b '00'B; } + { template t_altstep t_i := '00'H and4b '00'H; } + { template t_altstep t_i := '00'B or4b '00'B; } + { template t_altstep t_i := '00'H or4b '00'H; } + { template t_altstep t_i := '00'B xor4b '00'B; } + { template t_altstep t_i := '00'H xor4b '00'H; } + { template t_altstep t_i := '00'B << 1; } + { template t_altstep t_i := '00'H << 1; } + { template t_altstep t_i := '00'B >> 1; } + { template t_altstep t_i := '00'H >> 1; } + { template t_altstep t_i := '00'B <@ 1; } + { template t_altstep t_i := '00'H <@ 1; } + { template t_altstep t_i := '00'B @> 1; } + { template t_altstep t_i := '00'H @> 1; } + { template t_altstep t_i := '00'B & '00'B; } + { template t_altstep t_i := '00'H & '00'H; } + { template t_altstep t_i := "akarmi" & "akarmi2"; } + { template t_altstep t_i := 5 == 5; } + { template t_altstep t_i := 5 != 5; } + { template t_altstep t_i := 5 < 5; } + { template t_altstep t_i := 5 > 5; } + { template t_altstep t_i := 5 <= 5; } + { template t_altstep t_i := 5 >= 5; } + { template t_altstep t_i := bit2hex('00'B); } + { template t_altstep t_i := bit2int('00'B); } + { template t_altstep t_i := bit2oct('00'B); } + { template t_altstep t_i := bit2str('00'B); } + { template t_altstep t_i := char2int("5"); } + { template t_altstep t_i := char2oct("akarmi"); } + { template t_altstep t_i := float2int( 5.5); } + { template t_altstep t_i := float2str(5.5); } + { template t_altstep t_i := hex2int('FF'H); } + { template t_altstep t_i := hex2oct('FF00'H); } + { template t_altstep t_i := hex2str('FF00'H); } + { template t_altstep t_i := int2char(5); } + { template t_altstep t_i := int2float(5); } + { template t_altstep t_i := int2str(5); } + { template t_altstep t_i := int2unichar(5); } + { template t_altstep t_i := oct2bit('00FF'O); } + { template t_altstep t_i := oct2char('0F'O); } + { template t_altstep t_i := oct2hex('0F'O); } + { template t_altstep t_i := oct2int('0F'O); } + { template t_altstep t_i := oct2str('0F'O); } + { template t_altstep t_i := str2bit("0101"); } + { template t_altstep t_i := str2float("5.5"); } + { template t_altstep t_i := str2hex("0101"); } + { template t_altstep t_i := str2int("5"); } + { template t_altstep t_i := str2oct("0101"); } + { template t_altstep t_i := unichar2int(char(0,0,0,0)); } + { template t_altstep t_i := unichar2char(char(0,0,0,0)); } + { template t_altstep t_i := int2bit(1,3); } + { template t_altstep t_i := int2hex(1,3); } + { template t_altstep t_i := int2oct(1,3); } + { template t_altstep t_i := rnd(); } + { template t_altstep t_i := rnd(5.5); } + { template t_altstep t_i := isbound(5.5); } + { template t_altstep t_i := isvalue(5.5); } + { template t_altstep t_i := lengthof("akarmi"); } + { template t_altstep t_i := sizeof(cg_recordof); } + { template t_altstep t_i := regexp("akarmi","akarmi", 0); } + { template t_altstep t_i := match(5,5); } + { template t_altstep t_i := mtc; } + { template t_altstep t_i := system; } + { template t_altstep t_i := self; } + { template t_altstep t_i := any component . running; } + { template t_altstep t_i := all component . running; } + { template t_altstep t_i := any component . alive; } + { template t_altstep t_i := all component . alive; } + { template t_altstep t_i := any timer . running; } + { template t_altstep t_i := f_comp_return().running; } + { template t_altstep t_i := f_comp_return().alive; } + { template t_altstep t_i := TL_t.read; } + { template t_altstep t_i := mycomponent.create; } + { template t_altstep t_i := activate(temp_altstep()); } + { template t_altstep t_i := activate(derefers(temp_altstep_pointer)()); } + { template t_altstep t_i := execute(temp_altstep(), 5); } + { template t_altstep t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template t_altstep t_i := refers(f_functiontypeValueTest); } + { template t_altstep t_i := refers(ef_ext_function); } + { template t_altstep t_i := refers(tc_testcase); } + { template t_altstep2 t_i := refers(as_altstep); } +} + +function f_testcasetypeValueTest() +{ + timer TL_t := 5; + + { template t_testcase t_i := omit; } + { template t_testcase t_i := refers(tc_testcase); } + { template t_testcase t_i := null; } + { template t_testcase t_i := (null, refers(tc_testcase)); } + + { template t_testcase t_i := {}; } + { template t_testcase t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template t_testcase t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template t_testcase t_i := {field2:=1}; } + { template t_testcase t_i := {field4:=1}; } + { template t_testcase t_i := {field1:=1, field1:="akarmi"}; } + { template t_testcase t_i := {field1:=omit, field2:=omit}; } + { template t_testcase t_i := {field2:="akarmi", field1:=1}; } + { template t_testcase t_i := {1}; } + { template t_testcase t_i := {1,2,3}; } + { template t_testcase t_i := {-,-}; } + { template t_testcase t_i := {field1:='00'O, field2:='00'B}; } + { template t_testcase t_i := xx4; } + { template t_testcase t_i := true; } + { template t_testcase t_i := false; } + { template t_testcase t_i := not false; } + { template t_testcase t_i := t_i; } + { template t_testcase t_i := 5; } + { template t_testcase t_i := 5.5; } + { template t_testcase t_i := "akarmi"; } + { template t_testcase t_i := char(0,0,0,0); } + { template t_testcase t_i := 'aa'H; } + { template t_testcase t_i := '00'B; } + { template t_testcase t_i := 5 * 5; } + { template t_testcase t_i := 5 + 5; } + { template t_testcase t_i := 5 - 5; } + { template t_testcase t_i := 5 / 5; } + { template t_testcase t_i := 5 mod 5; } + { template t_testcase t_i := 5 rem 5; } + { template t_testcase t_i := true and true; } + { template t_testcase t_i := true or true; } + { template t_testcase t_i := not4b 'aa'H; } + { template t_testcase t_i := not4b '00'B; } + { template t_testcase t_i := '00'B and4b '00'B; } + { template t_testcase t_i := '00'H and4b '00'H; } + { template t_testcase t_i := '00'B or4b '00'B; } + { template t_testcase t_i := '00'H or4b '00'H; } + { template t_testcase t_i := '00'B xor4b '00'B; } + { template t_testcase t_i := '00'H xor4b '00'H; } + { template t_testcase t_i := '00'B << 1; } + { template t_testcase t_i := '00'H << 1; } + { template t_testcase t_i := '00'B >> 1; } + { template t_testcase t_i := '00'H >> 1; } + { template t_testcase t_i := '00'B <@ 1; } + { template t_testcase t_i := '00'H <@ 1; } + { template t_testcase t_i := '00'B @> 1; } + { template t_testcase t_i := '00'H @> 1; } + { template t_testcase t_i := '00'B & '00'B; } + { template t_testcase t_i := '00'H & '00'H; } + { template t_testcase t_i := "akarmi" & "akarmi2"; } + { template t_testcase t_i := 5 == 5; } + { template t_testcase t_i := 5 != 5; } + { template t_testcase t_i := 5 < 5; } + { template t_testcase t_i := 5 > 5; } + { template t_testcase t_i := 5 <= 5; } + { template t_testcase t_i := 5 >= 5; } + { template t_testcase t_i := bit2hex('00'B); } + { template t_testcase t_i := bit2int('00'B); } + { template t_testcase t_i := bit2oct('00'B); } + { template t_testcase t_i := bit2str('00'B); } + { template t_testcase t_i := char2int("5"); } + { template t_testcase t_i := char2oct("akarmi"); } + { template t_testcase t_i := float2int( 5.5); } + { template t_testcase t_i := float2str(5.5); } + { template t_testcase t_i := hex2int('FF'H); } + { template t_testcase t_i := hex2oct('FF00'H); } + { template t_testcase t_i := hex2str('FF00'H); } + { template t_testcase t_i := int2char(5); } + { template t_testcase t_i := int2float(5); } + { template t_testcase t_i := int2str(5); } + { template t_testcase t_i := int2unichar(5); } + { template t_testcase t_i := oct2bit('00FF'O); } + { template t_testcase t_i := oct2char('0F'O); } + { template t_testcase t_i := oct2hex('0F'O); } + { template t_testcase t_i := oct2int('0F'O); } + { template t_testcase t_i := oct2str('0F'O); } + { template t_testcase t_i := str2bit("0101"); } + { template t_testcase t_i := str2float("5.5"); } + { template t_testcase t_i := str2hex("0101"); } + { template t_testcase t_i := str2int("5"); } + { template t_testcase t_i := str2oct("0101"); } + { template t_testcase t_i := unichar2int(char(0,0,0,0)); } + { template t_testcase t_i := unichar2char(char(0,0,0,0)); } + { template t_testcase t_i := int2bit(1,3); } + { template t_testcase t_i := int2hex(1,3); } + { template t_testcase t_i := int2oct(1,3); } + { template t_testcase t_i := rnd(); } + { template t_testcase t_i := rnd(5.5); } + { template t_testcase t_i := isbound(5.5); } + { template t_testcase t_i := isvalue(5.5); } + { template t_testcase t_i := lengthof("akarmi"); } + { template t_testcase t_i := sizeof(cg_recordof); } + { template t_testcase t_i := regexp("akarmi","akarmi", 0); } + { template t_testcase t_i := match(5,5); } + { template t_testcase t_i := mtc; } + { template t_testcase t_i := system; } + { template t_testcase t_i := self; } + { template t_testcase t_i := any component . running; } + { template t_testcase t_i := all component . running; } + { template t_testcase t_i := any component . alive; } + { template t_testcase t_i := all component . alive; } + { template t_testcase t_i := any timer . running; } + { template t_testcase t_i := f_comp_return().running; } + { template t_testcase t_i := f_comp_return().alive; } + { template t_testcase t_i := TL_t.read; } + { template t_testcase t_i := mycomponent.create; } + { template t_testcase t_i := activate(temp_altstep()); } + { template t_testcase t_i := activate(derefers(temp_altstep_pointer)()); } + { template t_testcase t_i := execute(temp_altstep(), 5); } + { template t_testcase t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template t_testcase t_i := refers(f_functiontypeValueTest); } + { template t_testcase t_i := refers(ef_ext_function); } + { template t_testcase t_i := refers(as_altstep); } +} + +function f_signatureTests() +{ + timer TL_t := 5.0; + + { template mySignature t_i := omit; } + { template mySignature t_i := {Par1:=1, Par2:=1, Par3:=1}; } + { template mySignature t_i := {Par1:=1, Par3:=1}; } + { template mySignature t_i := {Par2:=1, Par3:=1}; } + { template mySignature t_i := {1, 1, 1}; } + { template mySignature t_i := {-,2,3}; } + { template mySignature t_i := {1,-,3}; } + { template mySignature t_i := {1,2,-}; } + { template mySignature t_i := {-,-,3}; } + { template mySignature t_i := {-,-,-}; } + { template mySignature t_i := ({Par1:=1, Par2:=1, Par3:=1}); } + { template mySignature t_i := ({1, 1, 1}); } + + + { template mySignature t_i := {}; } + { template mySignature t_i := {1}; } + { template mySignature t_i := {1, 1}; } + { template mySignature t_i := {-,-}; } + { template mySignature t_i := {1, 2, 3, 4}; } + { template mySignature t_i := ({1, 2, 3, 4}); } + { template mySignature t_i := {Par3:=1, Par2:=1, Par1:=1}; } + { template mySignature t_i := {Par1:=1, Par3:=1, Par2:=1}; } + { template mySignature t_i := {Par1:=1, Par3:=1 ,Par3:=1}; } + { template mySignature t_i := ({Par3:=1, Par2:=1, Par1:=1}); } + { template mySignature t_i := ({Par1:=1, Par3:=1, Par2:=1}); } + { template mySignature t_i := ({Par1:=1, Par3:=1 ,Par3:=1}); } + { template mySignature t_i := {1,"akarmi",3,4,5}; } + { template mySignature t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template mySignature t_i := {field2:=1}; } + { template mySignature t_i := {field4:=1}; } + { template mySignature t_i := {field1:=1, field1:="akarmi"}; } + { template mySignature t_i := {field1:=omit, field2:=omit}; } + { template mySignature t_i := {field2:="akarmi", field1:=1}; } + { template mySignature t_i := {field1:='00'O, field2:='00'B}; } + { template mySignature t_i := null; } + { template mySignature t_i := xx4; } + { template mySignature t_i := true; } + { template mySignature t_i := false; } + { template mySignature t_i := not false; } + { template mySignature t_i := t_i; } + { template mySignature t_i := 5; } + { template mySignature t_i := 5.5; } + { template mySignature t_i := "akarmi"; } + { template mySignature t_i := char(0,0,0,0); } + { template mySignature t_i := 'aa'H; } + { template mySignature t_i := '00'B; } + { template mySignature t_i := 5 * 5; } + { template mySignature t_i := 5 + 5; } + { template mySignature t_i := 5 - 5; } + { template mySignature t_i := 5 / 5; } + { template mySignature t_i := 5 mod 5; } + { template mySignature t_i := 5 rem 5; } + { template mySignature t_i := true and true; } + { template mySignature t_i := true or true; } + { template mySignature t_i := not4b 'aa'H; } + { template mySignature t_i := not4b '00'B; } + { template mySignature t_i := '00'B and4b '00'B; } + { template mySignature t_i := '00'H and4b '00'H; } + { template mySignature t_i := '00'B or4b '00'B; } + { template mySignature t_i := '00'H or4b '00'H; } + { template mySignature t_i := '00'B xor4b '00'B; } + { template mySignature t_i := '00'H xor4b '00'H; } + { template mySignature t_i := '00'B << 1; } + { template mySignature t_i := '00'H << 1; } + { template mySignature t_i := '00'B >> 1; } + { template mySignature t_i := '00'H >> 1; } + { template mySignature t_i := '00'B <@ 1; } + { template mySignature t_i := '00'H <@ 1; } + { template mySignature t_i := '00'B @> 1; } + { template mySignature t_i := '00'H @> 1; } + { template mySignature t_i := '00'B & '00'B; } + { template mySignature t_i := '00'H & '00'H; } + { template mySignature t_i := "akarmi" & "akarmi2"; } + { template mySignature t_i := 5 == 5; } + { template mySignature t_i := 5 != 5; } + { template mySignature t_i := 5 < 5; } + { template mySignature t_i := 5 > 5; } + { template mySignature t_i := 5 <= 5; } + { template mySignature t_i := 5 >= 5; } + { template mySignature t_i := bit2hex('00'B); } + { template mySignature t_i := bit2int('00'B); } + { template mySignature t_i := bit2oct('00'B); } + { template mySignature t_i := bit2str('00'B); } + { template mySignature t_i := char2int("5"); } + { template mySignature t_i := char2oct("akarmi"); } + { template mySignature t_i := float2int( 5.5); } + { template mySignature t_i := float2str(5.5); } + { template mySignature t_i := hex2int('FF'H); } + { template mySignature t_i := hex2oct('FF00'H); } + { template mySignature t_i := hex2str('FF00'H); } + { template mySignature t_i := int2char(5); } + { template mySignature t_i := int2float(5); } + { template mySignature t_i := int2str(5); } + { template mySignature t_i := int2unichar(5); } + { template mySignature t_i := oct2bit('00FF'O); } + { template mySignature t_i := oct2char('0F'O); } + { template mySignature t_i := oct2hex('0F'O); } + { template mySignature t_i := oct2int('0F'O); } + { template mySignature t_i := oct2str('0F'O); } + { template mySignature t_i := str2bit("0101"); } + { template mySignature t_i := str2float("5.5"); } + { template mySignature t_i := str2hex("0101"); } + { template mySignature t_i := str2int("5"); } + { template mySignature t_i := str2oct("0101"); } + { template mySignature t_i := unichar2int(char(0,0,0,0)); } + { template mySignature t_i := unichar2char(char(0,0,0,0)); } + { template mySignature t_i := int2bit(1,3); } + { template mySignature t_i := int2hex(1,3); } + { template mySignature t_i := int2oct(1,3); } + { template mySignature t_i := rnd(); } + { template mySignature t_i := rnd(5.5); } + { template mySignature t_i := isbound(5.5); } + { template mySignature t_i := isvalue(5.5); } + { template mySignature t_i := lengthof("akarmi"); } + { template mySignature t_i := sizeof(cg_recordof); } + { template mySignature t_i := regexp("akarmi","akarmi", 0); } + { template mySignature t_i := match(5,5); } + { template mySignature t_i := mtc; } + { template mySignature t_i := system; } + { template mySignature t_i := self; } + { template mySignature t_i := any component . running; } + { template mySignature t_i := all component . running; } + { template mySignature t_i := any component . alive; } + { template mySignature t_i := all component . alive; } + { template mySignature t_i := any timer . running; } + { template mySignature t_i := f_comp_return().running; } + { template mySignature t_i := f_comp_return().alive; } + { template mySignature t_i := TL_t.read; } + { template mySignature t_i := mycomponent.create; } + { template mySignature t_i := activate(temp_altstep()); } + { template mySignature t_i := activate(derefers(temp_altstep_pointer)()); } + { template mySignature t_i := execute(temp_altstep(), 5); } + { template mySignature t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template mySignature t_i := refers(f_functiontypeValueTest); } + { template mySignature t_i := refers(ef_ext_function); } + { template mySignature t_i := refers(as_altstep); } + { template mySignature t_i := refers(tc_testcase); } +} + +function f_ASNNullValueTests() +{ + timer TL_t := 5.0; + + { template ASNNull t_i := "akarmi"; } + { template ASNNull t_i := char(0,0,0,0); } + { template ASNNull t_i := "akarmi" & "akarmi2"; } + { template ASNNull t_i := bit2str('00'B); } + { template ASNNull t_i := float2str(5.5); } + { template ASNNull t_i := hex2str('FF00'H); } + { template ASNNull t_i := int2char(5); } + { template ASNNull t_i := int2str(5); } + { template ASNNull t_i := int2unichar(5); } + { template ASNNull t_i := oct2char('0F'O); } + { template ASNNull t_i := oct2str('0F'O); } + { template ASNNull t_i := regexp("akarmi","akarmi", 0); } + { template ASNNull t_i := omit; } + { template ASNNull t_i := null; } + { template ASNNull t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNNull t_i := {field1:=1, field1:="akarmi"}; } + { template ASNNull t_i := xx4; } + { template ASNNull t_i := true; } + { template ASNNull t_i := false; } + { template ASNNull t_i := not false; } + { template ASNNull t_i := t_i; } + { template ASNNull t_i := 5; } + { template ASNNull t_i := 5.5; } + { template ASNNull t_i := 'aa'H; } + { template ASNNull t_i := '00'B; } + { template ASNNull t_i := {1,2,3}; } + { template ASNNull t_i := 5 * 5; } + { template ASNNull t_i := 5 + 5; } + { template ASNNull t_i := 5 - 5; } + { template ASNNull t_i := 5 / 5; } + { template ASNNull t_i := 5 mod 5; } + { template ASNNull t_i := 5 rem 5; } + { template ASNNull t_i := true and true; } + { template ASNNull t_i := true or true; } + { template ASNNull t_i := not4b 'aa'H; } + { template ASNNull t_i := not4b '00'B; } + { template ASNNull t_i := '00'B and4b '00'B; } + { template ASNNull t_i := '00'H and4b '00'H; } + { template ASNNull t_i := '00'B or4b '00'B; } + { template ASNNull t_i := '00'H or4b '00'H; } + { template ASNNull t_i := '00'B xor4b '00'B; } + { template ASNNull t_i := '00'H xor4b '00'H; } + { template ASNNull t_i := '00'B << 1; } + { template ASNNull t_i := '00'H << 1; } + { template ASNNull t_i := '00'B >> 1; } + { template ASNNull t_i := '00'H >> 1; } + { template ASNNull t_i := '00'B <@ 1; } + { template ASNNull t_i := '00'H <@ 1; } + { template ASNNull t_i := '00'B @> 1; } + { template ASNNull t_i := '00'H @> 1; } + { template ASNNull t_i := '00'B & '00'B; } + { template ASNNull t_i := '00'H & '00'H; } + { template ASNNull t_i := 5 == 5; } + { template ASNNull t_i := 5 != 5; } + { template ASNNull t_i := 5 < 5; } + { template ASNNull t_i := 5 > 5; } + { template ASNNull t_i := 5 <= 5; } + { template ASNNull t_i := 5 >= 5; } + { template ASNNull t_i := bit2hex('00'B); } + { template ASNNull t_i := bit2int('00'B); } + { template ASNNull t_i := bit2oct('00'B); } + { template ASNNull t_i := char2int("5"); } + { template ASNNull t_i := char2oct("akarmi"); } + { template ASNNull t_i := float2int( 5.5); } + { template ASNNull t_i := hex2int('FF'H); } + { template ASNNull t_i := hex2oct('FF00'H); } + { template ASNNull t_i := int2float(5); } + { template ASNNull t_i := oct2bit('00FF'O); } + { template ASNNull t_i := oct2hex('0F'O); } + { template ASNNull t_i := oct2int('0F'O); } + { template ASNNull t_i := str2bit("0101"); } + { template ASNNull t_i := str2float("5.5"); } + { template ASNNull t_i := str2hex("0101"); } + { template ASNNull t_i := str2int("5"); } + { template ASNNull t_i := str2oct("0101"); } + { template ASNNull t_i := unichar2int(char(0,0,0,0)); } + { template ASNNull t_i := unichar2char(char(0,0,0,0)); } + { template ASNNull t_i := int2bit(1,3); } + { template ASNNull t_i := int2hex(1,3); } + { template ASNNull t_i := int2oct(1,3); } + { template ASNNull t_i := rnd(); } + { template ASNNull t_i := rnd(5.5); } + { template ASNNull t_i := isbound(5.5); } + { template ASNNull t_i := isvalue(5.5); } + { template ASNNull t_i := lengthof("akarmi"); } + { template ASNNull t_i := sizeof(cg_recordof); } + { template ASNNull t_i := match(5,5); } + { template ASNNull t_i := mtc; } + { template ASNNull t_i := system; } + { template ASNNull t_i := self; } + { template ASNNull t_i := any component . running; } + { template ASNNull t_i := all component . running; } + { template ASNNull t_i := any component . alive; } + { template ASNNull t_i := all component . alive; } + { template ASNNull t_i := any timer . running; } + { template ASNNull t_i := f_comp_return().running; } + { template ASNNull t_i := f_comp_return().alive; } + { template ASNNull t_i := TL_t.read; } + { template ASNNull t_i := mycomponent.create; } + { template ASNNull t_i := activate(temp_altstep()); } + { template ASNNull t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNNull t_i := execute(temp_altstep(), 5); } + { template ASNNull t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNNull t_i := refers(f_functiontypeValueTest); } + { template ASNNull t_i := refers(ef_ext_function); } + { template ASNNull t_i := refers(as_altstep); } + { template ASNNull t_i := refers(tc_testcase); } +} + +function f_ASNBMPstringValueTests() +{ + timer TL_t := 5.0; + + { template ASNBMPstring t_i := "akarmi"; } + { template ASNBMPstring t_i := char(0,0,0,0); } + { template ASNBMPstring t_i := "akarmi" & "akarmi2"; } + { template ASNBMPstring t_i := bit2str('00'B); } + { template ASNBMPstring t_i := float2str(5.5); } + { template ASNBMPstring t_i := hex2str('FF00'H); } + { template ASNBMPstring t_i := int2char(5); } + { template ASNBMPstring t_i := int2str(5); } + { template ASNBMPstring t_i := int2unichar(5); } + { template ASNBMPstring t_i := oct2char('0F'O); } + { template ASNBMPstring t_i := oct2str('0F'O); } + { template ASNBMPstring t_i := regexp("akarmi","akarmi", 0); } + + { template ASNBMPstring t_i := omit; } + { template ASNBMPstring t_i := null; } + { template ASNBMPstring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNBMPstring t_i := {field1:=1, field1:="akarmi"}; } + { template ASNBMPstring t_i := xx4; } + { template ASNBMPstring t_i := true; } + { template ASNBMPstring t_i := false; } + { template ASNBMPstring t_i := not false; } + { template ASNBMPstring t_i := t_i; } + { template ASNBMPstring t_i := 5; } + { template ASNBMPstring t_i := 5.5; } + { template ASNBMPstring t_i := 'aa'H; } + { template ASNBMPstring t_i := '00'B; } + { template ASNBMPstring t_i := {1,2,3}; } + { template ASNBMPstring t_i := 5 * 5; } + { template ASNBMPstring t_i := 5 + 5; } + { template ASNBMPstring t_i := 5 - 5; } + { template ASNBMPstring t_i := 5 / 5; } + { template ASNBMPstring t_i := 5 mod 5; } + { template ASNBMPstring t_i := 5 rem 5; } + { template ASNBMPstring t_i := true and true; } + { template ASNBMPstring t_i := true or true; } + { template ASNBMPstring t_i := not4b 'aa'H; } + { template ASNBMPstring t_i := not4b '00'B; } + { template ASNBMPstring t_i := '00'B and4b '00'B; } + { template ASNBMPstring t_i := '00'H and4b '00'H; } + { template ASNBMPstring t_i := '00'B or4b '00'B; } + { template ASNBMPstring t_i := '00'H or4b '00'H; } + { template ASNBMPstring t_i := '00'B xor4b '00'B; } + { template ASNBMPstring t_i := '00'H xor4b '00'H; } + { template ASNBMPstring t_i := '00'B << 1; } + { template ASNBMPstring t_i := '00'H << 1; } + { template ASNBMPstring t_i := '00'B >> 1; } + { template ASNBMPstring t_i := '00'H >> 1; } + { template ASNBMPstring t_i := '00'B <@ 1; } + { template ASNBMPstring t_i := '00'H <@ 1; } + { template ASNBMPstring t_i := '00'B @> 1; } + { template ASNBMPstring t_i := '00'H @> 1; } + { template ASNBMPstring t_i := '00'B & '00'B; } + { template ASNBMPstring t_i := '00'H & '00'H; } + { template ASNBMPstring t_i := 5 == 5; } + { template ASNBMPstring t_i := 5 != 5; } + { template ASNBMPstring t_i := 5 < 5; } + { template ASNBMPstring t_i := 5 > 5; } + { template ASNBMPstring t_i := 5 <= 5; } + { template ASNBMPstring t_i := 5 >= 5; } + { template ASNBMPstring t_i := bit2hex('00'B); } + { template ASNBMPstring t_i := bit2int('00'B); } + { template ASNBMPstring t_i := bit2oct('00'B); } + { template ASNBMPstring t_i := char2int("5"); } + { template ASNBMPstring t_i := char2oct("akarmi"); } + { template ASNBMPstring t_i := float2int( 5.5); } + { template ASNBMPstring t_i := hex2int('FF'H); } + { template ASNBMPstring t_i := hex2oct('FF00'H); } + { template ASNBMPstring t_i := int2float(5); } + { template ASNBMPstring t_i := oct2bit('00FF'O); } + { template ASNBMPstring t_i := oct2hex('0F'O); } + { template ASNBMPstring t_i := oct2int('0F'O); } + { template ASNBMPstring t_i := str2bit("0101"); } + { template ASNBMPstring t_i := str2float("5.5"); } + { template ASNBMPstring t_i := str2hex("0101"); } + { template ASNBMPstring t_i := str2int("5"); } + { template ASNBMPstring t_i := str2oct("0101"); } + { template ASNBMPstring t_i := unichar2int(char(0,0,0,0)); } + { template ASNBMPstring t_i := unichar2char(char(0,0,0,0)); } + { template ASNBMPstring t_i := int2bit(1,3); } + { template ASNBMPstring t_i := int2hex(1,3); } + { template ASNBMPstring t_i := int2oct(1,3); } + { template ASNBMPstring t_i := rnd(); } + { template ASNBMPstring t_i := rnd(5.5); } + { template ASNBMPstring t_i := isbound(5.5); } + { template ASNBMPstring t_i := isvalue(5.5); } + { template ASNBMPstring t_i := lengthof("akarmi"); } + { template ASNBMPstring t_i := sizeof(cg_recordof); } + { template ASNBMPstring t_i := match(5,5); } + { template ASNBMPstring t_i := mtc; } + { template ASNBMPstring t_i := system; } + { template ASNBMPstring t_i := self; } + { template ASNBMPstring t_i := any component . running; } + { template ASNBMPstring t_i := all component . running; } + { template ASNBMPstring t_i := any component . alive; } + { template ASNBMPstring t_i := all component . alive; } + { template ASNBMPstring t_i := any timer . running; } + { template ASNBMPstring t_i := f_comp_return().running; } + { template ASNBMPstring t_i := f_comp_return().alive; } + { template ASNBMPstring t_i := TL_t.read; } + { template ASNBMPstring t_i := mycomponent.create; } + { template ASNBMPstring t_i := activate(temp_altstep()); } + { template ASNBMPstring t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNBMPstring t_i := execute(temp_altstep(), 5); } + { template ASNBMPstring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNBMPstring t_i := refers(f_functiontypeValueTest); } + { template ASNBMPstring t_i := refers(ef_ext_function); } + { template ASNBMPstring t_i := refers(as_altstep); } + { template ASNBMPstring t_i := refers(tc_testcase); } +} + +function f_ASNGeneralstringValueTests() +{ + timer TL_t := 5.0; + + { template ASNGeneralstring t_i := "akarmi"; } + { template ASNGeneralstring t_i := char(0,0,0,0); } + { template ASNGeneralstring t_i := "akarmi" & "akarmi2"; } + { template ASNGeneralstring t_i := bit2str('00'B); } + { template ASNGeneralstring t_i := float2str(5.5); } + { template ASNGeneralstring t_i := hex2str('FF00'H); } + { template ASNGeneralstring t_i := int2char(5); } + { template ASNGeneralstring t_i := int2str(5); } + { template ASNGeneralstring t_i := int2unichar(5); } + { template ASNGeneralstring t_i := oct2char('0F'O); } + { template ASNGeneralstring t_i := oct2str('0F'O); } + { template ASNGeneralstring t_i := regexp("akarmi","akarmi", 0); } + + { template ASNGeneralstring t_i := omit; } + { template ASNGeneralstring t_i := null; } + { template ASNGeneralstring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNGeneralstring t_i := {field1:=1, field1:="akarmi"}; } + { template ASNGeneralstring t_i := xx4; } + { template ASNGeneralstring t_i := true; } + { template ASNGeneralstring t_i := false; } + { template ASNGeneralstring t_i := not false; } + { template ASNGeneralstring t_i := t_i; } + { template ASNGeneralstring t_i := 5; } + { template ASNGeneralstring t_i := 5.5; } + { template ASNGeneralstring t_i := 'aa'H; } + { template ASNGeneralstring t_i := '00'B; } + { template ASNGeneralstring t_i := {1,2,3}; } + { template ASNGeneralstring t_i := 5 * 5; } + { template ASNGeneralstring t_i := 5 + 5; } + { template ASNGeneralstring t_i := 5 - 5; } + { template ASNGeneralstring t_i := 5 / 5; } + { template ASNGeneralstring t_i := 5 mod 5; } + { template ASNGeneralstring t_i := 5 rem 5; } + { template ASNGeneralstring t_i := true and true; } + { template ASNGeneralstring t_i := true or true; } + { template ASNGeneralstring t_i := not4b 'aa'H; } + { template ASNGeneralstring t_i := not4b '00'B; } + { template ASNGeneralstring t_i := '00'B and4b '00'B; } + { template ASNGeneralstring t_i := '00'H and4b '00'H; } + { template ASNGeneralstring t_i := '00'B or4b '00'B; } + { template ASNGeneralstring t_i := '00'H or4b '00'H; } + { template ASNGeneralstring t_i := '00'B xor4b '00'B; } + { template ASNGeneralstring t_i := '00'H xor4b '00'H; } + { template ASNGeneralstring t_i := '00'B << 1; } + { template ASNGeneralstring t_i := '00'H << 1; } + { template ASNGeneralstring t_i := '00'B >> 1; } + { template ASNGeneralstring t_i := '00'H >> 1; } + { template ASNGeneralstring t_i := '00'B <@ 1; } + { template ASNGeneralstring t_i := '00'H <@ 1; } + { template ASNGeneralstring t_i := '00'B @> 1; } + { template ASNGeneralstring t_i := '00'H @> 1; } + { template ASNGeneralstring t_i := '00'B & '00'B; } + { template ASNGeneralstring t_i := '00'H & '00'H; } + { template ASNGeneralstring t_i := 5 == 5; } + { template ASNGeneralstring t_i := 5 != 5; } + { template ASNGeneralstring t_i := 5 < 5; } + { template ASNGeneralstring t_i := 5 > 5; } + { template ASNGeneralstring t_i := 5 <= 5; } + { template ASNGeneralstring t_i := 5 >= 5; } + { template ASNGeneralstring t_i := bit2hex('00'B); } + { template ASNGeneralstring t_i := bit2int('00'B); } + { template ASNGeneralstring t_i := bit2oct('00'B); } + { template ASNGeneralstring t_i := char2int("5"); } + { template ASNGeneralstring t_i := char2oct("akarmi"); } + { template ASNGeneralstring t_i := float2int( 5.5); } + { template ASNGeneralstring t_i := hex2int('FF'H); } + { template ASNGeneralstring t_i := hex2oct('FF00'H); } + { template ASNGeneralstring t_i := int2float(5); } + { template ASNGeneralstring t_i := oct2bit('00FF'O); } + { template ASNGeneralstring t_i := oct2hex('0F'O); } + { template ASNGeneralstring t_i := oct2int('0F'O); } + { template ASNGeneralstring t_i := str2bit("0101"); } + { template ASNGeneralstring t_i := str2float("5.5"); } + { template ASNGeneralstring t_i := str2hex("0101"); } + { template ASNGeneralstring t_i := str2int("5"); } + { template ASNGeneralstring t_i := str2oct("0101"); } + { template ASNGeneralstring t_i := unichar2int(char(0,0,0,0)); } + { template ASNGeneralstring t_i := unichar2char(char(0,0,0,0)); } + { template ASNGeneralstring t_i := int2bit(1,3); } + { template ASNGeneralstring t_i := int2hex(1,3); } + { template ASNGeneralstring t_i := int2oct(1,3); } + { template ASNGeneralstring t_i := rnd(); } + { template ASNGeneralstring t_i := rnd(5.5); } + { template ASNGeneralstring t_i := isbound(5.5); } + { template ASNGeneralstring t_i := isvalue(5.5); } + { template ASNGeneralstring t_i := lengthof("akarmi"); } + { template ASNGeneralstring t_i := sizeof(cg_recordof); } + { template ASNGeneralstring t_i := match(5,5); } + { template ASNGeneralstring t_i := mtc; } + { template ASNGeneralstring t_i := system; } + { template ASNGeneralstring t_i := self; } + { template ASNGeneralstring t_i := any component . running; } + { template ASNGeneralstring t_i := all component . running; } + { template ASNGeneralstring t_i := any component . alive; } + { template ASNGeneralstring t_i := all component . alive; } + { template ASNGeneralstring t_i := any timer . running; } + { template ASNGeneralstring t_i := f_comp_return().running; } + { template ASNGeneralstring t_i := f_comp_return().alive; } + { template ASNGeneralstring t_i := TL_t.read; } + { template ASNGeneralstring t_i := mycomponent.create; } + { template ASNGeneralstring t_i := activate(temp_altstep()); } + { template ASNGeneralstring t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNGeneralstring t_i := execute(temp_altstep(), 5); } + { template ASNGeneralstring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNGeneralstring t_i := refers(f_functiontypeValueTest); } + { template ASNGeneralstring t_i := refers(ef_ext_function); } + { template ASNGeneralstring t_i := refers(as_altstep); } + { template ASNGeneralstring t_i := refers(tc_testcase); } +} + +function f_ASNGraphicstringValueTests() +{ + timer TL_t := 5.0; + + { template ASNGraphicstring t_i := "akarmi"; } + { template ASNGraphicstring t_i := char(0,0,0,0); } + { template ASNGraphicstring t_i := "akarmi" & "akarmi2"; } + { template ASNGraphicstring t_i := bit2str('00'B); } + { template ASNGraphicstring t_i := float2str(5.5); } + { template ASNGraphicstring t_i := hex2str('FF00'H); } + { template ASNGraphicstring t_i := int2char(5); } + { template ASNGraphicstring t_i := int2str(5); } + { template ASNGraphicstring t_i := int2unichar(5); } + { template ASNGraphicstring t_i := oct2char('0F'O); } + { template ASNGraphicstring t_i := oct2str('0F'O); } + { template ASNGraphicstring t_i := regexp("akarmi","akarmi", 0); } + + { template ASNGraphicstring t_i := omit; } + { template ASNGraphicstring t_i := null; } + { template ASNGraphicstring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNGraphicstring t_i := {field1:=1, field1:="akarmi"}; } + { template ASNGraphicstring t_i := xx4; } + { template ASNGraphicstring t_i := true; } + { template ASNGraphicstring t_i := false; } + { template ASNGraphicstring t_i := not false; } + { template ASNGraphicstring t_i := t_i; } + { template ASNGraphicstring t_i := 5; } + { template ASNGraphicstring t_i := 5.5; } + { template ASNGraphicstring t_i := 'aa'H; } + { template ASNGraphicstring t_i := '00'B; } + { template ASNGraphicstring t_i := {1,2,3}; } + { template ASNGraphicstring t_i := 5 * 5; } + { template ASNGraphicstring t_i := 5 + 5; } + { template ASNGraphicstring t_i := 5 - 5; } + { template ASNGraphicstring t_i := 5 / 5; } + { template ASNGraphicstring t_i := 5 mod 5; } + { template ASNGraphicstring t_i := 5 rem 5; } + { template ASNGraphicstring t_i := true and true; } + { template ASNGraphicstring t_i := true or true; } + { template ASNGraphicstring t_i := not4b 'aa'H; } + { template ASNGraphicstring t_i := not4b '00'B; } + { template ASNGraphicstring t_i := '00'B and4b '00'B; } + { template ASNGraphicstring t_i := '00'H and4b '00'H; } + { template ASNGraphicstring t_i := '00'B or4b '00'B; } + { template ASNGraphicstring t_i := '00'H or4b '00'H; } + { template ASNGraphicstring t_i := '00'B xor4b '00'B; } + { template ASNGraphicstring t_i := '00'H xor4b '00'H; } + { template ASNGraphicstring t_i := '00'B << 1; } + { template ASNGraphicstring t_i := '00'H << 1; } + { template ASNGraphicstring t_i := '00'B >> 1; } + { template ASNGraphicstring t_i := '00'H >> 1; } + { template ASNGraphicstring t_i := '00'B <@ 1; } + { template ASNGraphicstring t_i := '00'H <@ 1; } + { template ASNGraphicstring t_i := '00'B @> 1; } + { template ASNGraphicstring t_i := '00'H @> 1; } + { template ASNGraphicstring t_i := '00'B & '00'B; } + { template ASNGraphicstring t_i := '00'H & '00'H; } + { template ASNGraphicstring t_i := 5 == 5; } + { template ASNGraphicstring t_i := 5 != 5; } + { template ASNGraphicstring t_i := 5 < 5; } + { template ASNGraphicstring t_i := 5 > 5; } + { template ASNGraphicstring t_i := 5 <= 5; } + { template ASNGraphicstring t_i := 5 >= 5; } + { template ASNGraphicstring t_i := bit2hex('00'B); } + { template ASNGraphicstring t_i := bit2int('00'B); } + { template ASNGraphicstring t_i := bit2oct('00'B); } + { template ASNGraphicstring t_i := char2int("5"); } + { template ASNGraphicstring t_i := char2oct("akarmi"); } + { template ASNGraphicstring t_i := float2int( 5.5); } + { template ASNGraphicstring t_i := hex2int('FF'H); } + { template ASNGraphicstring t_i := hex2oct('FF00'H); } + { template ASNGraphicstring t_i := int2float(5); } + { template ASNGraphicstring t_i := oct2bit('00FF'O); } + { template ASNGraphicstring t_i := oct2hex('0F'O); } + { template ASNGraphicstring t_i := oct2int('0F'O); } + { template ASNGraphicstring t_i := str2bit("0101"); } + { template ASNGraphicstring t_i := str2float("5.5"); } + { template ASNGraphicstring t_i := str2hex("0101"); } + { template ASNGraphicstring t_i := str2int("5"); } + { template ASNGraphicstring t_i := str2oct("0101"); } + { template ASNGraphicstring t_i := unichar2int(char(0,0,0,0)); } + { template ASNGraphicstring t_i := unichar2char(char(0,0,0,0)); } + { template ASNGraphicstring t_i := int2bit(1,3); } + { template ASNGraphicstring t_i := int2hex(1,3); } + { template ASNGraphicstring t_i := int2oct(1,3); } + { template ASNGraphicstring t_i := rnd(); } + { template ASNGraphicstring t_i := rnd(5.5); } + { template ASNGraphicstring t_i := isbound(5.5); } + { template ASNGraphicstring t_i := isvalue(5.5); } + { template ASNGraphicstring t_i := lengthof("akarmi"); } + { template ASNGraphicstring t_i := sizeof(cg_recordof); } + { template ASNGraphicstring t_i := match(5,5); } + { template ASNGraphicstring t_i := mtc; } + { template ASNGraphicstring t_i := system; } + { template ASNGraphicstring t_i := self; } + { template ASNGraphicstring t_i := any component . running; } + { template ASNGraphicstring t_i := all component . running; } + { template ASNGraphicstring t_i := any component . alive; } + { template ASNGraphicstring t_i := all component . alive; } + { template ASNGraphicstring t_i := any timer . running; } + { template ASNGraphicstring t_i := f_comp_return().running; } + { template ASNGraphicstring t_i := f_comp_return().alive; } + { template ASNGraphicstring t_i := TL_t.read; } + { template ASNGraphicstring t_i := mycomponent.create; } + { template ASNGraphicstring t_i := activate(temp_altstep()); } + { template ASNGraphicstring t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNGraphicstring t_i := execute(temp_altstep(), 5); } + { template ASNGraphicstring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNGraphicstring t_i := refers(f_functiontypeValueTest); } + { template ASNGraphicstring t_i := refers(ef_ext_function); } + { template ASNGraphicstring t_i := refers(as_altstep); } + { template ASNGraphicstring t_i := refers(tc_testcase); } +} + +function f_ASNIA5stringValueTests() +{ + timer TL_t := 5.0; + + { template ASNIA5string t_i := "akarmi"; } + { template ASNIA5string t_i := char(0,0,0,0); } + { template ASNIA5string t_i := "akarmi" & "akarmi2"; } + { template ASNIA5string t_i := bit2str('00'B); } + { template ASNIA5string t_i := float2str(5.5); } + { template ASNIA5string t_i := hex2str('FF00'H); } + { template ASNIA5string t_i := int2char(5); } + { template ASNIA5string t_i := int2str(5); } + { template ASNIA5string t_i := int2unichar(5); } + { template ASNIA5string t_i := oct2char('0F'O); } + { template ASNIA5string t_i := oct2str('0F'O); } + { template ASNIA5string t_i := regexp("akarmi","akarmi", 0); } + + { template ASNIA5string t_i := omit; } + { template ASNIA5string t_i := null; } + { template ASNIA5string t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNIA5string t_i := {field1:=1, field1:="akarmi"}; } + { template ASNIA5string t_i := xx4; } + { template ASNIA5string t_i := true; } + { template ASNIA5string t_i := false; } + { template ASNIA5string t_i := not false; } + { template ASNIA5string t_i := t_i; } + { template ASNIA5string t_i := 5; } + { template ASNIA5string t_i := 5.5; } + { template ASNIA5string t_i := 'aa'H; } + { template ASNIA5string t_i := '00'B; } + { template ASNIA5string t_i := {1,2,3}; } + { template ASNIA5string t_i := 5 * 5; } + { template ASNIA5string t_i := 5 + 5; } + { template ASNIA5string t_i := 5 - 5; } + { template ASNIA5string t_i := 5 / 5; } + { template ASNIA5string t_i := 5 mod 5; } + { template ASNIA5string t_i := 5 rem 5; } + { template ASNIA5string t_i := true and true; } + { template ASNIA5string t_i := true or true; } + { template ASNIA5string t_i := not4b 'aa'H; } + { template ASNIA5string t_i := not4b '00'B; } + { template ASNIA5string t_i := '00'B and4b '00'B; } + { template ASNIA5string t_i := '00'H and4b '00'H; } + { template ASNIA5string t_i := '00'B or4b '00'B; } + { template ASNIA5string t_i := '00'H or4b '00'H; } + { template ASNIA5string t_i := '00'B xor4b '00'B; } + { template ASNIA5string t_i := '00'H xor4b '00'H; } + { template ASNIA5string t_i := '00'B << 1; } + { template ASNIA5string t_i := '00'H << 1; } + { template ASNIA5string t_i := '00'B >> 1; } + { template ASNIA5string t_i := '00'H >> 1; } + { template ASNIA5string t_i := '00'B <@ 1; } + { template ASNIA5string t_i := '00'H <@ 1; } + { template ASNIA5string t_i := '00'B @> 1; } + { template ASNIA5string t_i := '00'H @> 1; } + { template ASNIA5string t_i := '00'B & '00'B; } + { template ASNIA5string t_i := '00'H & '00'H; } + { template ASNIA5string t_i := 5 == 5; } + { template ASNIA5string t_i := 5 != 5; } + { template ASNIA5string t_i := 5 < 5; } + { template ASNIA5string t_i := 5 > 5; } + { template ASNIA5string t_i := 5 <= 5; } + { template ASNIA5string t_i := 5 >= 5; } + { template ASNIA5string t_i := bit2hex('00'B); } + { template ASNIA5string t_i := bit2int('00'B); } + { template ASNIA5string t_i := bit2oct('00'B); } + { template ASNIA5string t_i := char2int("5"); } + { template ASNIA5string t_i := char2oct("akarmi"); } + { template ASNIA5string t_i := float2int( 5.5); } + { template ASNIA5string t_i := hex2int('FF'H); } + { template ASNIA5string t_i := hex2oct('FF00'H); } + { template ASNIA5string t_i := int2float(5); } + { template ASNIA5string t_i := oct2bit('00FF'O); } + { template ASNIA5string t_i := oct2hex('0F'O); } + { template ASNIA5string t_i := oct2int('0F'O); } + { template ASNIA5string t_i := str2bit("0101"); } + { template ASNIA5string t_i := str2float("5.5"); } + { template ASNIA5string t_i := str2hex("0101"); } + { template ASNIA5string t_i := str2int("5"); } + { template ASNIA5string t_i := str2oct("0101"); } + { template ASNIA5string t_i := unichar2int(char(0,0,0,0)); } + { template ASNIA5string t_i := unichar2char(char(0,0,0,0)); } + { template ASNIA5string t_i := int2bit(1,3); } + { template ASNIA5string t_i := int2hex(1,3); } + { template ASNIA5string t_i := int2oct(1,3); } + { template ASNIA5string t_i := rnd(); } + { template ASNIA5string t_i := rnd(5.5); } + { template ASNIA5string t_i := isbound(5.5); } + { template ASNIA5string t_i := isvalue(5.5); } + { template ASNIA5string t_i := lengthof("akarmi"); } + { template ASNIA5string t_i := sizeof(cg_recordof); } + { template ASNIA5string t_i := match(5,5); } + { template ASNIA5string t_i := mtc; } + { template ASNIA5string t_i := system; } + { template ASNIA5string t_i := self; } + { template ASNIA5string t_i := any component . running; } + { template ASNIA5string t_i := all component . running; } + { template ASNIA5string t_i := any component . alive; } + { template ASNIA5string t_i := all component . alive; } + { template ASNIA5string t_i := any timer . running; } + { template ASNIA5string t_i := f_comp_return().running; } + { template ASNIA5string t_i := f_comp_return().alive; } + { template ASNIA5string t_i := TL_t.read; } + { template ASNIA5string t_i := mycomponent.create; } + { template ASNIA5string t_i := activate(temp_altstep()); } + { template ASNIA5string t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNIA5string t_i := execute(temp_altstep(), 5); } + { template ASNIA5string t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNIA5string t_i := refers(f_functiontypeValueTest); } + { template ASNIA5string t_i := refers(ef_ext_function); } + { template ASNIA5string t_i := refers(as_altstep); } + { template ASNIA5string t_i := refers(tc_testcase); } +} + +function f_ASNNumericstringValueTests() +{ + timer TL_t := 5.0; + + { template ASNNumericstring t_i := "akarmi"; } + { template ASNNumericstring t_i := char(0,0,0,0); } + { template ASNNumericstring t_i := "akarmi" & "akarmi2"; } + { template ASNNumericstring t_i := bit2str('00'B); } + { template ASNNumericstring t_i := float2str(5.5); } + { template ASNNumericstring t_i := hex2str('FF00'H); } + { template ASNNumericstring t_i := int2char(5); } + { template ASNNumericstring t_i := int2str(5); } + { template ASNNumericstring t_i := int2unichar(5); } + { template ASNNumericstring t_i := oct2char('0F'O); } + { template ASNNumericstring t_i := oct2str('0F'O); } + { template ASNNumericstring t_i := regexp("akarmi","akarmi", 0); } + + { template ASNNumericstring t_i := omit; } + { template ASNNumericstring t_i := null; } + { template ASNNumericstring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNNumericstring t_i := {field1:=1, field1:="akarmi"}; } + { template ASNNumericstring t_i := xx4; } + { template ASNNumericstring t_i := true; } + { template ASNNumericstring t_i := false; } + { template ASNNumericstring t_i := not false; } + { template ASNNumericstring t_i := t_i; } + { template ASNNumericstring t_i := 5; } + { template ASNNumericstring t_i := 5.5; } + { template ASNNumericstring t_i := 'aa'H; } + { template ASNNumericstring t_i := '00'B; } + { template ASNNumericstring t_i := {1,2,3}; } + { template ASNNumericstring t_i := 5 * 5; } + { template ASNNumericstring t_i := 5 + 5; } + { template ASNNumericstring t_i := 5 - 5; } + { template ASNNumericstring t_i := 5 / 5; } + { template ASNNumericstring t_i := 5 mod 5; } + { template ASNNumericstring t_i := 5 rem 5; } + { template ASNNumericstring t_i := true and true; } + { template ASNNumericstring t_i := true or true; } + { template ASNNumericstring t_i := not4b 'aa'H; } + { template ASNNumericstring t_i := not4b '00'B; } + { template ASNNumericstring t_i := '00'B and4b '00'B; } + { template ASNNumericstring t_i := '00'H and4b '00'H; } + { template ASNNumericstring t_i := '00'B or4b '00'B; } + { template ASNNumericstring t_i := '00'H or4b '00'H; } + { template ASNNumericstring t_i := '00'B xor4b '00'B; } + { template ASNNumericstring t_i := '00'H xor4b '00'H; } + { template ASNNumericstring t_i := '00'B << 1; } + { template ASNNumericstring t_i := '00'H << 1; } + { template ASNNumericstring t_i := '00'B >> 1; } + { template ASNNumericstring t_i := '00'H >> 1; } + { template ASNNumericstring t_i := '00'B <@ 1; } + { template ASNNumericstring t_i := '00'H <@ 1; } + { template ASNNumericstring t_i := '00'B @> 1; } + { template ASNNumericstring t_i := '00'H @> 1; } + { template ASNNumericstring t_i := '00'B & '00'B; } + { template ASNNumericstring t_i := '00'H & '00'H; } + { template ASNNumericstring t_i := 5 == 5; } + { template ASNNumericstring t_i := 5 != 5; } + { template ASNNumericstring t_i := 5 < 5; } + { template ASNNumericstring t_i := 5 > 5; } + { template ASNNumericstring t_i := 5 <= 5; } + { template ASNNumericstring t_i := 5 >= 5; } + { template ASNNumericstring t_i := bit2hex('00'B); } + { template ASNNumericstring t_i := bit2int('00'B); } + { template ASNNumericstring t_i := bit2oct('00'B); } + { template ASNNumericstring t_i := char2int("5"); } + { template ASNNumericstring t_i := char2oct("akarmi"); } + { template ASNNumericstring t_i := float2int( 5.5); } + { template ASNNumericstring t_i := hex2int('FF'H); } + { template ASNNumericstring t_i := hex2oct('FF00'H); } + { template ASNNumericstring t_i := int2float(5); } + { template ASNNumericstring t_i := oct2bit('00FF'O); } + { template ASNNumericstring t_i := oct2hex('0F'O); } + { template ASNNumericstring t_i := oct2int('0F'O); } + { template ASNNumericstring t_i := str2bit("0101"); } + { template ASNNumericstring t_i := str2float("5.5"); } + { template ASNNumericstring t_i := str2hex("0101"); } + { template ASNNumericstring t_i := str2int("5"); } + { template ASNNumericstring t_i := str2oct("0101"); } + { template ASNNumericstring t_i := unichar2int(char(0,0,0,0)); } + { template ASNNumericstring t_i := unichar2char(char(0,0,0,0)); } + { template ASNNumericstring t_i := int2bit(1,3); } + { template ASNNumericstring t_i := int2hex(1,3); } + { template ASNNumericstring t_i := int2oct(1,3); } + { template ASNNumericstring t_i := rnd(); } + { template ASNNumericstring t_i := rnd(5.5); } + { template ASNNumericstring t_i := isbound(5.5); } + { template ASNNumericstring t_i := isvalue(5.5); } + { template ASNNumericstring t_i := lengthof("akarmi"); } + { template ASNNumericstring t_i := sizeof(cg_recordof); } + { template ASNNumericstring t_i := match(5,5); } + { template ASNNumericstring t_i := mtc; } + { template ASNNumericstring t_i := system; } + { template ASNNumericstring t_i := self; } + { template ASNNumericstring t_i := any component . running; } + { template ASNNumericstring t_i := all component . running; } + { template ASNNumericstring t_i := any component . alive; } + { template ASNNumericstring t_i := all component . alive; } + { template ASNNumericstring t_i := any timer . running; } + { template ASNNumericstring t_i := f_comp_return().running; } + { template ASNNumericstring t_i := f_comp_return().alive; } + { template ASNNumericstring t_i := TL_t.read; } + { template ASNNumericstring t_i := mycomponent.create; } + { template ASNNumericstring t_i := activate(temp_altstep()); } + { template ASNNumericstring t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNNumericstring t_i := execute(temp_altstep(), 5); } + { template ASNNumericstring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNNumericstring t_i := refers(f_functiontypeValueTest); } + { template ASNNumericstring t_i := refers(ef_ext_function); } + { template ASNNumericstring t_i := refers(as_altstep); } + { template ASNNumericstring t_i := refers(tc_testcase); } +} + +function f_ASNOctetStringValueTests() +{ + timer TL_t := 5.0; + + { template ASNOctetString t_i := 'aa'O; } + { template ASNOctetString t_i := not4b 'aa'O; } + { template ASNOctetString t_i := '00'O and4b '00'O; } + { template ASNOctetString t_i := '00'O or4b '00'O; } + { template ASNOctetString t_i := '00'O xor4b '00'O; } + { template ASNOctetString t_i := '00'O << 1; } + { template ASNOctetString t_i := '00'O >> 1; } + { template ASNOctetString t_i := '1100'O <@ 1; } + { template ASNOctetString t_i := '1100'O @> 1; } + { template ASNOctetString t_i := '00'O & '00'O; } + { template ASNOctetString t_i := bit2oct('00'B); } + { template ASNOctetString t_i := char2oct("akarmi"); } + { template ASNOctetString t_i := hex2oct('FF00'H); } + { template ASNOctetString t_i := str2oct("0101"); } + { template ASNOctetString t_i := int2oct(1,3); } + + { template ASNOctetString t_i := omit; } + { template ASNOctetString t_i := null; } + { template ASNOctetString t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNOctetString t_i := {field1:=1, field1:="akarmi"}; } + { template ASNOctetString t_i := true; } + { template ASNOctetString t_i := false; } + { template ASNOctetString t_i := pass; } + { template ASNOctetString t_i := not false; } + { template ASNOctetString t_i := t_i; } + { template ASNOctetString t_i := 5; } + { template ASNOctetString t_i := 5.5; } + { template ASNOctetString t_i := "akarmi"; } + { template ASNOctetString t_i := char(0,0,0,0); } + { template ASNOctetString t_i := 'aa'H; } + { template ASNOctetString t_i := '00'B; } + { template ASNOctetString t_i := {1,2,3}; } + { template ASNOctetString t_i := 5 * 5; } + { template ASNOctetString t_i := 5 + 5; } + { template ASNOctetString t_i := 5 - 5; } + { template ASNOctetString t_i := 5 / 5; } + { template ASNOctetString t_i := 5 mod 5; } + { template ASNOctetString t_i := 5 rem 5; } + { template ASNOctetString t_i := true and true; } + { template ASNOctetString t_i := true or true; } + { template ASNOctetString t_i := not4b 'aa'H; } + { template ASNOctetString t_i := not4b '00'B; } + { template ASNOctetString t_i := '00'B and4b '00'B; } + { template ASNOctetString t_i := '00'H and4b '00'H; } + { template ASNOctetString t_i := '00'B or4b '00'B; } + { template ASNOctetString t_i := '00'H or4b '00'H; } + { template ASNOctetString t_i := '00'B xor4b '00'B; } + { template ASNOctetString t_i := '00'H xor4b '00'H; } + { template ASNOctetString t_i := '00'B << 1; } + { template ASNOctetString t_i := '00'H << 1; } + { template ASNOctetString t_i := '00'B >> 1; } + { template ASNOctetString t_i := '00'H >> 1; } + { template ASNOctetString t_i := '00'B <@ 1; } + { template ASNOctetString t_i := '00'H <@ 1; } + { template ASNOctetString t_i := '00'B @> 1; } + { template ASNOctetString t_i := '00'H @> 1; } + { template ASNOctetString t_i := '00'B & '00'B; } + { template ASNOctetString t_i := '00'H & '00'H; } + { template ASNOctetString t_i := "akarmi" & "akarmi2"; } + { template ASNOctetString t_i := 5 == 5; } + { template ASNOctetString t_i := 5 != 5; } + { template ASNOctetString t_i := 5 < 5; } + { template ASNOctetString t_i := 5 > 5; } + { template ASNOctetString t_i := 5 <= 5; } + { template ASNOctetString t_i := 5 >= 5; } + { template ASNOctetString t_i := bit2hex('00'B); } + { template ASNOctetString t_i := bit2int('00'B); } + { template ASNOctetString t_i := bit2str('00'B); } + { template ASNOctetString t_i := char2int("5"); } + { template ASNOctetString t_i := float2int( 5.5); } + { template ASNOctetString t_i := float2str(5.5); } + { template ASNOctetString t_i := hex2int('FF'H); } + { template ASNOctetString t_i := hex2str('FF00'H); } + { template ASNOctetString t_i := int2char(5); } + { template ASNOctetString t_i := int2float(5); } + { template ASNOctetString t_i := int2str(5); } + { template ASNOctetString t_i := int2unichar(5); } + { template ASNOctetString t_i := oct2bit('00FF'O); } + { template ASNOctetString t_i := oct2char('0F'O); } + { template ASNOctetString t_i := oct2hex('0F'O); } + { template ASNOctetString t_i := oct2int('0F'O); } + { template ASNOctetString t_i := oct2str('0F'O); } + { template ASNOctetString t_i := str2bit("0101"); } + { template ASNOctetString t_i := str2float("5.5"); } + { template ASNOctetString t_i := str2hex("0101"); } + { template ASNOctetString t_i := str2int("5"); } + { template ASNOctetString t_i := unichar2int(char(0,0,0,0)); } + { template ASNOctetString t_i := unichar2char(char(0,0,0,0)); } + { template ASNOctetString t_i := int2bit(1,3); } + { template ASNOctetString t_i := int2hex(1,3); } + { template ASNOctetString t_i := rnd(); } + { template ASNOctetString t_i := rnd(5.5); } + { template ASNOctetString t_i := isbound(5.5); } + { template ASNOctetString t_i := isvalue(5.5); } + { template ASNOctetString t_i := lengthof("akarmi"); } + { template ASNOctetString t_i := sizeof(cg_recordof); } + { template ASNOctetString t_i := regexp("akarmi","akarmi", 0); } + { template ASNOctetString t_i := match(5,5); } + { template ASNOctetString t_i := mtc; } + { template ASNOctetString t_i := system; } + { template ASNOctetString t_i := self; } + { template ASNOctetString t_i := any component . running; } + { template ASNOctetString t_i := all component . running; } + { template ASNOctetString t_i := any component . alive; } + { template ASNOctetString t_i := all component . alive; } + { template ASNOctetString t_i := any timer . running; } + { template ASNOctetString t_i := f_comp_return().running; } + { template ASNOctetString t_i := f_comp_return().alive; } + { template ASNOctetString t_i := TL_t.read; } + { template ASNOctetString t_i := mycomponent.create; } + { template ASNOctetString t_i := activate(temp_altstep()); } + { template ASNOctetString t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNOctetString t_i := execute(temp_altstep(), 5); } + { template ASNOctetString t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNOctetString t_i := refers(f_functiontypeValueTest); } + { template ASNOctetString t_i := refers(ef_ext_function); } + { template ASNOctetString t_i := refers(as_altstep); } + { template ASNOctetString t_i := refers(tc_testcase); } +} + +function f_ASNISO646StringValueTests() +{ + timer TL_t := 5.0; + + { template ASNISO646String t_i := "akarmi"; } + { template ASNISO646String t_i := char(0,0,0,0); } + { template ASNISO646String t_i := "akarmi" & "akarmi2"; } + { template ASNISO646String t_i := bit2str('00'B); } + { template ASNISO646String t_i := float2str(5.5); } + { template ASNISO646String t_i := hex2str('FF00'H); } + { template ASNISO646String t_i := int2char(5); } + { template ASNISO646String t_i := int2str(5); } + { template ASNISO646String t_i := int2unichar(5); } + { template ASNISO646String t_i := oct2char('0F'O); } + { template ASNISO646String t_i := oct2str('0F'O); } + { template ASNISO646String t_i := regexp("akarmi","akarmi", 0); } + + { template ASNISO646String t_i := omit; } + { template ASNISO646String t_i := null; } + { template ASNISO646String t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNISO646String t_i := {field1:=1, field1:="akarmi"}; } + { template ASNISO646String t_i := xx4; } + { template ASNISO646String t_i := true; } + { template ASNISO646String t_i := false; } + { template ASNISO646String t_i := not false; } + { template ASNISO646String t_i := t_i; } + { template ASNISO646String t_i := 5; } + { template ASNISO646String t_i := 5.5; } + { template ASNISO646String t_i := 'aa'H; } + { template ASNISO646String t_i := '00'B; } + { template ASNISO646String t_i := {1,2,3}; } + { template ASNISO646String t_i := 5 * 5; } + { template ASNISO646String t_i := 5 + 5; } + { template ASNISO646String t_i := 5 - 5; } + { template ASNISO646String t_i := 5 / 5; } + { template ASNISO646String t_i := 5 mod 5; } + { template ASNISO646String t_i := 5 rem 5; } + { template ASNISO646String t_i := true and true; } + { template ASNISO646String t_i := true or true; } + { template ASNISO646String t_i := not4b 'aa'H; } + { template ASNISO646String t_i := not4b '00'B; } + { template ASNISO646String t_i := '00'B and4b '00'B; } + { template ASNISO646String t_i := '00'H and4b '00'H; } + { template ASNISO646String t_i := '00'B or4b '00'B; } + { template ASNISO646String t_i := '00'H or4b '00'H; } + { template ASNISO646String t_i := '00'B xor4b '00'B; } + { template ASNISO646String t_i := '00'H xor4b '00'H; } + { template ASNISO646String t_i := '00'B << 1; } + { template ASNISO646String t_i := '00'H << 1; } + { template ASNISO646String t_i := '00'B >> 1; } + { template ASNISO646String t_i := '00'H >> 1; } + { template ASNISO646String t_i := '00'B <@ 1; } + { template ASNISO646String t_i := '00'H <@ 1; } + { template ASNISO646String t_i := '00'B @> 1; } + { template ASNISO646String t_i := '00'H @> 1; } + { template ASNISO646String t_i := '00'B & '00'B; } + { template ASNISO646String t_i := '00'H & '00'H; } + { template ASNISO646String t_i := 5 == 5; } + { template ASNISO646String t_i := 5 != 5; } + { template ASNISO646String t_i := 5 < 5; } + { template ASNISO646String t_i := 5 > 5; } + { template ASNISO646String t_i := 5 <= 5; } + { template ASNISO646String t_i := 5 >= 5; } + { template ASNISO646String t_i := bit2hex('00'B); } + { template ASNISO646String t_i := bit2int('00'B); } + { template ASNISO646String t_i := bit2oct('00'B); } + { template ASNISO646String t_i := char2int("5"); } + { template ASNISO646String t_i := char2oct("akarmi"); } + { template ASNISO646String t_i := float2int( 5.5); } + { template ASNISO646String t_i := hex2int('FF'H); } + { template ASNISO646String t_i := hex2oct('FF00'H); } + { template ASNISO646String t_i := int2float(5); } + { template ASNISO646String t_i := oct2bit('00FF'O); } + { template ASNISO646String t_i := oct2hex('0F'O); } + { template ASNISO646String t_i := oct2int('0F'O); } + { template ASNISO646String t_i := str2bit("0101"); } + { template ASNISO646String t_i := str2float("5.5"); } + { template ASNISO646String t_i := str2hex("0101"); } + { template ASNISO646String t_i := str2int("5"); } + { template ASNISO646String t_i := str2oct("0101"); } + { template ASNISO646String t_i := unichar2int(char(0,0,0,0)); } + { template ASNISO646String t_i := unichar2char(char(0,0,0,0)); } + { template ASNISO646String t_i := int2bit(1,3); } + { template ASNISO646String t_i := int2hex(1,3); } + { template ASNISO646String t_i := int2oct(1,3); } + { template ASNISO646String t_i := rnd(); } + { template ASNISO646String t_i := rnd(5.5); } + { template ASNISO646String t_i := isbound(5.5); } + { template ASNISO646String t_i := isvalue(5.5); } + { template ASNISO646String t_i := lengthof("akarmi"); } + { template ASNISO646String t_i := sizeof(cg_recordof); } + { template ASNISO646String t_i := match(5,5); } + { template ASNISO646String t_i := mtc; } + { template ASNISO646String t_i := system; } + { template ASNISO646String t_i := self; } + { template ASNISO646String t_i := any component . running; } + { template ASNISO646String t_i := all component . running; } + { template ASNISO646String t_i := any component . alive; } + { template ASNISO646String t_i := all component . alive; } + { template ASNISO646String t_i := any timer . running; } + { template ASNISO646String t_i := f_comp_return().running; } + { template ASNISO646String t_i := f_comp_return().alive; } + { template ASNISO646String t_i := TL_t.read; } + { template ASNISO646String t_i := mycomponent.create; } + { template ASNISO646String t_i := activate(temp_altstep()); } + { template ASNISO646String t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNISO646String t_i := execute(temp_altstep(), 5); } + { template ASNISO646String t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNISO646String t_i := refers(f_functiontypeValueTest); } + { template ASNISO646String t_i := refers(ef_ext_function); } + { template ASNISO646String t_i := refers(as_altstep); } + { template ASNISO646String t_i := refers(tc_testcase); } +} + +function f_ASNT61StringValueTests() +{ + timer TL_t := 5.0; + + { template ASNT61String t_i := "akarmi"; } + { template ASNT61String t_i := char(0,0,0,0); } + { template ASNT61String t_i := "akarmi" & "akarmi2"; } + { template ASNT61String t_i := bit2str('00'B); } + { template ASNT61String t_i := float2str(5.5); } + { template ASNT61String t_i := hex2str('FF00'H); } + { template ASNT61String t_i := int2char(5); } + { template ASNT61String t_i := int2str(5); } + { template ASNT61String t_i := int2unichar(5); } + { template ASNT61String t_i := oct2char('0F'O); } + { template ASNT61String t_i := oct2str('0F'O); } + { template ASNT61String t_i := regexp("akarmi","akarmi", 0); } + + { template ASNT61String t_i := omit; } + { template ASNT61String t_i := null; } + { template ASNT61String t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNT61String t_i := {field1:=1, field1:="akarmi"}; } + { template ASNT61String t_i := xx4; } + { template ASNT61String t_i := true; } + { template ASNT61String t_i := false; } + { template ASNT61String t_i := not false; } + { template ASNT61String t_i := t_i; } + { template ASNT61String t_i := 5; } + { template ASNT61String t_i := 5.5; } + { template ASNT61String t_i := 'aa'H; } + { template ASNT61String t_i := '00'B; } + { template ASNT61String t_i := {1,2,3}; } + { template ASNT61String t_i := 5 * 5; } + { template ASNT61String t_i := 5 + 5; } + { template ASNT61String t_i := 5 - 5; } + { template ASNT61String t_i := 5 / 5; } + { template ASNT61String t_i := 5 mod 5; } + { template ASNT61String t_i := 5 rem 5; } + { template ASNT61String t_i := true and true; } + { template ASNT61String t_i := true or true; } + { template ASNT61String t_i := not4b 'aa'H; } + { template ASNT61String t_i := not4b '00'B; } + { template ASNT61String t_i := '00'B and4b '00'B; } + { template ASNT61String t_i := '00'H and4b '00'H; } + { template ASNT61String t_i := '00'B or4b '00'B; } + { template ASNT61String t_i := '00'H or4b '00'H; } + { template ASNT61String t_i := '00'B xor4b '00'B; } + { template ASNT61String t_i := '00'H xor4b '00'H; } + { template ASNT61String t_i := '00'B << 1; } + { template ASNT61String t_i := '00'H << 1; } + { template ASNT61String t_i := '00'B >> 1; } + { template ASNT61String t_i := '00'H >> 1; } + { template ASNT61String t_i := '00'B <@ 1; } + { template ASNT61String t_i := '00'H <@ 1; } + { template ASNT61String t_i := '00'B @> 1; } + { template ASNT61String t_i := '00'H @> 1; } + { template ASNT61String t_i := '00'B & '00'B; } + { template ASNT61String t_i := '00'H & '00'H; } + { template ASNT61String t_i := 5 == 5; } + { template ASNT61String t_i := 5 != 5; } + { template ASNT61String t_i := 5 < 5; } + { template ASNT61String t_i := 5 > 5; } + { template ASNT61String t_i := 5 <= 5; } + { template ASNT61String t_i := 5 >= 5; } + { template ASNT61String t_i := bit2hex('00'B); } + { template ASNT61String t_i := bit2int('00'B); } + { template ASNT61String t_i := bit2oct('00'B); } + { template ASNT61String t_i := char2int("5"); } + { template ASNT61String t_i := char2oct("akarmi"); } + { template ASNT61String t_i := float2int( 5.5); } + { template ASNT61String t_i := hex2int('FF'H); } + { template ASNT61String t_i := hex2oct('FF00'H); } + { template ASNT61String t_i := int2float(5); } + { template ASNT61String t_i := oct2bit('00FF'O); } + { template ASNT61String t_i := oct2hex('0F'O); } + { template ASNT61String t_i := oct2int('0F'O); } + { template ASNT61String t_i := str2bit("0101"); } + { template ASNT61String t_i := str2float("5.5"); } + { template ASNT61String t_i := str2hex("0101"); } + { template ASNT61String t_i := str2int("5"); } + { template ASNT61String t_i := str2oct("0101"); } + { template ASNT61String t_i := unichar2int(char(0,0,0,0)); } + { template ASNT61String t_i := unichar2char(char(0,0,0,0)); } + { template ASNT61String t_i := int2bit(1,3); } + { template ASNT61String t_i := int2hex(1,3); } + { template ASNT61String t_i := int2oct(1,3); } + { template ASNT61String t_i := rnd(); } + { template ASNT61String t_i := rnd(5.5); } + { template ASNT61String t_i := isbound(5.5); } + { template ASNT61String t_i := isvalue(5.5); } + { template ASNT61String t_i := lengthof("akarmi"); } + { template ASNT61String t_i := sizeof(cg_recordof); } + { template ASNT61String t_i := match(5,5); } + { template ASNT61String t_i := mtc; } + { template ASNT61String t_i := system; } + { template ASNT61String t_i := self; } + { template ASNT61String t_i := any component . running; } + { template ASNT61String t_i := all component . running; } + { template ASNT61String t_i := any component . alive; } + { template ASNT61String t_i := all component . alive; } + { template ASNT61String t_i := any timer . running; } + { template ASNT61String t_i := f_comp_return().running; } + { template ASNT61String t_i := f_comp_return().alive; } + { template ASNT61String t_i := TL_t.read; } + { template ASNT61String t_i := mycomponent.create; } + { template ASNT61String t_i := activate(temp_altstep()); } + { template ASNT61String t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNT61String t_i := execute(temp_altstep(), 5); } + { template ASNT61String t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNT61String t_i := refers(f_functiontypeValueTest); } + { template ASNT61String t_i := refers(ef_ext_function); } + { template ASNT61String t_i := refers(as_altstep); } + { template ASNT61String t_i := refers(tc_testcase); } +} + +function f_ASNPrintablestringValueTests() +{ + timer TL_t := 5.0; + + { template ASNPrintablestring t_i := "akarmi"; } + { template ASNPrintablestring t_i := char(0,0,0,0); } + { template ASNPrintablestring t_i := "akarmi" & "akarmi2"; } + { template ASNPrintablestring t_i := bit2str('00'B); } + { template ASNPrintablestring t_i := float2str(5.5); } + { template ASNPrintablestring t_i := hex2str('FF00'H); } + { template ASNPrintablestring t_i := int2char(5); } + { template ASNPrintablestring t_i := int2str(5); } + { template ASNPrintablestring t_i := int2unichar(5); } + { template ASNPrintablestring t_i := oct2char('0F'O); } + { template ASNPrintablestring t_i := oct2str('0F'O); } + { template ASNPrintablestring t_i := regexp("akarmi","akarmi", 0); } + + { template ASNPrintablestring t_i := omit; } + { template ASNPrintablestring t_i := null; } + { template ASNPrintablestring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNPrintablestring t_i := {field1:=1, field1:="akarmi"}; } + { template ASNPrintablestring t_i := xx4; } + { template ASNPrintablestring t_i := true; } + { template ASNPrintablestring t_i := false; } + { template ASNPrintablestring t_i := not false; } + { template ASNPrintablestring t_i := t_i; } + { template ASNPrintablestring t_i := 5; } + { template ASNPrintablestring t_i := 5.5; } + { template ASNPrintablestring t_i := 'aa'H; } + { template ASNPrintablestring t_i := '00'B; } + { template ASNPrintablestring t_i := {1,2,3}; } + { template ASNPrintablestring t_i := 5 * 5; } + { template ASNPrintablestring t_i := 5 + 5; } + { template ASNPrintablestring t_i := 5 - 5; } + { template ASNPrintablestring t_i := 5 / 5; } + { template ASNPrintablestring t_i := 5 mod 5; } + { template ASNPrintablestring t_i := 5 rem 5; } + { template ASNPrintablestring t_i := true and true; } + { template ASNPrintablestring t_i := true or true; } + { template ASNPrintablestring t_i := not4b 'aa'H; } + { template ASNPrintablestring t_i := not4b '00'B; } + { template ASNPrintablestring t_i := '00'B and4b '00'B; } + { template ASNPrintablestring t_i := '00'H and4b '00'H; } + { template ASNPrintablestring t_i := '00'B or4b '00'B; } + { template ASNPrintablestring t_i := '00'H or4b '00'H; } + { template ASNPrintablestring t_i := '00'B xor4b '00'B; } + { template ASNPrintablestring t_i := '00'H xor4b '00'H; } + { template ASNPrintablestring t_i := '00'B << 1; } + { template ASNPrintablestring t_i := '00'H << 1; } + { template ASNPrintablestring t_i := '00'B >> 1; } + { template ASNPrintablestring t_i := '00'H >> 1; } + { template ASNPrintablestring t_i := '00'B <@ 1; } + { template ASNPrintablestring t_i := '00'H <@ 1; } + { template ASNPrintablestring t_i := '00'B @> 1; } + { template ASNPrintablestring t_i := '00'H @> 1; } + { template ASNPrintablestring t_i := '00'B & '00'B; } + { template ASNPrintablestring t_i := '00'H & '00'H; } + { template ASNPrintablestring t_i := 5 == 5; } + { template ASNPrintablestring t_i := 5 != 5; } + { template ASNPrintablestring t_i := 5 < 5; } + { template ASNPrintablestring t_i := 5 > 5; } + { template ASNPrintablestring t_i := 5 <= 5; } + { template ASNPrintablestring t_i := 5 >= 5; } + { template ASNPrintablestring t_i := bit2hex('00'B); } + { template ASNPrintablestring t_i := bit2int('00'B); } + { template ASNPrintablestring t_i := bit2oct('00'B); } + { template ASNPrintablestring t_i := char2int("5"); } + { template ASNPrintablestring t_i := char2oct("akarmi"); } + { template ASNPrintablestring t_i := float2int( 5.5); } + { template ASNPrintablestring t_i := hex2int('FF'H); } + { template ASNPrintablestring t_i := hex2oct('FF00'H); } + { template ASNPrintablestring t_i := int2float(5); } + { template ASNPrintablestring t_i := oct2bit('00FF'O); } + { template ASNPrintablestring t_i := oct2hex('0F'O); } + { template ASNPrintablestring t_i := oct2int('0F'O); } + { template ASNPrintablestring t_i := str2bit("0101"); } + { template ASNPrintablestring t_i := str2float("5.5"); } + { template ASNPrintablestring t_i := str2hex("0101"); } + { template ASNPrintablestring t_i := str2int("5"); } + { template ASNPrintablestring t_i := str2oct("0101"); } + { template ASNPrintablestring t_i := unichar2int(char(0,0,0,0)); } + { template ASNPrintablestring t_i := unichar2char(char(0,0,0,0)); } + { template ASNPrintablestring t_i := int2bit(1,3); } + { template ASNPrintablestring t_i := int2hex(1,3); } + { template ASNPrintablestring t_i := int2oct(1,3); } + { template ASNPrintablestring t_i := rnd(); } + { template ASNPrintablestring t_i := rnd(5.5); } + { template ASNPrintablestring t_i := isbound(5.5); } + { template ASNPrintablestring t_i := isvalue(5.5); } + { template ASNPrintablestring t_i := lengthof("akarmi"); } + { template ASNPrintablestring t_i := sizeof(cg_recordof); } + { template ASNPrintablestring t_i := match(5,5); } + { template ASNPrintablestring t_i := mtc; } + { template ASNPrintablestring t_i := system; } + { template ASNPrintablestring t_i := self; } + { template ASNPrintablestring t_i := any component . running; } + { template ASNPrintablestring t_i := all component . running; } + { template ASNPrintablestring t_i := any component . alive; } + { template ASNPrintablestring t_i := all component . alive; } + { template ASNPrintablestring t_i := any timer . running; } + { template ASNPrintablestring t_i := f_comp_return().running; } + { template ASNPrintablestring t_i := f_comp_return().alive; } + { template ASNPrintablestring t_i := TL_t.read; } + { template ASNPrintablestring t_i := mycomponent.create; } + { template ASNPrintablestring t_i := activate(temp_altstep()); } + { template ASNPrintablestring t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNPrintablestring t_i := execute(temp_altstep(), 5); } + { template ASNPrintablestring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNPrintablestring t_i := refers(f_functiontypeValueTest); } + { template ASNPrintablestring t_i := refers(ef_ext_function); } + { template ASNPrintablestring t_i := refers(as_altstep); } + { template ASNPrintablestring t_i := refers(tc_testcase); } +} + +function f_ASNTeletexstringValueTests() +{ + timer TL_t := 5.0; + + { template ASNTeletexstring t_i := "akarmi"; } + { template ASNTeletexstring t_i := char(0,0,0,0); } + { template ASNTeletexstring t_i := "akarmi" & "akarmi2"; } + { template ASNTeletexstring t_i := bit2str('00'B); } + { template ASNTeletexstring t_i := float2str(5.5); } + { template ASNTeletexstring t_i := hex2str('FF00'H); } + { template ASNTeletexstring t_i := int2char(5); } + { template ASNTeletexstring t_i := int2str(5); } + { template ASNTeletexstring t_i := int2unichar(5); } + { template ASNTeletexstring t_i := oct2char('0F'O); } + { template ASNTeletexstring t_i := oct2str('0F'O); } + { template ASNTeletexstring t_i := regexp("akarmi","akarmi", 0); } + + { template ASNTeletexstring t_i := omit; } + { template ASNTeletexstring t_i := null; } + { template ASNTeletexstring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNTeletexstring t_i := {field1:=1, field1:="akarmi"}; } + { template ASNTeletexstring t_i := xx4; } + { template ASNTeletexstring t_i := true; } + { template ASNTeletexstring t_i := false; } + { template ASNTeletexstring t_i := not false; } + { template ASNTeletexstring t_i := t_i; } + { template ASNTeletexstring t_i := 5; } + { template ASNTeletexstring t_i := 5.5; } + { template ASNTeletexstring t_i := 'aa'H; } + { template ASNTeletexstring t_i := '00'B; } + { template ASNTeletexstring t_i := {1,2,3}; } + { template ASNTeletexstring t_i := 5 * 5; } + { template ASNTeletexstring t_i := 5 + 5; } + { template ASNTeletexstring t_i := 5 - 5; } + { template ASNTeletexstring t_i := 5 / 5; } + { template ASNTeletexstring t_i := 5 mod 5; } + { template ASNTeletexstring t_i := 5 rem 5; } + { template ASNTeletexstring t_i := true and true; } + { template ASNTeletexstring t_i := true or true; } + { template ASNTeletexstring t_i := not4b 'aa'H; } + { template ASNTeletexstring t_i := not4b '00'B; } + { template ASNTeletexstring t_i := '00'B and4b '00'B; } + { template ASNTeletexstring t_i := '00'H and4b '00'H; } + { template ASNTeletexstring t_i := '00'B or4b '00'B; } + { template ASNTeletexstring t_i := '00'H or4b '00'H; } + { template ASNTeletexstring t_i := '00'B xor4b '00'B; } + { template ASNTeletexstring t_i := '00'H xor4b '00'H; } + { template ASNTeletexstring t_i := '00'B << 1; } + { template ASNTeletexstring t_i := '00'H << 1; } + { template ASNTeletexstring t_i := '00'B >> 1; } + { template ASNTeletexstring t_i := '00'H >> 1; } + { template ASNTeletexstring t_i := '00'B <@ 1; } + { template ASNTeletexstring t_i := '00'H <@ 1; } + { template ASNTeletexstring t_i := '00'B @> 1; } + { template ASNTeletexstring t_i := '00'H @> 1; } + { template ASNTeletexstring t_i := '00'B & '00'B; } + { template ASNTeletexstring t_i := '00'H & '00'H; } + { template ASNTeletexstring t_i := 5 == 5; } + { template ASNTeletexstring t_i := 5 != 5; } + { template ASNTeletexstring t_i := 5 < 5; } + { template ASNTeletexstring t_i := 5 > 5; } + { template ASNTeletexstring t_i := 5 <= 5; } + { template ASNTeletexstring t_i := 5 >= 5; } + { template ASNTeletexstring t_i := bit2hex('00'B); } + { template ASNTeletexstring t_i := bit2int('00'B); } + { template ASNTeletexstring t_i := bit2oct('00'B); } + { template ASNTeletexstring t_i := char2int("5"); } + { template ASNTeletexstring t_i := char2oct("akarmi"); } + { template ASNTeletexstring t_i := float2int( 5.5); } + { template ASNTeletexstring t_i := hex2int('FF'H); } + { template ASNTeletexstring t_i := hex2oct('FF00'H); } + { template ASNTeletexstring t_i := int2float(5); } + { template ASNTeletexstring t_i := oct2bit('00FF'O); } + { template ASNTeletexstring t_i := oct2hex('0F'O); } + { template ASNTeletexstring t_i := oct2int('0F'O); } + { template ASNTeletexstring t_i := str2bit("0101"); } + { template ASNTeletexstring t_i := str2float("5.5"); } + { template ASNTeletexstring t_i := str2hex("0101"); } + { template ASNTeletexstring t_i := str2int("5"); } + { template ASNTeletexstring t_i := str2oct("0101"); } + { template ASNTeletexstring t_i := unichar2int(char(0,0,0,0)); } + { template ASNTeletexstring t_i := unichar2char(char(0,0,0,0)); } + { template ASNTeletexstring t_i := int2bit(1,3); } + { template ASNTeletexstring t_i := int2hex(1,3); } + { template ASNTeletexstring t_i := int2oct(1,3); } + { template ASNTeletexstring t_i := rnd(); } + { template ASNTeletexstring t_i := rnd(5.5); } + { template ASNTeletexstring t_i := isbound(5.5); } + { template ASNTeletexstring t_i := isvalue(5.5); } + { template ASNTeletexstring t_i := lengthof("akarmi"); } + { template ASNTeletexstring t_i := sizeof(cg_recordof); } + { template ASNTeletexstring t_i := match(5,5); } + { template ASNTeletexstring t_i := mtc; } + { template ASNTeletexstring t_i := system; } + { template ASNTeletexstring t_i := self; } + { template ASNTeletexstring t_i := any component . running; } + { template ASNTeletexstring t_i := all component . running; } + { template ASNTeletexstring t_i := any component . alive; } + { template ASNTeletexstring t_i := all component . alive; } + { template ASNTeletexstring t_i := any timer . running; } + { template ASNTeletexstring t_i := f_comp_return().running; } + { template ASNTeletexstring t_i := f_comp_return().alive; } + { template ASNTeletexstring t_i := TL_t.read; } + { template ASNTeletexstring t_i := mycomponent.create; } + { template ASNTeletexstring t_i := activate(temp_altstep()); } + { template ASNTeletexstring t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNTeletexstring t_i := execute(temp_altstep(), 5); } + { template ASNTeletexstring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNTeletexstring t_i := refers(f_functiontypeValueTest); } + { template ASNTeletexstring t_i := refers(ef_ext_function); } + { template ASNTeletexstring t_i := refers(as_altstep); } + { template ASNTeletexstring t_i := refers(tc_testcase); } +} + +function f_ASNUniversalstringValueTests() +{ + timer TL_t := 5.0; + + { template ASNUniversalstring t_i := "akarmi"; } + { template ASNUniversalstring t_i := char(0,0,0,0); } + { template ASNUniversalstring t_i := "akarmi" & "akarmi2"; } + { template ASNUniversalstring t_i := bit2str('00'B); } + { template ASNUniversalstring t_i := float2str(5.5); } + { template ASNUniversalstring t_i := hex2str('FF00'H); } + { template ASNUniversalstring t_i := int2char(5); } + { template ASNUniversalstring t_i := int2str(5); } + { template ASNUniversalstring t_i := int2unichar(5); } + { template ASNUniversalstring t_i := oct2char('0F'O); } + { template ASNUniversalstring t_i := oct2str('0F'O); } + { template ASNUniversalstring t_i := regexp("akarmi","akarmi", 0); } + + { template ASNUniversalstring t_i := omit; } + { template ASNUniversalstring t_i := null; } + { template ASNUniversalstring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNUniversalstring t_i := {field1:=1, field1:="akarmi"}; } + { template ASNUniversalstring t_i := xx4; } + { template ASNUniversalstring t_i := true; } + { template ASNUniversalstring t_i := false; } + { template ASNUniversalstring t_i := not false; } + { template ASNUniversalstring t_i := t_i; } + { template ASNUniversalstring t_i := 5; } + { template ASNUniversalstring t_i := 5.5; } + { template ASNUniversalstring t_i := 'aa'H; } + { template ASNUniversalstring t_i := '00'B; } + { template ASNUniversalstring t_i := {1,2,3}; } + { template ASNUniversalstring t_i := 5 * 5; } + { template ASNUniversalstring t_i := 5 + 5; } + { template ASNUniversalstring t_i := 5 - 5; } + { template ASNUniversalstring t_i := 5 / 5; } + { template ASNUniversalstring t_i := 5 mod 5; } + { template ASNUniversalstring t_i := 5 rem 5; } + { template ASNUniversalstring t_i := true and true; } + { template ASNUniversalstring t_i := true or true; } + { template ASNUniversalstring t_i := not4b 'aa'H; } + { template ASNUniversalstring t_i := not4b '00'B; } + { template ASNUniversalstring t_i := '00'B and4b '00'B; } + { template ASNUniversalstring t_i := '00'H and4b '00'H; } + { template ASNUniversalstring t_i := '00'B or4b '00'B; } + { template ASNUniversalstring t_i := '00'H or4b '00'H; } + { template ASNUniversalstring t_i := '00'B xor4b '00'B; } + { template ASNUniversalstring t_i := '00'H xor4b '00'H; } + { template ASNUniversalstring t_i := '00'B << 1; } + { template ASNUniversalstring t_i := '00'H << 1; } + { template ASNUniversalstring t_i := '00'B >> 1; } + { template ASNUniversalstring t_i := '00'H >> 1; } + { template ASNUniversalstring t_i := '00'B <@ 1; } + { template ASNUniversalstring t_i := '00'H <@ 1; } + { template ASNUniversalstring t_i := '00'B @> 1; } + { template ASNUniversalstring t_i := '00'H @> 1; } + { template ASNUniversalstring t_i := '00'B & '00'B; } + { template ASNUniversalstring t_i := '00'H & '00'H; } + { template ASNUniversalstring t_i := 5 == 5; } + { template ASNUniversalstring t_i := 5 != 5; } + { template ASNUniversalstring t_i := 5 < 5; } + { template ASNUniversalstring t_i := 5 > 5; } + { template ASNUniversalstring t_i := 5 <= 5; } + { template ASNUniversalstring t_i := 5 >= 5; } + { template ASNUniversalstring t_i := bit2hex('00'B); } + { template ASNUniversalstring t_i := bit2int('00'B); } + { template ASNUniversalstring t_i := bit2oct('00'B); } + { template ASNUniversalstring t_i := char2int("5"); } + { template ASNUniversalstring t_i := char2oct("akarmi"); } + { template ASNUniversalstring t_i := float2int( 5.5); } + { template ASNUniversalstring t_i := hex2int('FF'H); } + { template ASNUniversalstring t_i := hex2oct('FF00'H); } + { template ASNUniversalstring t_i := int2float(5); } + { template ASNUniversalstring t_i := oct2bit('00FF'O); } + { template ASNUniversalstring t_i := oct2hex('0F'O); } + { template ASNUniversalstring t_i := oct2int('0F'O); } + { template ASNUniversalstring t_i := str2bit("0101"); } + { template ASNUniversalstring t_i := str2float("5.5"); } + { template ASNUniversalstring t_i := str2hex("0101"); } + { template ASNUniversalstring t_i := str2int("5"); } + { template ASNUniversalstring t_i := str2oct("0101"); } + { template ASNUniversalstring t_i := unichar2int(char(0,0,0,0)); } + { template ASNUniversalstring t_i := unichar2char(char(0,0,0,0)); } + { template ASNUniversalstring t_i := int2bit(1,3); } + { template ASNUniversalstring t_i := int2hex(1,3); } + { template ASNUniversalstring t_i := int2oct(1,3); } + { template ASNUniversalstring t_i := rnd(); } + { template ASNUniversalstring t_i := rnd(5.5); } + { template ASNUniversalstring t_i := isbound(5.5); } + { template ASNUniversalstring t_i := isvalue(5.5); } + { template ASNUniversalstring t_i := lengthof("akarmi"); } + { template ASNUniversalstring t_i := sizeof(cg_recordof); } + { template ASNUniversalstring t_i := match(5,5); } + { template ASNUniversalstring t_i := mtc; } + { template ASNUniversalstring t_i := system; } + { template ASNUniversalstring t_i := self; } + { template ASNUniversalstring t_i := any component . running; } + { template ASNUniversalstring t_i := all component . running; } + { template ASNUniversalstring t_i := any component . alive; } + { template ASNUniversalstring t_i := all component . alive; } + { template ASNUniversalstring t_i := any timer . running; } + { template ASNUniversalstring t_i := f_comp_return().running; } + { template ASNUniversalstring t_i := f_comp_return().alive; } + { template ASNUniversalstring t_i := TL_t.read; } + { template ASNUniversalstring t_i := mycomponent.create; } + { template ASNUniversalstring t_i := activate(temp_altstep()); } + { template ASNUniversalstring t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNUniversalstring t_i := execute(temp_altstep(), 5); } + { template ASNUniversalstring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNUniversalstring t_i := refers(f_functiontypeValueTest); } + { template ASNUniversalstring t_i := refers(ef_ext_function); } + { template ASNUniversalstring t_i := refers(as_altstep); } + { template ASNUniversalstring t_i := refers(tc_testcase); } +} + +function f_ASNUTF8stringValueTests() +{ + timer TL_t := 5.0; + + { template ASNUTF8string t_i := "akarmi"; } + { template ASNUTF8string t_i := char(0,0,0,0); } + { template ASNUTF8string t_i := "akarmi" & "akarmi2"; } + { template ASNUTF8string t_i := bit2str('00'B); } + { template ASNUTF8string t_i := float2str(5.5); } + { template ASNUTF8string t_i := hex2str('FF00'H); } + { template ASNUTF8string t_i := int2char(5); } + { template ASNUTF8string t_i := int2str(5); } + { template ASNUTF8string t_i := int2unichar(5); } + { template ASNUTF8string t_i := oct2char('0F'O); } + { template ASNUTF8string t_i := oct2str('0F'O); } + { template ASNUTF8string t_i := regexp("akarmi","akarmi", 0); } + + { template ASNUTF8string t_i := omit; } + { template ASNUTF8string t_i := null; } + { template ASNUTF8string t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNUTF8string t_i := {field1:=1, field1:="akarmi"}; } + { template ASNUTF8string t_i := xx4; } + { template ASNUTF8string t_i := true; } + { template ASNUTF8string t_i := false; } + { template ASNUTF8string t_i := not false; } + { template ASNUTF8string t_i := t_i; } + { template ASNUTF8string t_i := 5; } + { template ASNUTF8string t_i := 5.5; } + { template ASNUTF8string t_i := 'aa'H; } + { template ASNUTF8string t_i := '00'B; } + { template ASNUTF8string t_i := {1,2,3}; } + { template ASNUTF8string t_i := 5 * 5; } + { template ASNUTF8string t_i := 5 + 5; } + { template ASNUTF8string t_i := 5 - 5; } + { template ASNUTF8string t_i := 5 / 5; } + { template ASNUTF8string t_i := 5 mod 5; } + { template ASNUTF8string t_i := 5 rem 5; } + { template ASNUTF8string t_i := true and true; } + { template ASNUTF8string t_i := true or true; } + { template ASNUTF8string t_i := not4b 'aa'H; } + { template ASNUTF8string t_i := not4b '00'B; } + { template ASNUTF8string t_i := '00'B and4b '00'B; } + { template ASNUTF8string t_i := '00'H and4b '00'H; } + { template ASNUTF8string t_i := '00'B or4b '00'B; } + { template ASNUTF8string t_i := '00'H or4b '00'H; } + { template ASNUTF8string t_i := '00'B xor4b '00'B; } + { template ASNUTF8string t_i := '00'H xor4b '00'H; } + { template ASNUTF8string t_i := '00'B << 1; } + { template ASNUTF8string t_i := '00'H << 1; } + { template ASNUTF8string t_i := '00'B >> 1; } + { template ASNUTF8string t_i := '00'H >> 1; } + { template ASNUTF8string t_i := '00'B <@ 1; } + { template ASNUTF8string t_i := '00'H <@ 1; } + { template ASNUTF8string t_i := '00'B @> 1; } + { template ASNUTF8string t_i := '00'H @> 1; } + { template ASNUTF8string t_i := '00'B & '00'B; } + { template ASNUTF8string t_i := '00'H & '00'H; } + { template ASNUTF8string t_i := 5 == 5; } + { template ASNUTF8string t_i := 5 != 5; } + { template ASNUTF8string t_i := 5 < 5; } + { template ASNUTF8string t_i := 5 > 5; } + { template ASNUTF8string t_i := 5 <= 5; } + { template ASNUTF8string t_i := 5 >= 5; } + { template ASNUTF8string t_i := bit2hex('00'B); } + { template ASNUTF8string t_i := bit2int('00'B); } + { template ASNUTF8string t_i := bit2oct('00'B); } + { template ASNUTF8string t_i := char2int("5"); } + { template ASNUTF8string t_i := char2oct("akarmi"); } + { template ASNUTF8string t_i := float2int( 5.5); } + { template ASNUTF8string t_i := hex2int('FF'H); } + { template ASNUTF8string t_i := hex2oct('FF00'H); } + { template ASNUTF8string t_i := int2float(5); } + { template ASNUTF8string t_i := oct2bit('00FF'O); } + { template ASNUTF8string t_i := oct2hex('0F'O); } + { template ASNUTF8string t_i := oct2int('0F'O); } + { template ASNUTF8string t_i := str2bit("0101"); } + { template ASNUTF8string t_i := str2float("5.5"); } + { template ASNUTF8string t_i := str2hex("0101"); } + { template ASNUTF8string t_i := str2int("5"); } + { template ASNUTF8string t_i := str2oct("0101"); } + { template ASNUTF8string t_i := unichar2int(char(0,0,0,0)); } + { template ASNUTF8string t_i := unichar2char(char(0,0,0,0)); } + { template ASNUTF8string t_i := int2bit(1,3); } + { template ASNUTF8string t_i := int2hex(1,3); } + { template ASNUTF8string t_i := int2oct(1,3); } + { template ASNUTF8string t_i := rnd(); } + { template ASNUTF8string t_i := rnd(5.5); } + { template ASNUTF8string t_i := isbound(5.5); } + { template ASNUTF8string t_i := isvalue(5.5); } + { template ASNUTF8string t_i := lengthof("akarmi"); } + { template ASNUTF8string t_i := sizeof(cg_recordof); } + { template ASNUTF8string t_i := match(5,5); } + { template ASNUTF8string t_i := mtc; } + { template ASNUTF8string t_i := system; } + { template ASNUTF8string t_i := self; } + { template ASNUTF8string t_i := any component . running; } + { template ASNUTF8string t_i := all component . running; } + { template ASNUTF8string t_i := any component . alive; } + { template ASNUTF8string t_i := all component . alive; } + { template ASNUTF8string t_i := any timer . running; } + { template ASNUTF8string t_i := f_comp_return().running; } + { template ASNUTF8string t_i := f_comp_return().alive; } + { template ASNUTF8string t_i := TL_t.read; } + { template ASNUTF8string t_i := mycomponent.create; } + { template ASNUTF8string t_i := activate(temp_altstep()); } + { template ASNUTF8string t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNUTF8string t_i := execute(temp_altstep(), 5); } + { template ASNUTF8string t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNUTF8string t_i := refers(f_functiontypeValueTest); } + { template ASNUTF8string t_i := refers(ef_ext_function); } + { template ASNUTF8string t_i := refers(as_altstep); } + { template ASNUTF8string t_i := refers(tc_testcase); } +} + +function f_ASNVideotexstringValueTests() +{ + timer TL_t := 5.0; + + { template ASNVideotexstring t_i := "akarmi"; } + { template ASNVideotexstring t_i := char(0,0,0,0); } + { template ASNVideotexstring t_i := "akarmi" & "akarmi2"; } + { template ASNVideotexstring t_i := bit2str('00'B); } + { template ASNVideotexstring t_i := float2str(5.5); } + { template ASNVideotexstring t_i := hex2str('FF00'H); } + { template ASNVideotexstring t_i := int2char(5); } + { template ASNVideotexstring t_i := int2str(5); } + { template ASNVideotexstring t_i := int2unichar(5); } + { template ASNVideotexstring t_i := oct2char('0F'O); } + { template ASNVideotexstring t_i := oct2str('0F'O); } + { template ASNVideotexstring t_i := regexp("akarmi","akarmi", 0); } + + { template ASNVideotexstring t_i := omit; } + { template ASNVideotexstring t_i := null; } + { template ASNVideotexstring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNVideotexstring t_i := {field1:=1, field1:="akarmi"}; } + { template ASNVideotexstring t_i := xx4; } + { template ASNVideotexstring t_i := true; } + { template ASNVideotexstring t_i := false; } + { template ASNVideotexstring t_i := not false; } + { template ASNVideotexstring t_i := t_i; } + { template ASNVideotexstring t_i := 5; } + { template ASNVideotexstring t_i := 5.5; } + { template ASNVideotexstring t_i := 'aa'H; } + { template ASNVideotexstring t_i := '00'B; } + { template ASNVideotexstring t_i := {1,2,3}; } + { template ASNVideotexstring t_i := 5 * 5; } + { template ASNVideotexstring t_i := 5 + 5; } + { template ASNVideotexstring t_i := 5 - 5; } + { template ASNVideotexstring t_i := 5 / 5; } + { template ASNVideotexstring t_i := 5 mod 5; } + { template ASNVideotexstring t_i := 5 rem 5; } + { template ASNVideotexstring t_i := true and true; } + { template ASNVideotexstring t_i := true or true; } + { template ASNVideotexstring t_i := not4b 'aa'H; } + { template ASNVideotexstring t_i := not4b '00'B; } + { template ASNVideotexstring t_i := '00'B and4b '00'B; } + { template ASNVideotexstring t_i := '00'H and4b '00'H; } + { template ASNVideotexstring t_i := '00'B or4b '00'B; } + { template ASNVideotexstring t_i := '00'H or4b '00'H; } + { template ASNVideotexstring t_i := '00'B xor4b '00'B; } + { template ASNVideotexstring t_i := '00'H xor4b '00'H; } + { template ASNVideotexstring t_i := '00'B << 1; } + { template ASNVideotexstring t_i := '00'H << 1; } + { template ASNVideotexstring t_i := '00'B >> 1; } + { template ASNVideotexstring t_i := '00'H >> 1; } + { template ASNVideotexstring t_i := '00'B <@ 1; } + { template ASNVideotexstring t_i := '00'H <@ 1; } + { template ASNVideotexstring t_i := '00'B @> 1; } + { template ASNVideotexstring t_i := '00'H @> 1; } + { template ASNVideotexstring t_i := '00'B & '00'B; } + { template ASNVideotexstring t_i := '00'H & '00'H; } + { template ASNVideotexstring t_i := 5 == 5; } + { template ASNVideotexstring t_i := 5 != 5; } + { template ASNVideotexstring t_i := 5 < 5; } + { template ASNVideotexstring t_i := 5 > 5; } + { template ASNVideotexstring t_i := 5 <= 5; } + { template ASNVideotexstring t_i := 5 >= 5; } + { template ASNVideotexstring t_i := bit2hex('00'B); } + { template ASNVideotexstring t_i := bit2int('00'B); } + { template ASNVideotexstring t_i := bit2oct('00'B); } + { template ASNVideotexstring t_i := char2int("5"); } + { template ASNVideotexstring t_i := char2oct("akarmi"); } + { template ASNVideotexstring t_i := float2int( 5.5); } + { template ASNVideotexstring t_i := hex2int('FF'H); } + { template ASNVideotexstring t_i := hex2oct('FF00'H); } + { template ASNVideotexstring t_i := int2float(5); } + { template ASNVideotexstring t_i := oct2bit('00FF'O); } + { template ASNVideotexstring t_i := oct2hex('0F'O); } + { template ASNVideotexstring t_i := oct2int('0F'O); } + { template ASNVideotexstring t_i := str2bit("0101"); } + { template ASNVideotexstring t_i := str2float("5.5"); } + { template ASNVideotexstring t_i := str2hex("0101"); } + { template ASNVideotexstring t_i := str2int("5"); } + { template ASNVideotexstring t_i := str2oct("0101"); } + { template ASNVideotexstring t_i := unichar2int(char(0,0,0,0)); } + { template ASNVideotexstring t_i := unichar2char(char(0,0,0,0)); } + { template ASNVideotexstring t_i := int2bit(1,3); } + { template ASNVideotexstring t_i := int2hex(1,3); } + { template ASNVideotexstring t_i := int2oct(1,3); } + { template ASNVideotexstring t_i := rnd(); } + { template ASNVideotexstring t_i := rnd(5.5); } + { template ASNVideotexstring t_i := isbound(5.5); } + { template ASNVideotexstring t_i := isvalue(5.5); } + { template ASNVideotexstring t_i := lengthof("akarmi"); } + { template ASNVideotexstring t_i := sizeof(cg_recordof); } + { template ASNVideotexstring t_i := match(5,5); } + { template ASNVideotexstring t_i := mtc; } + { template ASNVideotexstring t_i := system; } + { template ASNVideotexstring t_i := self; } + { template ASNVideotexstring t_i := any component . running; } + { template ASNVideotexstring t_i := all component . running; } + { template ASNVideotexstring t_i := any component . alive; } + { template ASNVideotexstring t_i := all component . alive; } + { template ASNVideotexstring t_i := any timer . running; } + { template ASNVideotexstring t_i := f_comp_return().running; } + { template ASNVideotexstring t_i := f_comp_return().alive; } + { template ASNVideotexstring t_i := TL_t.read; } + { template ASNVideotexstring t_i := mycomponent.create; } + { template ASNVideotexstring t_i := activate(temp_altstep()); } + { template ASNVideotexstring t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNVideotexstring t_i := execute(temp_altstep(), 5); } + { template ASNVideotexstring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNVideotexstring t_i := refers(f_functiontypeValueTest); } + { template ASNVideotexstring t_i := refers(ef_ext_function); } + { template ASNVideotexstring t_i := refers(as_altstep); } + { template ASNVideotexstring t_i := refers(tc_testcase); } +} + +function f_ASNVisiblestringValueTests() +{ + timer TL_t := 5.0; + + { template ASNVisiblestring t_i := "akarmi"; } + { template ASNVisiblestring t_i := char(0,0,0,0); } + { template ASNVisiblestring t_i := "akarmi" & "akarmi2"; } + { template ASNVisiblestring t_i := bit2str('00'B); } + { template ASNVisiblestring t_i := float2str(5.5); } + { template ASNVisiblestring t_i := hex2str('FF00'H); } + { template ASNVisiblestring t_i := int2char(5); } + { template ASNVisiblestring t_i := int2str(5); } + { template ASNVisiblestring t_i := int2unichar(5); } + { template ASNVisiblestring t_i := oct2char('0F'O); } + { template ASNVisiblestring t_i := oct2str('0F'O); } + { template ASNVisiblestring t_i := regexp("akarmi","akarmi", 0); } + + { template ASNVisiblestring t_i := omit; } + { template ASNVisiblestring t_i := null; } + { template ASNVisiblestring t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNVisiblestring t_i := {field1:=1, field1:="akarmi"}; } + { template ASNVisiblestring t_i := xx4; } + { template ASNVisiblestring t_i := true; } + { template ASNVisiblestring t_i := false; } + { template ASNVisiblestring t_i := not false; } + { template ASNVisiblestring t_i := t_i; } + { template ASNVisiblestring t_i := 5; } + { template ASNVisiblestring t_i := 5.5; } + { template ASNVisiblestring t_i := 'aa'H; } + { template ASNVisiblestring t_i := '00'B; } + { template ASNVisiblestring t_i := {1,2,3}; } + { template ASNVisiblestring t_i := 5 * 5; } + { template ASNVisiblestring t_i := 5 + 5; } + { template ASNVisiblestring t_i := 5 - 5; } + { template ASNVisiblestring t_i := 5 / 5; } + { template ASNVisiblestring t_i := 5 mod 5; } + { template ASNVisiblestring t_i := 5 rem 5; } + { template ASNVisiblestring t_i := true and true; } + { template ASNVisiblestring t_i := true or true; } + { template ASNVisiblestring t_i := not4b 'aa'H; } + { template ASNVisiblestring t_i := not4b '00'B; } + { template ASNVisiblestring t_i := '00'B and4b '00'B; } + { template ASNVisiblestring t_i := '00'H and4b '00'H; } + { template ASNVisiblestring t_i := '00'B or4b '00'B; } + { template ASNVisiblestring t_i := '00'H or4b '00'H; } + { template ASNVisiblestring t_i := '00'B xor4b '00'B; } + { template ASNVisiblestring t_i := '00'H xor4b '00'H; } + { template ASNVisiblestring t_i := '00'B << 1; } + { template ASNVisiblestring t_i := '00'H << 1; } + { template ASNVisiblestring t_i := '00'B >> 1; } + { template ASNVisiblestring t_i := '00'H >> 1; } + { template ASNVisiblestring t_i := '00'B <@ 1; } + { template ASNVisiblestring t_i := '00'H <@ 1; } + { template ASNVisiblestring t_i := '00'B @> 1; } + { template ASNVisiblestring t_i := '00'H @> 1; } + { template ASNVisiblestring t_i := '00'B & '00'B; } + { template ASNVisiblestring t_i := '00'H & '00'H; } + { template ASNVisiblestring t_i := 5 == 5; } + { template ASNVisiblestring t_i := 5 != 5; } + { template ASNVisiblestring t_i := 5 < 5; } + { template ASNVisiblestring t_i := 5 > 5; } + { template ASNVisiblestring t_i := 5 <= 5; } + { template ASNVisiblestring t_i := 5 >= 5; } + { template ASNVisiblestring t_i := bit2hex('00'B); } + { template ASNVisiblestring t_i := bit2int('00'B); } + { template ASNVisiblestring t_i := bit2oct('00'B); } + { template ASNVisiblestring t_i := char2int("5"); } + { template ASNVisiblestring t_i := char2oct("akarmi"); } + { template ASNVisiblestring t_i := float2int( 5.5); } + { template ASNVisiblestring t_i := hex2int('FF'H); } + { template ASNVisiblestring t_i := hex2oct('FF00'H); } + { template ASNVisiblestring t_i := int2float(5); } + { template ASNVisiblestring t_i := oct2bit('00FF'O); } + { template ASNVisiblestring t_i := oct2hex('0F'O); } + { template ASNVisiblestring t_i := oct2int('0F'O); } + { template ASNVisiblestring t_i := str2bit("0101"); } + { template ASNVisiblestring t_i := str2float("5.5"); } + { template ASNVisiblestring t_i := str2hex("0101"); } + { template ASNVisiblestring t_i := str2int("5"); } + { template ASNVisiblestring t_i := str2oct("0101"); } + { template ASNVisiblestring t_i := unichar2int(char(0,0,0,0)); } + { template ASNVisiblestring t_i := unichar2char(char(0,0,0,0)); } + { template ASNVisiblestring t_i := int2bit(1,3); } + { template ASNVisiblestring t_i := int2hex(1,3); } + { template ASNVisiblestring t_i := int2oct(1,3); } + { template ASNVisiblestring t_i := rnd(); } + { template ASNVisiblestring t_i := rnd(5.5); } + { template ASNVisiblestring t_i := isbound(5.5); } + { template ASNVisiblestring t_i := isvalue(5.5); } + { template ASNVisiblestring t_i := lengthof("akarmi"); } + { template ASNVisiblestring t_i := sizeof(cg_recordof); } + { template ASNVisiblestring t_i := match(5,5); } + { template ASNVisiblestring t_i := mtc; } + { template ASNVisiblestring t_i := system; } + { template ASNVisiblestring t_i := self; } + { template ASNVisiblestring t_i := any component . running; } + { template ASNVisiblestring t_i := all component . running; } + { template ASNVisiblestring t_i := any component . alive; } + { template ASNVisiblestring t_i := all component . alive; } + { template ASNVisiblestring t_i := any timer . running; } + { template ASNVisiblestring t_i := f_comp_return().running; } + { template ASNVisiblestring t_i := f_comp_return().alive; } + { template ASNVisiblestring t_i := TL_t.read; } + { template ASNVisiblestring t_i := mycomponent.create; } + { template ASNVisiblestring t_i := activate(temp_altstep()); } + { template ASNVisiblestring t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNVisiblestring t_i := execute(temp_altstep(), 5); } + { template ASNVisiblestring t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNVisiblestring t_i := refers(f_functiontypeValueTest); } + { template ASNVisiblestring t_i := refers(ef_ext_function); } + { template ASNVisiblestring t_i := refers(as_altstep); } + { template ASNVisiblestring t_i := refers(tc_testcase); } +} + +function f_ASNGeneralizedTimeValueTests() +{ + timer TL_t := 5.0; + + { template ASNGeneralizedTime t_i := "akarmi"; } + { template ASNGeneralizedTime t_i := char(0,0,0,0); } + { template ASNGeneralizedTime t_i := "akarmi" & "akarmi2"; } + { template ASNGeneralizedTime t_i := bit2str('00'B); } + { template ASNGeneralizedTime t_i := float2str(5.5); } + { template ASNGeneralizedTime t_i := hex2str('FF00'H); } + { template ASNGeneralizedTime t_i := int2char(5); } + { template ASNGeneralizedTime t_i := int2str(5); } + { template ASNGeneralizedTime t_i := int2unichar(5); } + { template ASNGeneralizedTime t_i := oct2char('0F'O); } + { template ASNGeneralizedTime t_i := oct2str('0F'O); } + { template ASNGeneralizedTime t_i := regexp("akarmi","akarmi", 0); } + + { template ASNGeneralizedTime t_i := omit; } + { template ASNGeneralizedTime t_i := null; } + { template ASNGeneralizedTime t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNGeneralizedTime t_i := {field1:=1, field1:="akarmi"}; } + { template ASNGeneralizedTime t_i := xx4; } + { template ASNGeneralizedTime t_i := true; } + { template ASNGeneralizedTime t_i := false; } + { template ASNGeneralizedTime t_i := not false; } + { template ASNGeneralizedTime t_i := t_i; } + { template ASNGeneralizedTime t_i := 5; } + { template ASNGeneralizedTime t_i := 5.5; } + { template ASNGeneralizedTime t_i := 'aa'H; } + { template ASNGeneralizedTime t_i := '00'B; } + { template ASNGeneralizedTime t_i := {1,2,3}; } + { template ASNGeneralizedTime t_i := 5 * 5; } + { template ASNGeneralizedTime t_i := 5 + 5; } + { template ASNGeneralizedTime t_i := 5 - 5; } + { template ASNGeneralizedTime t_i := 5 / 5; } + { template ASNGeneralizedTime t_i := 5 mod 5; } + { template ASNGeneralizedTime t_i := 5 rem 5; } + { template ASNGeneralizedTime t_i := true and true; } + { template ASNGeneralizedTime t_i := true or true; } + { template ASNGeneralizedTime t_i := not4b 'aa'H; } + { template ASNGeneralizedTime t_i := not4b '00'B; } + { template ASNGeneralizedTime t_i := '00'B and4b '00'B; } + { template ASNGeneralizedTime t_i := '00'H and4b '00'H; } + { template ASNGeneralizedTime t_i := '00'B or4b '00'B; } + { template ASNGeneralizedTime t_i := '00'H or4b '00'H; } + { template ASNGeneralizedTime t_i := '00'B xor4b '00'B; } + { template ASNGeneralizedTime t_i := '00'H xor4b '00'H; } + { template ASNGeneralizedTime t_i := '00'B << 1; } + { template ASNGeneralizedTime t_i := '00'H << 1; } + { template ASNGeneralizedTime t_i := '00'B >> 1; } + { template ASNGeneralizedTime t_i := '00'H >> 1; } + { template ASNGeneralizedTime t_i := '00'B <@ 1; } + { template ASNGeneralizedTime t_i := '00'H <@ 1; } + { template ASNGeneralizedTime t_i := '00'B @> 1; } + { template ASNGeneralizedTime t_i := '00'H @> 1; } + { template ASNGeneralizedTime t_i := '00'B & '00'B; } + { template ASNGeneralizedTime t_i := '00'H & '00'H; } + { template ASNGeneralizedTime t_i := 5 == 5; } + { template ASNGeneralizedTime t_i := 5 != 5; } + { template ASNGeneralizedTime t_i := 5 < 5; } + { template ASNGeneralizedTime t_i := 5 > 5; } + { template ASNGeneralizedTime t_i := 5 <= 5; } + { template ASNGeneralizedTime t_i := 5 >= 5; } + { template ASNGeneralizedTime t_i := bit2hex('00'B); } + { template ASNGeneralizedTime t_i := bit2int('00'B); } + { template ASNGeneralizedTime t_i := bit2oct('00'B); } + { template ASNGeneralizedTime t_i := char2int("5"); } + { template ASNGeneralizedTime t_i := char2oct("akarmi"); } + { template ASNGeneralizedTime t_i := float2int( 5.5); } + { template ASNGeneralizedTime t_i := hex2int('FF'H); } + { template ASNGeneralizedTime t_i := hex2oct('FF00'H); } + { template ASNGeneralizedTime t_i := int2float(5); } + { template ASNGeneralizedTime t_i := oct2bit('00FF'O); } + { template ASNGeneralizedTime t_i := oct2hex('0F'O); } + { template ASNGeneralizedTime t_i := oct2int('0F'O); } + { template ASNGeneralizedTime t_i := str2bit("0101"); } + { template ASNGeneralizedTime t_i := str2float("5.5"); } + { template ASNGeneralizedTime t_i := str2hex("0101"); } + { template ASNGeneralizedTime t_i := str2int("5"); } + { template ASNGeneralizedTime t_i := str2oct("0101"); } + { template ASNGeneralizedTime t_i := unichar2int(char(0,0,0,0)); } + { template ASNGeneralizedTime t_i := unichar2char(char(0,0,0,0)); } + { template ASNGeneralizedTime t_i := int2bit(1,3); } + { template ASNGeneralizedTime t_i := int2hex(1,3); } + { template ASNGeneralizedTime t_i := int2oct(1,3); } + { template ASNGeneralizedTime t_i := rnd(); } + { template ASNGeneralizedTime t_i := rnd(5.5); } + { template ASNGeneralizedTime t_i := isbound(5.5); } + { template ASNGeneralizedTime t_i := isvalue(5.5); } + { template ASNGeneralizedTime t_i := lengthof("akarmi"); } + { template ASNGeneralizedTime t_i := sizeof(cg_recordof); } + { template ASNGeneralizedTime t_i := match(5,5); } + { template ASNGeneralizedTime t_i := mtc; } + { template ASNGeneralizedTime t_i := system; } + { template ASNGeneralizedTime t_i := self; } + { template ASNGeneralizedTime t_i := any component . running; } + { template ASNGeneralizedTime t_i := all component . running; } + { template ASNGeneralizedTime t_i := any component . alive; } + { template ASNGeneralizedTime t_i := all component . alive; } + { template ASNGeneralizedTime t_i := any timer . running; } + { template ASNGeneralizedTime t_i := f_comp_return().running; } + { template ASNGeneralizedTime t_i := f_comp_return().alive; } + { template ASNGeneralizedTime t_i := TL_t.read; } + { template ASNGeneralizedTime t_i := mycomponent.create; } + { template ASNGeneralizedTime t_i := activate(temp_altstep()); } + { template ASNGeneralizedTime t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNGeneralizedTime t_i := execute(temp_altstep(), 5); } + { template ASNGeneralizedTime t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNGeneralizedTime t_i := refers(f_functiontypeValueTest); } + { template ASNGeneralizedTime t_i := refers(ef_ext_function); } + { template ASNGeneralizedTime t_i := refers(as_altstep); } + { template ASNGeneralizedTime t_i := refers(tc_testcase); } +} + +function f_ASNUTCTimeValueTests() +{ + timer TL_t := 5.0; + + { template ASNUTCTime t_i := "akarmi"; } + { template ASNUTCTime t_i := char(0,0,0,0); } + { template ASNUTCTime t_i := "akarmi" & "akarmi2"; } + { template ASNUTCTime t_i := bit2str('00'B); } + { template ASNUTCTime t_i := float2str(5.5); } + { template ASNUTCTime t_i := hex2str('FF00'H); } + { template ASNUTCTime t_i := int2char(5); } + { template ASNUTCTime t_i := int2str(5); } + { template ASNUTCTime t_i := int2unichar(5); } + { template ASNUTCTime t_i := oct2char('0F'O); } + { template ASNUTCTime t_i := oct2str('0F'O); } + { template ASNUTCTime t_i := regexp("akarmi","akarmi", 0); } + + { template ASNUTCTime t_i := omit; } + { template ASNUTCTime t_i := null; } + { template ASNUTCTime t_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { template ASNUTCTime t_i := {field1:=1, field1:="akarmi"}; } + { template ASNUTCTime t_i := xx4; } + { template ASNUTCTime t_i := true; } + { template ASNUTCTime t_i := false; } + { template ASNUTCTime t_i := not false; } + { template ASNUTCTime t_i := t_i; } + { template ASNUTCTime t_i := 5; } + { template ASNUTCTime t_i := 5.5; } + { template ASNUTCTime t_i := 'aa'H; } + { template ASNUTCTime t_i := '00'B; } + { template ASNUTCTime t_i := {1,2,3}; } + { template ASNUTCTime t_i := 5 * 5; } + { template ASNUTCTime t_i := 5 + 5; } + { template ASNUTCTime t_i := 5 - 5; } + { template ASNUTCTime t_i := 5 / 5; } + { template ASNUTCTime t_i := 5 mod 5; } + { template ASNUTCTime t_i := 5 rem 5; } + { template ASNUTCTime t_i := true and true; } + { template ASNUTCTime t_i := true or true; } + { template ASNUTCTime t_i := not4b 'aa'H; } + { template ASNUTCTime t_i := not4b '00'B; } + { template ASNUTCTime t_i := '00'B and4b '00'B; } + { template ASNUTCTime t_i := '00'H and4b '00'H; } + { template ASNUTCTime t_i := '00'B or4b '00'B; } + { template ASNUTCTime t_i := '00'H or4b '00'H; } + { template ASNUTCTime t_i := '00'B xor4b '00'B; } + { template ASNUTCTime t_i := '00'H xor4b '00'H; } + { template ASNUTCTime t_i := '00'B << 1; } + { template ASNUTCTime t_i := '00'H << 1; } + { template ASNUTCTime t_i := '00'B >> 1; } + { template ASNUTCTime t_i := '00'H >> 1; } + { template ASNUTCTime t_i := '00'B <@ 1; } + { template ASNUTCTime t_i := '00'H <@ 1; } + { template ASNUTCTime t_i := '00'B @> 1; } + { template ASNUTCTime t_i := '00'H @> 1; } + { template ASNUTCTime t_i := '00'B & '00'B; } + { template ASNUTCTime t_i := '00'H & '00'H; } + { template ASNUTCTime t_i := 5 == 5; } + { template ASNUTCTime t_i := 5 != 5; } + { template ASNUTCTime t_i := 5 < 5; } + { template ASNUTCTime t_i := 5 > 5; } + { template ASNUTCTime t_i := 5 <= 5; } + { template ASNUTCTime t_i := 5 >= 5; } + { template ASNUTCTime t_i := bit2hex('00'B); } + { template ASNUTCTime t_i := bit2int('00'B); } + { template ASNUTCTime t_i := bit2oct('00'B); } + { template ASNUTCTime t_i := char2int("5"); } + { template ASNUTCTime t_i := char2oct("akarmi"); } + { template ASNUTCTime t_i := float2int( 5.5); } + { template ASNUTCTime t_i := hex2int('FF'H); } + { template ASNUTCTime t_i := hex2oct('FF00'H); } + { template ASNUTCTime t_i := int2float(5); } + { template ASNUTCTime t_i := oct2bit('00FF'O); } + { template ASNUTCTime t_i := oct2hex('0F'O); } + { template ASNUTCTime t_i := oct2int('0F'O); } + { template ASNUTCTime t_i := str2bit("0101"); } + { template ASNUTCTime t_i := str2float("5.5"); } + { template ASNUTCTime t_i := str2hex("0101"); } + { template ASNUTCTime t_i := str2int("5"); } + { template ASNUTCTime t_i := str2oct("0101"); } + { template ASNUTCTime t_i := unichar2int(char(0,0,0,0)); } + { template ASNUTCTime t_i := unichar2char(char(0,0,0,0)); } + { template ASNUTCTime t_i := int2bit(1,3); } + { template ASNUTCTime t_i := int2hex(1,3); } + { template ASNUTCTime t_i := int2oct(1,3); } + { template ASNUTCTime t_i := rnd(); } + { template ASNUTCTime t_i := rnd(5.5); } + { template ASNUTCTime t_i := isbound(5.5); } + { template ASNUTCTime t_i := isvalue(5.5); } + { template ASNUTCTime t_i := lengthof("akarmi"); } + { template ASNUTCTime t_i := sizeof(cg_recordof); } + { template ASNUTCTime t_i := match(5,5); } + { template ASNUTCTime t_i := mtc; } + { template ASNUTCTime t_i := system; } + { template ASNUTCTime t_i := self; } + { template ASNUTCTime t_i := any component . running; } + { template ASNUTCTime t_i := all component . running; } + { template ASNUTCTime t_i := any component . alive; } + { template ASNUTCTime t_i := all component . alive; } + { template ASNUTCTime t_i := any timer . running; } + { template ASNUTCTime t_i := f_comp_return().running; } + { template ASNUTCTime t_i := f_comp_return().alive; } + { template ASNUTCTime t_i := TL_t.read; } + { template ASNUTCTime t_i := mycomponent.create; } + { template ASNUTCTime t_i := activate(temp_altstep()); } + { template ASNUTCTime t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNUTCTime t_i := execute(temp_altstep(), 5); } + { template ASNUTCTime t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNUTCTime t_i := refers(f_functiontypeValueTest); } + { template ASNUTCTime t_i := refers(ef_ext_function); } + { template ASNUTCTime t_i := refers(as_altstep); } + { template ASNUTCTime t_i := refers(tc_testcase); } +} + +function f_ASNSetTypeValueTests() +{ + timer TL_t := 5; + + { template ASNSetType t_i := omit; } + { template ASNSetType t_i := {field1:=1, field2:="akarmi"}; } + + { template ASNSetType t_i := {field2:=1}; } + { template ASNSetType t_i := {field3:=1}; } + { template ASNSetType t_i := {field1:=1, field1:="akarmi"}; } + { template ASNSetType t_i := {1, "akarmi"}; } + { template ASNSetType t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template ASNSetType t_i := {field1:='00'O, field2:='00'B}; } + { template ASNSetType t_i := null; } + { template ASNSetType t_i := xx4; } + { template ASNSetType t_i := true; } + { template ASNSetType t_i := false; } + { template ASNSetType t_i := not false; } + { template ASNSetType t_i := t_i; } + { template ASNSetType t_i := 5; } + { template ASNSetType t_i := 5.5; } + { template ASNSetType t_i := "akarmi"; } + { template ASNSetType t_i := char(0,0,0,0); } + { template ASNSetType t_i := 'aa'H; } + { template ASNSetType t_i := '00'B; } + { template ASNSetType t_i := 5 * 5; } + { template ASNSetType t_i := 5 + 5; } + { template ASNSetType t_i := 5 - 5; } + { template ASNSetType t_i := 5 / 5; } + { template ASNSetType t_i := 5 mod 5; } + { template ASNSetType t_i := 5 rem 5; } + { template ASNSetType t_i := true and true; } + { template ASNSetType t_i := true or true; } + { template ASNSetType t_i := not4b 'aa'H; } + { template ASNSetType t_i := not4b '00'B; } + { template ASNSetType t_i := '00'B and4b '00'B; } + { template ASNSetType t_i := '00'H and4b '00'H; } + { template ASNSetType t_i := '00'B or4b '00'B; } + { template ASNSetType t_i := '00'H or4b '00'H; } + { template ASNSetType t_i := '00'B xor4b '00'B; } + { template ASNSetType t_i := '00'H xor4b '00'H; } + { template ASNSetType t_i := '00'B << 1; } + { template ASNSetType t_i := '00'H << 1; } + { template ASNSetType t_i := '00'B >> 1; } + { template ASNSetType t_i := '00'H >> 1; } + { template ASNSetType t_i := '00'B <@ 1; } + { template ASNSetType t_i := '00'H <@ 1; } + { template ASNSetType t_i := '00'B @> 1; } + { template ASNSetType t_i := '00'H @> 1; } + { template ASNSetType t_i := '00'B & '00'B; } + { template ASNSetType t_i := '00'H & '00'H; } + { template ASNSetType t_i := "akarmi" & "akarmi2"; } + { template ASNSetType t_i := 5 == 5; } + { template ASNSetType t_i := 5 != 5; } + { template ASNSetType t_i := 5 < 5; } + { template ASNSetType t_i := 5 > 5; } + { template ASNSetType t_i := 5 <= 5; } + { template ASNSetType t_i := 5 >= 5; } + { template ASNSetType t_i := bit2hex('00'B); } + { template ASNSetType t_i := bit2int('00'B); } + { template ASNSetType t_i := bit2oct('00'B); } + { template ASNSetType t_i := bit2str('00'B); } + { template ASNSetType t_i := char2int("5"); } + { template ASNSetType t_i := char2oct("akarmi"); } + { template ASNSetType t_i := float2int( 5.5); } + { template ASNSetType t_i := float2str(5.5); } + { template ASNSetType t_i := hex2int('FF'H); } + { template ASNSetType t_i := hex2oct('FF00'H); } + { template ASNSetType t_i := hex2str('FF00'H); } + { template ASNSetType t_i := int2char(5); } + { template ASNSetType t_i := int2float(5); } + { template ASNSetType t_i := int2str(5); } + { template ASNSetType t_i := int2unichar(5); } + { template ASNSetType t_i := oct2bit('00FF'O); } + { template ASNSetType t_i := oct2char('0F'O); } + { template ASNSetType t_i := oct2hex('0F'O); } + { template ASNSetType t_i := oct2int('0F'O); } + { template ASNSetType t_i := oct2str('0F'O); } + { template ASNSetType t_i := str2bit("0101"); } + { template ASNSetType t_i := str2float("5.5"); } + { template ASNSetType t_i := str2hex("0101"); } + { template ASNSetType t_i := str2int("5"); } + { template ASNSetType t_i := str2oct("0101"); } + { template ASNSetType t_i := unichar2int(char(0,0,0,0)); } + { template ASNSetType t_i := unichar2char(char(0,0,0,0)); } + { template ASNSetType t_i := int2bit(1,3); } + { template ASNSetType t_i := int2hex(1,3); } + { template ASNSetType t_i := int2oct(1,3); } + { template ASNSetType t_i := rnd(); } + { template ASNSetType t_i := rnd(5.5); } + { template ASNSetType t_i := isbound(5.5); } + { template ASNSetType t_i := isvalue(5.5); } + { template ASNSetType t_i := lengthof("akarmi"); } + { template ASNSetType t_i := sizeof(cg_recordof); } + { template ASNSetType t_i := regexp("akarmi","akarmi", 0); } + { template ASNSetType t_i := match(5,5); } + { template ASNSetType t_i := mtc; } + { template ASNSetType t_i := system; } + { template ASNSetType t_i := self; } + { template ASNSetType t_i := any component . running; } + { template ASNSetType t_i := all component . running; } + { template ASNSetType t_i := any component . alive; } + { template ASNSetType t_i := all component . alive; } + { template ASNSetType t_i := any timer . running; } + { template ASNSetType t_i := f_comp_return().running; } + { template ASNSetType t_i := f_comp_return().alive; } + { template ASNSetType t_i := TL_t.read; } + { template ASNSetType t_i := mycomponent.create; } + { template ASNSetType t_i := activate(temp_altstep()); } + { template ASNSetType t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNSetType t_i := execute(temp_altstep(), 5); } + { template ASNSetType t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNSetType t_i := refers(f_functiontypeValueTest); } + { template ASNSetType t_i := refers(ef_ext_function); } + { template ASNSetType t_i := refers(as_altstep); } + { template ASNSetType t_i := refers(tc_testcase); } +} + +function f_ASNSequenceTypeValueTests() +{ + timer TL_t := 5; + + { template ASNSequenceType t_i := omit; } + { template ASNSequenceType t_i := {field1:=1, field2:="akarmi", field3:=omit}; } + + { template ASNSequenceType t_i := {}; } + { template ASNSequenceType t_i := {1,"akarmi",3,4,5}; } + { template ASNSequenceType t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template ASNSequenceType t_i := {field2:=1}; } + { template ASNSequenceType t_i := {field4:=1}; } + { template ASNSequenceType t_i := {field1:=1, field1:="akarmi"}; } + { template ASNSequenceType t_i := {field1:=omit, field2:=omit}; } + { template ASNSequenceType t_i := {field2:="akarmi", field1:=1}; } + { template ASNSequenceType t_i := {1}; } + { template ASNSequenceType t_i := {1,2,3}; } + { template ASNSequenceType t_i := {-,-}; } + { template ASNSequenceType t_i := {field1:='00'O, field2:='00'B}; } + { template ASNSequenceType t_i := null; } + { template ASNSequenceType t_i := xx4; } + { template ASNSequenceType t_i := true; } + { template ASNSequenceType t_i := false; } + { template ASNSequenceType t_i := not false; } + { template ASNSequenceType t_i := t_i; } + { template ASNSequenceType t_i := 5; } + { template ASNSequenceType t_i := 5.5; } + { template ASNSequenceType t_i := "akarmi"; } + { template ASNSequenceType t_i := char(0,0,0,0); } + { template ASNSequenceType t_i := 'aa'H; } + { template ASNSequenceType t_i := '00'B; } + { template ASNSequenceType t_i := 5 * 5; } + { template ASNSequenceType t_i := 5 + 5; } + { template ASNSequenceType t_i := 5 - 5; } + { template ASNSequenceType t_i := 5 / 5; } + { template ASNSequenceType t_i := 5 mod 5; } + { template ASNSequenceType t_i := 5 rem 5; } + { template ASNSequenceType t_i := true and true; } + { template ASNSequenceType t_i := true or true; } + { template ASNSequenceType t_i := not4b 'aa'H; } + { template ASNSequenceType t_i := not4b '00'B; } + { template ASNSequenceType t_i := '00'B and4b '00'B; } + { template ASNSequenceType t_i := '00'H and4b '00'H; } + { template ASNSequenceType t_i := '00'B or4b '00'B; } + { template ASNSequenceType t_i := '00'H or4b '00'H; } + { template ASNSequenceType t_i := '00'B xor4b '00'B; } + { template ASNSequenceType t_i := '00'H xor4b '00'H; } + { template ASNSequenceType t_i := '00'B << 1; } + { template ASNSequenceType t_i := '00'H << 1; } + { template ASNSequenceType t_i := '00'B >> 1; } + { template ASNSequenceType t_i := '00'H >> 1; } + { template ASNSequenceType t_i := '00'B <@ 1; } + { template ASNSequenceType t_i := '00'H <@ 1; } + { template ASNSequenceType t_i := '00'B @> 1; } + { template ASNSequenceType t_i := '00'H @> 1; } + { template ASNSequenceType t_i := '00'B & '00'B; } + { template ASNSequenceType t_i := '00'H & '00'H; } + { template ASNSequenceType t_i := "akarmi" & "akarmi2"; } + { template ASNSequenceType t_i := 5 == 5; } + { template ASNSequenceType t_i := 5 != 5; } + { template ASNSequenceType t_i := 5 < 5; } + { template ASNSequenceType t_i := 5 > 5; } + { template ASNSequenceType t_i := 5 <= 5; } + { template ASNSequenceType t_i := 5 >= 5; } + { template ASNSequenceType t_i := bit2hex('00'B); } + { template ASNSequenceType t_i := bit2int('00'B); } + { template ASNSequenceType t_i := bit2oct('00'B); } + { template ASNSequenceType t_i := bit2str('00'B); } + { template ASNSequenceType t_i := char2int("5"); } + { template ASNSequenceType t_i := char2oct("akarmi"); } + { template ASNSequenceType t_i := float2int( 5.5); } + { template ASNSequenceType t_i := float2str(5.5); } + { template ASNSequenceType t_i := hex2int('FF'H); } + { template ASNSequenceType t_i := hex2oct('FF00'H); } + { template ASNSequenceType t_i := hex2str('FF00'H); } + { template ASNSequenceType t_i := int2char(5); } + { template ASNSequenceType t_i := int2float(5); } + { template ASNSequenceType t_i := int2str(5); } + { template ASNSequenceType t_i := int2unichar(5); } + { template ASNSequenceType t_i := oct2bit('00FF'O); } + { template ASNSequenceType t_i := oct2char('0F'O); } + { template ASNSequenceType t_i := oct2hex('0F'O); } + { template ASNSequenceType t_i := oct2int('0F'O); } + { template ASNSequenceType t_i := oct2str('0F'O); } + { template ASNSequenceType t_i := str2bit("0101"); } + { template ASNSequenceType t_i := str2float("5.5"); } + { template ASNSequenceType t_i := str2hex("0101"); } + { template ASNSequenceType t_i := str2int("5"); } + { template ASNSequenceType t_i := str2oct("0101"); } + { template ASNSequenceType t_i := unichar2int(char(0,0,0,0)); } + { template ASNSequenceType t_i := unichar2char(char(0,0,0,0)); } + { template ASNSequenceType t_i := int2bit(1,3); } + { template ASNSequenceType t_i := int2hex(1,3); } + { template ASNSequenceType t_i := int2oct(1,3); } + { template ASNSequenceType t_i := rnd(); } + { template ASNSequenceType t_i := rnd(5.5); } + { template ASNSequenceType t_i := isbound(5.5); } + { template ASNSequenceType t_i := isvalue(5.5); } + { template ASNSequenceType t_i := lengthof("akarmi"); } + { template ASNSequenceType t_i := sizeof(cg_recordof); } + { template ASNSequenceType t_i := regexp("akarmi","akarmi", 0); } + { template ASNSequenceType t_i := match(5,5); } + { template ASNSequenceType t_i := mtc; } + { template ASNSequenceType t_i := system; } + { template ASNSequenceType t_i := self; } + { template ASNSequenceType t_i := any component . running; } + { template ASNSequenceType t_i := all component . running; } + { template ASNSequenceType t_i := any component . alive; } + { template ASNSequenceType t_i := all component . alive; } + { template ASNSequenceType t_i := any timer . running; } + { template ASNSequenceType t_i := f_comp_return().running; } + { template ASNSequenceType t_i := f_comp_return().alive; } + { template ASNSequenceType t_i := TL_t.read; } + { template ASNSequenceType t_i := mycomponent.create; } + { template ASNSequenceType t_i := activate(temp_altstep()); } + { template ASNSequenceType t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNSequenceType t_i := execute(temp_altstep(), 5); } + { template ASNSequenceType t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNSequenceType t_i := refers(f_functiontypeValueTest); } + { template ASNSequenceType t_i := refers(ef_ext_function); } + { template ASNSequenceType t_i := refers(as_altstep); } + { template ASNSequenceType t_i := refers(tc_testcase); } +} + +function f_ASNChoiceTypeValueTests() +{ + timer TL_t := 5.0; + + { template ASNChoiceType t_i := omit; } + { template ASNChoiceType t_i := {field1:=1}; } + { template ASNChoiceType t_i := {field2:="akarmi"}; } + + { template ASNChoiceType t_i := {}; } + { template ASNChoiceType t_i := {1,"akarmi",3,4,5}; } + { template ASNChoiceType t_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { template ASNChoiceType t_i := {field2:=1}; } + { template ASNChoiceType t_i := {field4:=1}; } + { template ASNChoiceType t_i := {field1:=1, field1:="akarmi"}; } + { template ASNChoiceType t_i := {field1:=omit, field2:=omit}; } + { template ASNChoiceType t_i := {field2:="akarmi", field1:=1}; } + { template ASNChoiceType t_i := {1}; } + { template ASNChoiceType t_i := {1,2,3}; } + { template ASNChoiceType t_i := {-,-}; } + { template ASNChoiceType t_i := {field1:='00'O, field2:='00'B}; } + { template ASNChoiceType t_i := null; } + { template ASNChoiceType t_i := xx4; } + { template ASNChoiceType t_i := true; } + { template ASNChoiceType t_i := false; } + { template ASNChoiceType t_i := not false; } + { template ASNChoiceType t_i := t_i; } + { template ASNChoiceType t_i := 5; } + { template ASNChoiceType t_i := 5.5; } + { template ASNChoiceType t_i := "akarmi"; } + { template ASNChoiceType t_i := char(0,0,0,0); } + { template ASNChoiceType t_i := 'aa'H; } + { template ASNChoiceType t_i := '00'B; } + { template ASNChoiceType t_i := 5 * 5; } + { template ASNChoiceType t_i := 5 + 5; } + { template ASNChoiceType t_i := 5 - 5; } + { template ASNChoiceType t_i := 5 / 5; } + { template ASNChoiceType t_i := 5 mod 5; } + { template ASNChoiceType t_i := 5 rem 5; } + { template ASNChoiceType t_i := true and true; } + { template ASNChoiceType t_i := true or true; } + { template ASNChoiceType t_i := not4b 'aa'H; } + { template ASNChoiceType t_i := not4b '00'B; } + { template ASNChoiceType t_i := '00'B and4b '00'B; } + { template ASNChoiceType t_i := '00'H and4b '00'H; } + { template ASNChoiceType t_i := '00'B or4b '00'B; } + { template ASNChoiceType t_i := '00'H or4b '00'H; } + { template ASNChoiceType t_i := '00'B xor4b '00'B; } + { template ASNChoiceType t_i := '00'H xor4b '00'H; } + { template ASNChoiceType t_i := '00'B << 1; } + { template ASNChoiceType t_i := '00'H << 1; } + { template ASNChoiceType t_i := '00'B >> 1; } + { template ASNChoiceType t_i := '00'H >> 1; } + { template ASNChoiceType t_i := '00'B <@ 1; } + { template ASNChoiceType t_i := '00'H <@ 1; } + { template ASNChoiceType t_i := '00'B @> 1; } + { template ASNChoiceType t_i := '00'H @> 1; } + { template ASNChoiceType t_i := '00'B & '00'B; } + { template ASNChoiceType t_i := '00'H & '00'H; } + { template ASNChoiceType t_i := "akarmi" & "akarmi2"; } + { template ASNChoiceType t_i := 5 == 5; } + { template ASNChoiceType t_i := 5 != 5; } + { template ASNChoiceType t_i := 5 < 5; } + { template ASNChoiceType t_i := 5 > 5; } + { template ASNChoiceType t_i := 5 <= 5; } + { template ASNChoiceType t_i := 5 >= 5; } + { template ASNChoiceType t_i := bit2hex('00'B); } + { template ASNChoiceType t_i := bit2int('00'B); } + { template ASNChoiceType t_i := bit2oct('00'B); } + { template ASNChoiceType t_i := bit2str('00'B); } + { template ASNChoiceType t_i := char2int("5"); } + { template ASNChoiceType t_i := char2oct("akarmi"); } + { template ASNChoiceType t_i := float2int( 5.5); } + { template ASNChoiceType t_i := float2str(5.5); } + { template ASNChoiceType t_i := hex2int('FF'H); } + { template ASNChoiceType t_i := hex2oct('FF00'H); } + { template ASNChoiceType t_i := hex2str('FF00'H); } + { template ASNChoiceType t_i := int2char(5); } + { template ASNChoiceType t_i := int2float(5); } + { template ASNChoiceType t_i := int2str(5); } + { template ASNChoiceType t_i := int2unichar(5); } + { template ASNChoiceType t_i := oct2bit('00FF'O); } + { template ASNChoiceType t_i := oct2char('0F'O); } + { template ASNChoiceType t_i := oct2hex('0F'O); } + { template ASNChoiceType t_i := oct2int('0F'O); } + { template ASNChoiceType t_i := oct2str('0F'O); } + { template ASNChoiceType t_i := str2bit("0101"); } + { template ASNChoiceType t_i := str2float("5.5"); } + { template ASNChoiceType t_i := str2hex("0101"); } + { template ASNChoiceType t_i := str2int("5"); } + { template ASNChoiceType t_i := str2oct("0101"); } + { template ASNChoiceType t_i := unichar2int(char(0,0,0,0)); } + { template ASNChoiceType t_i := unichar2char(char(0,0,0,0)); } + { template ASNChoiceType t_i := int2bit(1,3); } + { template ASNChoiceType t_i := int2hex(1,3); } + { template ASNChoiceType t_i := int2oct(1,3); } + { template ASNChoiceType t_i := rnd(); } + { template ASNChoiceType t_i := rnd(5.5); } + { template ASNChoiceType t_i := isbound(5.5); } + { template ASNChoiceType t_i := isvalue(5.5); } + { template ASNChoiceType t_i := lengthof("akarmi"); } + { template ASNChoiceType t_i := sizeof(cg_recordof); } + { template ASNChoiceType t_i := regexp("akarmi","akarmi", 0); } + { template ASNChoiceType t_i := match(5,5); } + { template ASNChoiceType t_i := mtc; } + { template ASNChoiceType t_i := system; } + { template ASNChoiceType t_i := self; } + { template ASNChoiceType t_i := any component . running; } + { template ASNChoiceType t_i := all component . running; } + { template ASNChoiceType t_i := any component . alive; } + { template ASNChoiceType t_i := all component . alive; } + { template ASNChoiceType t_i := any timer . running; } + { template ASNChoiceType t_i := f_comp_return().running; } + { template ASNChoiceType t_i := f_comp_return().alive; } + { template ASNChoiceType t_i := TL_t.read; } + { template ASNChoiceType t_i := mycomponent.create; } + { template ASNChoiceType t_i := activate(temp_altstep()); } + { template ASNChoiceType t_i := activate(derefers(temp_altstep_pointer)()); } + { template ASNChoiceType t_i := execute(temp_altstep(), 5); } + { template ASNChoiceType t_i := execute(derefers(temp_altstep_pointer)(),5); } + { template ASNChoiceType t_i := refers(f_functiontypeValueTest); } + { template ASNChoiceType t_i := refers(ef_ext_function); } + { template ASNChoiceType t_i := refers(as_altstep); } + { template ASNChoiceType t_i := refers(tc_testcase); } +} + +control +{ +} +} // end of module diff --git a/Semantic_Analizer_Tests/src/Basic_tests/statement_tests.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/statement_tests.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1ee7925b2e687a43a76c05cf2dc8d1dab7f30bbb --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/statement_tests.ttcn @@ -0,0 +1,1790 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module statement_tests +{ + +type integer my_int; +type integer my_int2; +signature S_ProvedureSignatureID(in integer par1) exception( integer, charstring ); +signature S_ProvedureSignatureID2(in charstring par1); +signature S_ProvedureSignatureID3(in integer par1) noblock exception( integer, charstring ); +signature S_ProvedureSignatureID4(in charstring par1) return integer; +signature S_ProvedureSignatureID5() return integer; +signature S_ProvedureSignatureID6(out integer par1) exception( integer, charstring ); + +external function ef_c_ext_function(); + +type component mycomponent{}; + +type function t_function() return integer; +function f_comp_return() return mycomponent{ + return mycomponent.create; +} +type altstep t_altstep() runs on mycomponent; + +type testcase t_testcase() runs on mycomponent system mycomponent; +testcase tc_c_testcase() +runs on mycomponent +system mycomponent +{} + +type altstep t_altstep2(inout integer pl_parameterName) runs on componentName_CT2; +type altstep t_altstep3(inout integer pl_parameterName) runs on self; +altstep as_altstepName1(inout integer pl_parameterName) +runs on componentName_CT2 +{ + [] compTimer.timeout { } + [else] { } +} +altstep as_c_altstep() +runs on mycomponent +{ + [guard2] timerName.timeout + {} + [else] + {} +} + +type port testPortName_PT message +{ + in S_ProvedureSignatureID, my_int, my_int, my_int2, boolean; + out S_ProvedureSignatureID, my_int, my_int; + inout S_ProvedureSignatureID, my_int, my_int; +} + +type port testPortName2_PT procedure +{ + in my_int, S_ProvedureSignatureID, S_ProvedureSignatureID; + out my_int, S_ProvedureSignatureID, S_ProvedureSignatureID; + inout my_int, S_ProvedureSignatureID, S_ProvedureSignatureID, S_ProvedureSignatureID5, S_ProvedureSignatureID6; +} + +type port testPortName3_PT procedure +{ + in S_ProvedureSignatureID, S_ProvedureSignatureID3, S_ProvedureSignatureID4; +} + +type port reply_PT procedure +{ + inout S_ProvedureSignatureID3; +} + +type port testPortonlyOut message +{ + out my_int; +} + +type port testPortonlyOut2 procedure +{ + out S_ProvedureSignatureID; +} + +type port testPortonlyOut3 procedure +{ + out S_ProvedureSignatureID4; +} + +type port testPortonlyIn message +{ + in my_int; +} + +type port testPortonlyIn2 procedure +{ + in S_ProvedureSignatureID; +} + +type component componentName_CT +{ + var integer v_variable; + port testPortName_PT portname_PT; + port testPortName2_PT portname2_PT; + port testPortName3_PT portname3_PT; + port testPortonlyOut portnameOut_PT; + port testPortonlyOut2 portnameOut2_PT; + port testPortonlyOut3 portnameOut3_PT; + port testPortonlyIn portnameIn_PT; + port testPortonlyIn2 portnameIn2_PT; + port reply_PT replyport_PT; +} + +type component componentName_CT2 +{ + var integer v_variable; +} + +altstep as_dummyAltstep( ) +{ + [true] timerName.timeout{} + [else]{} +} + +function f_runsonothercomponent() runs on componentName_CT2 return template integer +{} + +function f_forloopStatementTests( ){ + for ( var integer vl_i := 1; vl_i < 5 ; vl_i := vl_i+1 ){} + { var integer vl_i; for (vl_i := 1; vl_i < 5 ; vl_i := vl_i+1 ){} } + + for ( var integer vl_i := 1; true ; vl_i := vl_i+1 ){} + for ( var integer vl_i := 1; false ; vl_i := vl_i+1 ){} + { var integer vl_i; for (vl_i := 1; true ; vl_i := vl_i+1 ){} } + { var integer vl_i; for (vl_i := 1; false ; vl_i := vl_i+1 ){} } + + for ( var integer vl_i := 1; vl_i1 < vl_i2 ; vl_i3 := vl_i+1 ){} + for ( var integer vl_i := 1; vl_i < 5 ; vl_i := vl_i4+1 ){} + for ( var integer vl_i := true; vl_i < 5 ; vl_i := true ){} + for ( var integer vl_i := vl_i2, vl_i2 := 1; vl_i < 5 ; vl_i := vl_i+1 ){} + { var integer vl_i; for (vl_i := 1; vl_i1 < vl_i2 ; vl_i3 := vl_i+1 ){} } + { var integer vl_i; for (vl_i := 1; vl_i < 5 ; vl_i := vl_i4+1 ){} } + { var integer vl_i; for (vl_i := true; vl_i < 5 ; vl_i := true ){} } +} + +function f_ifStatementTests(){ + { var integer vl_i; if(vl_i < vl_i+1){} } + + if(true){} + if(false){} + if(false){ + }else if(true){ + }else if(true){ + }else{} + + if(vl_i < vl_i+1){} +} + +function f_whileStatementTests(){ + { var integer vl_i; while(vl_i < vl_i+1){} } + + while(true){} + while(false){} + + while(vl_i < vl_i+1){} +} + +function f_dowhileStatementTests(){ + { var integer vl_i; do{}while(vl_i < vl_i+1) } + + do{}while(true) + do{}while(false) + + do{}while(vl_i < vl_i+1) +} + +function f_setverdictTests(){ + setverdict ( pass ); + setverdict ( fail ); + setverdict ( inconc ); + setverdict ( none ); + + setverdict ( error ); + + setverdict ( omit ); + setverdict ( null ); + setverdict ( {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)} ); + setverdict ( {field1:=1, field1:="akarmi"} ); + setverdict ( true ); + setverdict ( false ); + setverdict ( not false ); + setverdict ( i ); + setverdict ( 5 ); + setverdict ( 5.5 ); + setverdict ( "akarmi" ); + setverdict ( char(0,0,0,0) ); + setverdict ( 'aa'H ); + setverdict ( '00'B ); + setverdict ( {1,2,3} ); + setverdict ( 5 * 5 ); + setverdict ( 5 + 5 ); + setverdict ( 5 - 5 ); + setverdict ( 5 / 5 ); + setverdict ( 5 mod 5 ); + setverdict ( 5 rem 5 ); + setverdict ( true and true ); + setverdict ( true or true ); + setverdict ( not4b 'aa'H ); + setverdict ( not4b '00'B ); + setverdict ( '00'B and4b '00'B ); + setverdict ( '00'H and4b '00'H ); + setverdict ( '00'B or4b '00'B ); + setverdict ( '00'H or4b '00'H ); + setverdict ( '00'B xor4b '00'B ); + setverdict ( '00'H xor4b '00'H ); + setverdict ( '00'B << 1 ); + setverdict ( '00'H << 1 ); + setverdict ( '00'B >> 1 ); + setverdict ( '00'H >> 1 ); + setverdict ( '00'B <@ 1 ); + setverdict ( '00'H <@ 1 ); + setverdict ( '00'B @> 1 ); + setverdict ( '00'H @> 1 ); + setverdict ( '00'B & '00'B ); + setverdict ( '00'H & '00'H ); + setverdict ( "akarmi" & "akarmi2" ); + setverdict ( 5 == 5 ); + setverdict ( 5 != 5 ); + setverdict ( 5 < 5 ); + setverdict ( 5 > 5 ); + setverdict ( 5 <= 5 ); + setverdict ( 5 >= 5 ); + setverdict ( bit2hex('00'B) ); + setverdict ( bit2int('00'B) ); + setverdict ( bit2oct('00'B) ); + setverdict ( bit2str('00'B) ); + setverdict ( char2int("5") ); + setverdict ( char2oct("akarmi") ); + setverdict ( float2int( 5.5) ); + setverdict ( float2str(5.5) ); + setverdict ( hex2int('FF'H) ); + setverdict ( hex2oct('FF00'H) ); + setverdict ( hex2str('FF00'H) ); + setverdict ( int2char(5) ); + setverdict ( int2float(5) ); + setverdict ( int2str(5) ); + setverdict ( int2unichar(5) ); + setverdict ( oct2bit('00FF'O) ); + setverdict ( oct2char('0F'O) ); + setverdict ( oct2hex('0F'O) ); + setverdict ( oct2int('0F'O) ); + setverdict ( oct2str('0F'O) ); + setverdict ( str2bit("0101") ); + setverdict ( str2float("5.5") ); + setverdict ( str2hex("0101") ); + setverdict ( str2int("5") ); + setverdict ( str2oct("0101") ); + setverdict ( unichar2int(char(0,0,0,0)) ); + setverdict ( unichar2char(char(0,0,0,0)) ); + setverdict ( int2bit(1,3) ); + setverdict ( int2hex(1,3) ); + setverdict ( int2oct(1,3) ); + setverdict ( rnd() ); + setverdict ( rnd(5.5) ); + setverdict ( isbound(5.5) ); + setverdict ( isvalue(5.5) ); + setverdict ( lengthof("akarmi") ); + setverdict ( sizeof(c_integer) ); + setverdict ( regexp("akarmi","akarmi", 0) ); + setverdict ( match(5,5) ); + setverdict ( mtc ); + setverdict ( system ); + setverdict ( self ); + setverdict ( any component . running ); + setverdict ( all component . running ); + setverdict ( any component . alive ); + setverdict ( all component . alive ); + setverdict ( any timer . running ); + setverdict ( f_comp_return().running ); + setverdict ( f_comp_return().alive ); + setverdict ( t.read ); + setverdict ( mycomponent.create ); + setverdict ( activate(temp_altstep()) ); + setverdict ( activate(derefers(temp_altstep_pointer)()) ); + setverdict ( refers(f_functiontypeValueTest) ); + setverdict ( refers(ef_c_ext_function) ); + setverdict ( refers(as_c_altstep) ); + setverdict ( refers(tc_c_testcase) ); +} + +function f_altguradsTests(){ + alt + { [true] as_dummyAltstep(); + [true] as_dummyAltstep(); + [else] {} + }; + + alt + { [else] {repeat;} + [true] fakeOperation(); + [true] f_altguradsTests(); + }; +} + +function f_invokedAltguardTests() runs on componentName_CT2 return integer +{ + const t_altstep2 cl_altstep2 := refers (as_altstepName1); + const t_altstep2 cl_altstep3 := null; + const t_function cl_function := null; + var integer vl_i; + alt + { + [] cl_altstep2.apply(vl_i) { return 5;} + + [nonExi] cl_altstep2.apply(vl_i) { } + [5] cl_altstep2.apply(vl_i) { } + [] cl_function.apply(vl_i) { } + [] cl_altstep3.apply() { } + [] cl_altstep3.apply(5) { } + [] cl_altstep3.apply(vl_i, 5) { } + }; + + alt { [] cl_altstep2.apply(vl_i) { } }; + alt { [] cl_altstep2.apply(vl_i) {} + [] cl_altstep2.apply(vl_i) { return 5} }; + alt { [] cl_altstep2.apply(vl_i) { return 5} + [] cl_altstep2.apply(vl_i) {} }; + alt { [] cl_altstep2.apply(vl_i) { return 5} + [] cl_altstep2.apply(vl_i) { return 5} }; + alt { [] cl_altstep2.apply(vl_i) { return 5} }; + alt { [] cl_altstep2.apply(vl_i) { return 5} + [else] { return 5} }; +} + +function f_selectTests( ) +{ + var integer vl_akarmi; + + select( vl_akarmi ) + { case ( 1 ){} + case else {} + } + + select( vl_akarmi ) + { case ( 1 ){} + case else {} + case ( 1 ){} + } + + select( barmi ) + { case ( 1 ){} + case else {} + } + + select( vl_akarmi ) + { case ( "akarmi" ){} + case else {} + } +} + +//FIXME only syntactical tests, the semantic validation is not yet implemented +function f_actionTests(){ + action (); + action ( pass ); + action ( fail ); + action ( inconc ); + action ( none ); + action ( error ); + action ( omit ); + action ( null ); + action ( {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)} ); + action ( {field1:=1, field1:="akarmi"} ); + action ( true ); + action ( false ); + action ( not false ); + action ( i ); + action ( 5 ); + action ( 5.5 ); + action ( "akarmi" ); + action ( char(0,0,0,0) ); + action ( 'aa'H ); + action ( '00'B ); + action ( {1,2,3} ); + action ( 5 * 5 ); + action ( 5 + 5 ); + action ( 5 - 5 ); + action ( 5 / 5 ); + action ( 5 mod 5 ); + action ( 5 rem 5 ); + action ( true and true ); + action ( true or true ); + action ( not4b 'aa'H ); + action ( not4b '00'B ); + action ( '00'B and4b '00'B ); + action ( '00'H and4b '00'H ); + action ( '00'B or4b '00'B ); + action ( '00'H or4b '00'H ); + action ( '00'B xor4b '00'B ); + action ( '00'H xor4b '00'H ); + action ( '00'B << 1 ); + action ( '00'H << 1 ); + action ( '00'B >> 1 ); + action ( '00'H >> 1 ); + action ( '00'B <@ 1 ); + action ( '00'H <@ 1 ); + action ( '00'B @> 1 ); + action ( '00'H @> 1 ); + action ( '00'B & '00'B ); + action ( '00'H & '00'H ); + action ( "akarmi" & "akarmi2" ); + action ( 5 == 5 ); + action ( 5 != 5 ); + action ( 5 < 5 ); + action ( 5 > 5 ); + action ( 5 <= 5 ); + action ( 5 >= 5 ); + action ( bit2hex('00'B) ); + action ( bit2int('00'B) ); + action ( bit2oct('00'B) ); + action ( bit2str('00'B) ); + action ( char2int("5") ); + action ( char2oct("akarmi") ); + action ( float2int( 5.5) ); + action ( float2str(5.5) ); + action ( hex2int('FF'H) ); + action ( hex2oct('FF00'H) ); + action ( hex2str('FF00'H) ); + action ( int2char(5) ); + action ( int2float(5) ); + action ( int2str(5) ); + action ( int2unichar(5) ); + action ( oct2bit('00FF'O) ); + action ( oct2char('0F'O) ); + action ( oct2hex('0F'O) ); + action ( oct2int('0F'O) ); + action ( oct2str('0F'O) ); + action ( str2bit("0101") ); + action ( str2float("5.5") ); + action ( str2hex("0101") ); + action ( str2int("5") ); + action ( str2oct("0101") ); + action ( unichar2int(char(0,0,0,0)) ); + action ( unichar2char(char(0,0,0,0)) ); + action ( int2bit(1,3) ); + action ( int2hex(1,3) ); + action ( int2oct(1,3) ); + action ( rnd() ); + action ( rnd(5.5) ); + action ( isbound(5.5) ); + action ( isvalue(5.5) ); + action ( lengthof("akarmi") ); + action ( sizeof(c_integer) ); + action ( regexp("akarmi","akarmi", 0) ); + action ( match(5,5) ); + action ( mtc ); + action ( system ); + action ( self ); + action ( any component . running ); + action ( all component . running ); + action ( any component . alive ); + action ( all component . alive ); + action ( any timer . running ); + action ( f_comp_return().running ); + action ( f_comp_return().alive ); + action ( t.read ); + action ( mycomponent.create ); + action ( activate(temp_altstep()) ); + action ( activate(derefers(temp_altstep_pointer)()) ); + action ( refers(f_functiontypeValueTest) ); + action ( refers(ef_c_ext_function) ); + action ( refers(as_c_altstep) ); + action ( refers(tc_c_testcase) ); +} + +function f_logTests(){ + log (); + log ( "long", "parameter", "list"); + log ( pass ); + log ( fail ); + log ( inconc ); + log ( none ); + log ( error ); + log ( omit ); + log ( null ); + log (__LINE__); + log (%moduleId); + log ( {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)} ); + log ( {field1:=1, field1:="akarmi"} ); + log ( true ); + log ( false ); + log ( not false ); + log ( i ); + log ( 5 ); + log (integer : 5); + log (?); + log ( 5.5 ); + log ( "akarmi" ); + log ( char(0,0,0,0) ); + log ( 'aa'H ); + log ( '00'B ); + log ( {1,2,3} ); + log ( nonExi : {1,2,3}); + log ( 5 * 5 ); + log ( 5 + 5 ); + log ( 5 - 5 ); + log ( 5 / 5 ); + log ( 5 mod 5 ); + log ( 5 rem 5 ); + log ( true and true ); + log ( true or true ); + log ( not4b 'aa'H ); + log ( not4b '00'B ); + log ( '00'B and4b '00'B ); + log ( '00'H and4b '00'H ); + log ( '00'B or4b '00'B ); + log ( '00'H or4b '00'H ); + log ( '00'B xor4b '00'B ); + log ( '00'H xor4b '00'H ); + log ( '00'B << 1 ); + log ( '00'H << 1 ); + log ( '00'B >> 1 ); + log ( '00'H >> 1 ); + log ( '00'B <@ 1 ); + log ( '00'H <@ 1 ); + log ( '00'B @> 1 ); + log ( '00'H @> 1 ); + log ( '00'B & '00'B ); + log ( '00'H & '00'H ); + log ( "akarmi" & "akarmi2" ); + log ( 5 == 5 ); + log ( 5 != 5 ); + log ( 5 < 5 ); + log ( 5 > 5 ); + log ( 5 <= 5 ); + log ( 5 >= 5 ); + log ( bit2hex('00'B) ); + log ( bit2int('00'B) ); + log ( bit2oct('00'B) ); + log ( bit2str('00'B) ); + log ( char2int("5") ); + log ( char2oct("akarmi") ); + log ( float2int( 5.5) ); + log ( float2str(5.5) ); + log ( hex2int('FF'H) ); + log ( hex2oct('FF00'H) ); + log ( hex2str('FF00'H) ); + log ( int2char(5) ); + log ( int2float(5) ); + log ( int2str(5) ); + log ( int2unichar(5) ); + log ( oct2bit('00FF'O) ); + log ( oct2char('0F'O) ); + log ( oct2hex('0F'O) ); + log ( oct2int('0F'O) ); + log ( oct2str('0F'O) ); + log ( str2bit("0101") ); + log ( str2float("5.5") ); + log ( str2hex("0101") ); + log ( str2int("5") ); + log ( str2oct("0101") ); + log ( unichar2int(char(0,0,0,0)) ); + log ( unichar2char(char(0,0,0,0)) ); + log ( int2bit(1,3) ); + log ( int2hex(1,3) ); + log ( int2oct(1,3) ); + log ( rnd() ); + log ( rnd(5.5) ); + log ( isbound(5.5) ); + log ( isvalue(5.5) ); + log ( lengthof("akarmi") ); + log ( sizeof(c_integer) ); + log ( regexp("akarmi","akarmi", 0) ); + log ( match(5,5) ); + log ( mtc ); + log ( system ); + log ( self ); + log ( any component . running ); + log ( all component . running ); + log ( any component . alive ); + log ( all component . alive ); + log ( any timer . running ); + log ( f_comp_return().running ); + log ( f_comp_return().alive ); + log ( t.read ); + log ( mycomponent.create ); + log ( activate(temp_altstep()) ); + log ( activate(derefers(temp_altstep_pointer)()) ); + log ( refers(f_functiontypeValueTest) ); + log ( refers(ef_c_ext_function) ); + log ( refers(as_c_altstep) ); + log ( refers(tc_c_testcase) ); +} + +const charstring cg_c := log2str(cg_c); + +function f_log2strTests(){ + var charstring vl_i; + { vl_i := log2str (); } + { vl_i := log2str ( pass ); } + { vl_i := log2str ( fail ); } + { vl_i := log2str ( inconc ); } + { vl_i := log2str ( none ); } + { vl_i := log2str ( error ); } + { vl_i := log2str ( omit ); } + { vl_i := log2str ( null ); } + { vl_i := log2str ( {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)} ); } + { vl_i := log2str ( {field1:=1, field1:="akarmi"} ); } + { vl_i := log2str ( true ); } + { vl_i := log2str ( false ); } + { vl_i := log2str ( not false ); } + { vl_i := log2str ( j ); } + { vl_i := log2str ( 5 ); } + { vl_i := log2str ( 5.5 ); } + { vl_i := log2str ( "akarmi" ); } + { vl_i := log2str ( char(0,0,0,0) ); } + { vl_i := log2str ( 'aa'H ); } + { vl_i := log2str ( '00'B ); } + { vl_i := log2str ( {1,2,3} ); } + { vl_i := log2str ( 5 * 5 ); } + { vl_i := log2str ( 5 + 5 ); } + { vl_i := log2str ( 5 - 5 ); } + { vl_i := log2str ( 5 / 5 ); } + { vl_i := log2str ( 5 mod 5 ); } + { vl_i := log2str ( 5 rem 5 ); } + { vl_i := log2str ( true and true ); } + { vl_i := log2str ( true or true ); } + { vl_i := log2str ( not4b 'aa'H ); } + { vl_i := log2str ( not4b '00'B ); } + { vl_i := log2str ( '00'B and4b '00'B ); } + { vl_i := log2str ( '00'H and4b '00'H ); } + { vl_i := log2str ( '00'B or4b '00'B ); } + { vl_i := log2str ( '00'H or4b '00'H ); } + { vl_i := log2str ( '00'B xor4b '00'B ); } + { vl_i := log2str ( '00'H xor4b '00'H ); } + { vl_i := log2str ( '00'B << 1 ); } + { vl_i := log2str ( '00'H << 1 ); } + { vl_i := log2str ( '00'B >> 1 ); } + { vl_i := log2str ( '00'H >> 1 ); } + { vl_i := log2str ( '00'B <@ 1 ); } + { vl_i := log2str ( '00'H <@ 1 ); } + { vl_i := log2str ( '00'B @> 1 ); } + { vl_i := log2str ( '00'H @> 1 ); } + { vl_i := log2str ( '00'B & '00'B ); } + { vl_i := log2str ( '00'H & '00'H ); } + { vl_i := log2str ( "akarmi" & "akarmi2" ); } + { vl_i := log2str ( 5 == 5 ); } + { vl_i := log2str ( 5 != 5 ); } + { vl_i := log2str ( 5 < 5 ); } + { vl_i := log2str ( 5 > 5 ); } + { vl_i := log2str ( 5 <= 5 ); } + { vl_i := log2str ( 5 >= 5 ); } + { vl_i := log2str ( bit2hex('00'B) ); } + { vl_i := log2str ( bit2int('00'B) ); } + { vl_i := log2str ( bit2oct('00'B) ); } + { vl_i := log2str ( bit2str('00'B) ); } + { vl_i := log2str ( char2int("5") ); } + { vl_i := log2str ( char2oct("akarmi") ); } + { vl_i := log2str ( float2int( 5.5) ); } + { vl_i := log2str ( float2str(5.5) ); } + { vl_i := log2str ( hex2int('FF'H) ); } + { vl_i := log2str ( hex2oct('FF00'H) ); } + { vl_i := log2str ( hex2str('FF00'H) ); } + { vl_i := log2str ( int2char(5) ); } + { vl_i := log2str ( int2float(5) ); } + { vl_i := log2str ( int2str(5) ); } + { vl_i := log2str ( int2unichar(5) ); } + { vl_i := log2str ( oct2bit('00FF'O) ); } + { vl_i := log2str ( oct2char('0F'O) ); } + { vl_i := log2str ( oct2hex('0F'O) ); } + { vl_i := log2str ( oct2int('0F'O) ); } + { vl_i := log2str ( oct2str('0F'O) ); } + { vl_i := log2str ( str2bit("0101") ); } + { vl_i := log2str ( str2float("5.5") ); } + { vl_i := log2str ( str2hex("0101") ); } + { vl_i := log2str ( str2int("5") ); } + { vl_i := log2str ( str2oct("0101") ); } + { vl_i := log2str ( unichar2int(char(0,0,0,0)) ); } + { vl_i := log2str ( unichar2char(char(0,0,0,0)) ); } + { vl_i := log2str ( int2bit(1,3) ); } + { vl_i := log2str ( int2hex(1,3) ); } + { vl_i := log2str ( int2oct(1,3) ); } + { vl_i := log2str ( rnd() ); } + { vl_i := log2str ( rnd(5.5) ); } + { vl_i := log2str ( isbound(5.5) ); } + { vl_i := log2str ( isvalue(5.5) ); } + { vl_i := log2str ( lengthof("akarmi") ); } + { vl_i := log2str ( sizeof(c_integer) ); } + { vl_i := log2str ( regexp("akarmi","akarmi", 0) ); } + { vl_i := log2str ( match(5,5) ); } + { vl_i := log2str ( mtc ); } + { vl_i := log2str ( system ); } + { vl_i := log2str ( self ); } + { vl_i := log2str ( any component . running ); } + { vl_i := log2str ( all component . running ); } + { vl_i := log2str ( any component . alive ); } + { vl_i := log2str ( all component . alive ); } + { vl_i := log2str ( any timer . running ); } + { vl_i := log2str ( f_comp_return().running ); } + { vl_i := log2str ( f_comp_return().alive ); } + { vl_i := log2str ( t.read ); } + { vl_i := log2str ( mycomponent.create ); } + { vl_i := log2str ( activate(temp_altstep()) ); } + { vl_i := log2str ( activate(derefers(temp_altstep_pointer)()) ); } + { vl_i := log2str ( refers(f_functiontypeValueTest) ); } + { vl_i := log2str ( refers(ef_c_ext_function) ); } + { vl_i := log2str ( refers(as_c_altstep) ); } + { vl_i := log2str ( refers(tc_c_testcase) ); } +} + +//FIXME add more tests +function f_labelTests(){ + label akarmi + label akarmi; + label akarmi2; + + var integer vl_i; + + goto akarmi; + goto akarmi3; + goto akarmi4; + + var integer vl_i2; + + label akarmi3; +} + +function f_labelTests2() return integer +{ + label akarmi + goto akarmi; + return 1; +} + +function f_mapTests(){ + var componentName_CT vl_comp, vl_comp2; + map(vl_comp:portname_PT, vl_comp:portname_PT); + + map(vl_comp:portname1_PT, vl_comp:portname2_PT); + map(vl_comp:v_variable, vl_comp:v_variable); + map(comp1:portname_PT, vl_comp2:portname_PT); + map(mtc:portname1_PT, mtc:portname2_PT); + map(self:portname1_PT, self:portname2_PT); + map(system:portname1_PT, system:portname2_PT); + map(vl_comp:portname_PT, vl_comp2:portnameOut_PT); + map(vl_comp:portnameOut_PT, vl_comp2:portname_PT); +} + +function f_unmapTests(){ + var componentName_CT vl_comp, vl_comp2; + unmap(vl_comp:portname_PT, vl_comp:portname_PT); + + unmap(vl_comp:portname1_PT, vl_comp:portname2_PT); + unmap(vl_comp:v_variable, vl_comp:v_variable); + unmap(comp1:portname, vl_comp2:portname_PT); + unmap(mtc:portname1_PT, mtc:portname2_PT); + unmap(self:portname1_PT, self:portname2_PT); + unmap(system:portname1_PT, system:portname2_PT); + unmap(vl_comp:portname_PT, vl_comp2:portnameOut_PT); + unmap(vl_comp:portnameOut_PT, vl_comp2:portname_PT); +} + +function f_connectTests(){ + var componentName_CT vl_comp, vl_comp2; + connect(vl_comp:portname_PT, vl_comp:portname_PT); + + connect(vl_comp:portname1_PT, vl_comp:portname2_PT); + connect(vl_comp:v_variable, vl_comp:v_variable); + connect(comp1:portname, vl_comp2:portname_PT); + connect(mtc:portname1, mtc:portname2); + connect(self:portname1, self:portname2); + connect(system:portname1, system:portname2); + connect(vl_comp:portname_PT, vl_comp2:portnameOut_PT); + connect(vl_comp:portnameOut_PT, vl_comp2:portname_PT); +} + +function f_disconnectTests(){ + var componentName_CT vl_comp, vl_comp2; + disconnect(vl_comp:portname_PT, vl_comp:portname_PT); + + disconnect(vl_comp:portname1_PT, vl_comp:portname2_PT); + disconnect(vl_comp:v_variable, vl_comp:v_variable); + disconnect(comp1:portname, vl_comp2:portname_PT); + disconnect(mtc:portname1, mtc:portname2); + disconnect(self:portname1, self:portname2); + disconnect(system:portname1, system:portname2); + disconnect(vl_comp:portname_PT, vl_comp2:portnameOut_PT); + disconnect(vl_comp:portnameOut_PT, vl_comp2:portname_PT); +} + +function f_portTests(testPortName_PT pl_port_par) runs on componentName_CT{ + var componentName_CT vl_comp; + all port.clear; + portname_PT.clear; + pl_port_par.clear; + + akarmi.clear; + vl_comp.clear; +} + +function f_porthaltTests(testPortName_PT pl_port_par) runs on componentName_CT{ + var componentName_CT vl_comp; + all port.halt; + portname_PT.halt; + pl_port_par.halt; + + akarmi.halt; + vl_comp.halt; +} + +function f_startTests2() {} +function f_startTests3(out integer pl_par1, out template integer pl_par2) runs on componentName_CT {} +function f_startTests4(in testPortName_PT pl_par1) runs on componentName_CT return testPortName_PT {} + +type function t_functionstartTests2(); +type function t_functionstartTests3(out integer pl_par1, out template integer pl_par2) runs on componentName_CT; +type function t_functionstartTests4(in testPortName_PT pl_par1) runs on componentName_CT return testPortName_PT; +type function t_functionstartTests5() runs on self; +type function t_functionrunsonothercomponent() runs on componentName_CT2 return template integer; + +function f_startTests(testPortName_PT pl_port_par) runs on componentName_CT { + var componentName_CT vl_comp; + timer TL_timervar1 := 5.0; + timer TL_timervar2; + timer TL_timervar3[2] := {5.0, -}; + + all port.start; + portname_PT.start; + pl_port_par.start; + vl_comp.start(f_startTests(pl_port_par)); + vl_comp.start(f_startTests2()); + var integer vl_akarmi; + var template integer vt_akarmit; + vl_comp.start(f_startTests3(vl_akarmi, vt_akarmit)); + vl_comp.start(f_startTests4(vl_akarmi)); + TL_timervar1.start; + TL_timervar1.start( 5.0 ); + TL_timervar3[0].start; + + TL_timervar2.start; + TL_timervar3[1].start; + TL_timervar1.start( -5.0 ); + TL_timervar1.start( -5 ); + TL_timervar1.start( "akarmi" ); //FIXME add more tests + vl_comp.start(f_runsonothercomponent()); + vl_akarmi.start; + f_startTests.start; + f_startTests.start(5.0); +} + +function f_referencedStartTests(testPortName_PT pl_port_par) runs on componentName_CT { + var componentName_CT vl_comp; + var t_functionstartTests2 vl_function2; + var t_functionstartTests3 vl_function3; + var t_functionstartTests4 vl_function4; + var t_functionrunsonothercomponent vl_functionOther; + + vl_comp.start(derefers(vl_function2)()); + + var integer vl_akarmi; + var template integer vt_akarmit; + vl_comp.start(derefers(refers(f_startTests2))()); + vl_comp.start(derefers(null)()); + vl_comp.start(derefers(vl_function3)(vl_akarmi, vt_akarmit)); + vl_comp.start(derefers(vl_function4)(vl_akarmi)); + vl_comp.start(derefers(nonExi)()); + vl_comp.start(derefers(vl_akarmi)()); + vl_comp.start(derefers(vl_function2)(nonExi)); + vl_comp.start(derefers(functionOther)()); +} + +function f_stopTests(testPortName_PT pl_port_par) runs on componentName_CT{ + var componentName_CT vl_comp; + timer TL_timervar; + + all port.stop; + all timer.stop; + portname_PT.stop; + pl_port_par.stop; + vl_comp.stop; + TL_timervar.stop; + mtc.stop; + + akarmi.stop; + f_stopTests.stop; +} + +function f_stopexecutionTest(){ + stop; +} + +function f_killedTests(){ + var componentName_CT vl_comp; + + vl_comp.killed; + any component.killed; + all component.killed; + + akarmi.killed; + f_killedTests.killed; + +} + +function f_killTests(){ + var componentName_CT vl_comp; + + vl_comp.kill; + all component.kill; + mtc.kill; + + akarmi.kill; + f_killTests.kill; +} + +type integer doneInteger +with { +extension "done" +} + +function f_doneTests(){ + var componentName_CT vl_comp; + var integer vl_i; + + vl_comp.done; + all component.done; + any component.done; + vl_comp.done(doneInteger : ?); + vl_comp.done(doneInteger : ?) -> value vl_i; + + vl_comp.done -> value akarmi; +} + +function f_timeoutTests(){ + timer TL_timervar; + + TL_timervar.timeout; + + akarmi.timeout; + f_timeoutTests.timeout; +} + +function f_triggerPortTests(testPortName_PT pl_port_par)runs on componentName_CT{ + any port.trigger; + + portname_PT.trigger; + portname_PT.trigger( integer:* ); + pl_port_par.trigger; + + portname2_PT.trigger; + portnameOut_PT.trigger; + portname_PT.trigger( charstring:* ); + portname_PT.trigger -> value myVar; + portname_PT.trigger -> value myVar sender myPeer; + any port.trigger( templateInstance ) -> value myVar; +} + +function f_receivePortTests(testPortName_PT pl_port_par)runs on componentName_CT{ + var integer vl_myIntVar := 5; + var float vl_myFloatVar := 5.0; + + any port.receive; + + portname_PT.receive; + portname_PT.receive( integer:* ); + pl_port_par.receive; + portname_PT.receive(?) -> value vl_myIntVar; + + portname2_PT.receive; + portnameOut_PT.receive; + portname_PT.receive( charstring:* ); + portname_PT.receive(?); + portname_PT.receive(?) -> value vl_myFloatVar; + portname_PT.receive -> value myVar; + portname_PT.receive -> value myVar sender myPeer; + any port.receive( templateInstance ) -> value myVar; +} + +function f_checkreceivePortTests(testPortName_PT pl_port_par)runs on componentName_CT{ + any port.check( receive ); + + portname_PT.check( receive ); + portname_PT.check( receive( integer:* )); + pl_port_par.check( receive ); + + portname2_PT.check( receive ); + portnameOut_PT.check( receive ); + portname_PT.check( receive( charstring:* )); + any port.check( receive( templateInstance )); +} + +function f_sendPortTests(testPortName_PT pl_port_par)runs on componentName_CT{ + portname_PT.send(5); + portname_PT.send ( 5 * 5 ); + portname_PT.send ( 5 + 5 ); + portname_PT.send ( 5 - 5 ); + portname_PT.send ( 5 / 5 ); + portname_PT.send ( 5 mod 5 ); + portname_PT.send ( 5 rem 5 ); + portname_PT.send ( bit2int('00'B) ); + portname_PT.send ( char2int("5") ); + portname_PT.send ( hex2int('FF'H) ); + portname_PT.send ( float2int( 5.5) ); + portname_PT.send ( str2int("5") ); + portname_PT.send ( oct2int('0F'O) ); + portname_PT.send ( unichar2int(char(0,0,0,0)) ); + portname_PT.send ( lengthof("akarmi") ); + portname_PT.send ( sizeof(c_integer) ); + portname_PT.send ( omit ); + + portname_PT.send(5) to all component; + + portname2_PT.send(5); + portnameIn_PT.send(5); + portname_PT.send( "akarmi" ); + + portname_PT.send ( pass ); + portname_PT.send ( fail ); + portname_PT.send ( inconc ); + portname_PT.send ( none ); + portname_PT.send ( error ); + portname_PT.send ( null ); + portname_PT.send ( {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)} ); + portname_PT.send ( {field1:=1, field1:="akarmi"} ); + portname_PT.send ( true ); + portname_PT.send ( false ); + portname_PT.send ( not false ); + portname_PT.send ( i ); + portname_PT.send ( 5.5 ); + portname_PT.send ( "akarmi" ); + portname_PT.send ( char(0,0,0,0) ); + portname_PT.send ( 'aa'H ); + portname_PT.send ( '00'B ); + portname_PT.send ( {1,2,3} ); + portname_PT.send ( true and true ); + portname_PT.send ( true or true ); + portname_PT_PT.send ( not4b 'aa'H ); + portname_PT.send ( not4b '00'B ); + portname_PT.send ( '00'B and4b '00'B ); + portname_PT.send ( '00'H and4b '00'H ); + portname_PT.send ( '00'B or4b '00'B ); + portname_PT.send ( '00'H or4b '00'H ); + portname_PT.send ( '00'B xor4b '00'B ); + portname_PT.send ( '00'H xor4b '00'H ); + portname_PT.send ( '00'B << 1 ); + portname_PT.send ( '00'H << 1 ); + portname_PT.send ( '00'B >> 1 ); + portname_PT.send ( '00'H >> 1 ); + portname_PT.send ( '00'B <@ 1 ); + portname_PT.send ( '00'H <@ 1 ); + portname_PT.send ( '00'B @> 1 ); + portname_PT.send ( '00'H @> 1 ); + portname_PT.send ( '00'B & '00'B ); + portname_PT.send ( '00'H & '00'H ); + portname_PT.send ( "akarmi" & "akarmi2" ); + portname_PT.send ( 5 == 5 ); + portname_PT.send ( 5 != 5 ); + portname_PT.send ( 5 < 5 ); + portname_PT.send ( 5 > 5 ); + portname_PT.send ( 5 <= 5 ); + portname_PT.send ( 5 >= 5 ); + portname_PT.send ( bit2hex('00'B) ); + portname_PT.send ( bit2oct('00'B) ); + portname_PT.send ( bit2str('00'B) ); + portname_PT.send ( char2oct("akarmi") ); + portname_PT.send ( float2str(5.5) ); + portname_PT.send ( hex2oct('FF00'H) ); + portname_PT.send ( hex2str('FF00'H) ); + portname_PT.send ( int2char(5) ); + portname_PT.send ( int2float(5) ); + portname_PT.send ( int2str(5) ); + portname_PT.send ( int2unichar(5) ); + portname_PT.send ( oct2bit('00FF'O) ); + portname_PT.send ( oct2char('0F'O) ); + portname_PT.send ( oct2hex('0F'O) ); + portname_PT.send ( oct2str('0F'O) ); + portname_PT.send ( str2bit("0101") ); + portname_PT.send ( str2float("5.5") ); + portname_PT.send ( str2hex("0101") ); + portname_PT.send ( str2oct("0101") ); + portname_PT.send ( unichar2char(char(0,0,0,0)) ); + portname_PT.send ( int2bit(1,3) ); + portname_PT.send ( int2hex(1,3) ); + portname_PT.send ( int2oct(1,3) ); + portname_PT.send ( rnd() ); + portname_PT.send ( rnd(5.5) ); + portname_PT.send ( isbound(5.5) ); + portname_PT.send ( isvalue(5.5) ); + portname_PT.send ( regexp("akarmi","akarmi", 0) ); + portname_PT.send ( match(5,5) ); + portname_PT.send ( mtc ); + portname_PT.send ( system ); + portname_PT.send ( self ); + portname_PT.send ( any component . running ); + portname_PT.send ( all component . running ); + portname_PT.send ( any component . alive ); + portname_PT.send ( all component . alive ); + portname_PT.send ( any timer . running ); + portname_PT.send ( f_comp_return().running ); + portname_PT.send ( f_comp_return().alive ); + portname_PT.send ( t.read ); + portname_PT.send ( mycomponent.create ); + portname_PT.send ( activate(temp_altstep()) ); + portname_PT.send ( activate(derefers(temp_altstep_pointer)()) ); + portname_PT.send ( refers(f_sendPortTests) ); + portname_PT.send ( refers(ef_c_ext_function) ); + portname_PT.send ( refers(as_c_altstep) ); + portname_PT.send ( refers(tc_c_testcase) ); + portname_PT.send ( integer:? ); +} + +function f_replyPortTests(testPortName_PT pl_port_par)runs on componentName_CT{ + portname2_PT.reply( { 1 } ); + portname2_PT.reply ( omit ); + + portname2_PT.reply( { 1 } ) to all component; + + portname_PT.reply({ 1 }); + portnameOut2_PT.reply({ 1 }); + + portname2_PT.reply ( 5 ); + portname2_PT.reply ( 5 * 5 ); + portname2_PT.reply ( 5 + 5 ); + portname2_PT.reply ( 5 - 5 ); + portname2_PT.reply ( 5 / 5 ); + portname2_PT.reply ( 5 mod 5 ); + portname2_PT.reply ( 5 rem 5 ); + portname2_PT.reply ( bit2int('00'B) ); + portname2_PT.reply ( char2int("5") ); + portname2_PT.reply ( hex2int('FF'H) ); + portname2_PT.reply ( float2int( 5.5) ); + portname2_PT.reply ( str2int("5") ); + portname2_PT.reply ( oct2int('0F'O) ); + portname2_PT.reply ( unichar2int(char(0,0,0,0)) ); + portname2_PT.reply ( lengthof("akarmi") ); + portname2_PT.reply ( sizeof(c_integer) ); + portname2_PT.reply ( pass ); + portname2_PT.reply ( fail ); + portname2_PT.reply ( inconc ); + portname2_PT.reply ( none ); + portname2_PT.reply ( error ); + portname2_PT.reply ( null ); + portname2_PT.reply ( {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)} ); + portname2_PT.reply ( {field1:=1, field1:="akarmi"} ); + portname2_PT.reply ( true ); + portname2_PT.reply ( false ); + portname2_PT.reply ( not false ); + portname2_PT.reply ( i ); + portname2_PT.reply ( 5.5 ); + portname2_PT.reply ( "akarmi" ); + portname2_PT.reply ( char(0,0,0,0) ); + portname2_PT.reply ( 'aa'H ); + portname2_PT.reply ( '00'B ); + portname2_PT.reply ( {1,2,3} ); + portname2_PT.reply ( true and true ); + portname2_PT.reply ( true or true ); + portname2_PT.reply ( not4b 'aa'H ); + portname2_PT.reply ( not4b '00'B ); + portname2_PT.reply ( '00'B and4b '00'B ); + portname2_PT.reply ( '00'H and4b '00'H ); + portname2_PT.reply ( '00'B or4b '00'B ); + portname2_PT.reply ( '00'H or4b '00'H ); + portname2_PT.reply ( '00'B xor4b '00'B ); + portname2_PT.reply ( '00'H xor4b '00'H ); + portname2_PT.reply ( '00'B << 1 ); + portname2_PT.reply ( '00'H << 1 ); + portname2_PT.reply ( '00'B >> 1 ); + portname2_PT.reply ( '00'H >> 1 ); + portname2_PT.reply ( '00'B <@ 1 ); + portname2_PT.reply ( '00'H <@ 1 ); + portname2_PT.reply ( '00'B @> 1 ); + portname2_PT.reply ( '00'H @> 1 ); + portname2_PT.reply ( '00'B & '00'B ); + portname2_PT.reply ( '00'H & '00'H ); + portname2_PT.reply ( "akarmi" & "akarmi2" ); + portname2_PT.reply ( 5 == 5 ); + portname2_PT.reply ( 5 != 5 ); + portname2_PT.reply ( 5 < 5 ); + portname2_PT.reply ( 5 > 5 ); + portname2_PT.reply ( 5 <= 5 ); + portname2_PT.reply ( 5 >= 5 ); + portname2_PT.reply ( bit2hex('00'B) ); + portname2_PT.reply ( bit2oct('00'B) ); + portname2_PT.reply ( bit2str('00'B) ); + portname2_PT.reply ( char2oct("akarmi") ); + portname2_PT.reply ( float2str(5.5) ); + portname2_PT.reply ( hex2oct('FF00'H) ); + portname2_PT.reply ( hex2str('FF00'H) ); + portname2_PT.reply ( int2char(5) ); + portname2_PT.reply ( int2float(5) ); + portname2_PT.reply ( int2str(5) ); + portname2_PT.reply ( int2unichar(5) ); + portname2_PT.reply ( oct2bit('00FF'O) ); + portname2_PT.reply ( oct2char('0F'O) ); + portname2_PT.reply ( oct2hex('0F'O) ); + portname2_PT.reply ( oct2str('0F'O) ); + portname2_PT.reply ( str2bit("0101") ); + portname2_PT.reply ( str2float("5.5") ); + portname2_PT.reply ( str2hex("0101") ); + portname2_PT.reply ( str2oct("0101") ); + portname2_PT.reply ( unichar2char(char(0,0,0,0)) ); + portname2_PT.reply ( int2bit(1,3) ); + portname2_PT.reply ( int2hex(1,3) ); + portname2_PT.reply ( int2oct(1,3) ); + portname2_PT.reply ( rnd() ); + portname2_PT.reply ( rnd(5.5) ); + portname2_PT.reply ( isbound(5.5) ); + portname2_PT.reply ( isvalue(5.5) ); + portname2_PT.reply ( regexp("akarmi","akarmi", 0) ); + portname2_PT.reply ( match(5,5) ); + portname2_PT.reply ( mtc ); + portname2_PT.reply ( system ); + portname2_PT.reply ( self ); + portname2_PT.reply ( any component . running ); + portname2_PT.reply ( all component . running ); + portname2_PT.reply ( any component . alive ); + portname2_PT.reply ( all component . alive ); + portname2_PT.reply ( any timer . running ); + portname2_PT.reply ( f_comp_return().running ); + portname2_PT.reply ( f_comp_return().alive ); + portname2_PT.reply ( t.read ); + portname2_PT.reply ( mycomponent.create ); + portname2_PT.reply ( activate(temp_altstep()) ); + portname2_PT.reply ( activate(derefers(temp_altstep_pointer)()) ); + portname2_PT.reply ( refers(f_sendPortTests) ); + portname2_PT.reply ( refers(ef_c_ext_function) ); + portname2_PT.reply ( refers(as_c_altstep) ); + portname2_PT.reply ( refers(tc_c_testcase) ); + + portname3_PT.reply ( S_ProvedureSignatureID3 : {2}); + portname3_PT.reply ( S_ProvedureSignatureID : {2} value 5); + portname3_PT.reply ( S_ProvedureSignatureID4 : {2}); + portname3_PT.reply ( integer : "akarmi"); + portname3_PT.reply ( S_ProvedureSignatureID : {2} value nonExi); +} + +function f_raisePortTests(testPortName_PT pl_port_par)runs on componentName_CT{ + portname2_PT.raise( S_ProvedureSignatureID, 5 ); + portname2_PT.raise( S_ProvedureSignatureID, "akarmi" ); + + portname_PT.raise( S_ProvedureSignatureID, 5 ); + portnameOut2_PT.raise( S_ProvedureSignatureID, 5 ); + portname2_PT.raise( S_ProvedureSignatureID2, 5 ); +} + +function f_getcallPortTests(testPortName2_PT pl_port_par2)runs on componentName_CT{ + var componentName_CT vl_myPeer, vl_myPeer2; + var integer vl_gainedParam, vl_gainedParam2; + + any port.getcall; + + portname2_PT.getcall; + portname2_PT.getcall( S_ProvedureSignatureID:{?} ) from vl_myPeer -> param (vl_gainedParam) sender vl_myPeer2; + portname2_PT.getcall( S_ProvedureSignatureID:{?} ) from vl_myPeer -> param (vl_gainedParam := par1) sender vl_myPeer2; + pl_port_par2.getcall; + + any port.getcall -> param (akarmi); + any port.getcall( S_ProvedureSignatureID:{?} ) from vl_myPeer -> param (vl_gainedParam) sender vl_myPeer2; + any port.getcall( S_ProvedureSignatureID:{?} ); + portname_PT.getcall; + portnameOut2_PT.getcall; + portname_PT.getcall( S_ProvedureSignatureID:{?} ); + portnameOut2_PT.getcall( S_ProvedureSignatureID:{?} ); + portname2_PT.getcall( S_ProvedureSignatureID2:{?} ); + portname2_PT.getcall( charstring:* ); + portname2_PT.getcall from nonExi -> param (nonExi) sender nonExi; + portname2_PT.getcall( S_ProvedureSignatureID:{?} ) from vl_myPeer -> param (vl_gainedParam, vl_gainedParam2) sender vl_myPeer2; + portname2_PT.getcall( S_ProvedureSignatureID:{?} ) from vl_myPeer -> param (vl_myPeer) sender vl_myPeer2; + portname2_PT.getcall( S_ProvedureSignatureID5:{?} ) from vl_myPeer -> param (vl_gainedParam) sender vl_myPeer2; + portname2_PT.getcall( S_ProvedureSignatureID:{?} ) from vl_myPeer -> param (vl_gainedParam := par1, vl_gainedParam2 := par2) sender vl_myPeer2; + portname2_PT.getcall( S_ProvedureSignatureID:{?} ) from vl_myPeer -> param (vl_gainedParam := par1, vl_gainedParam2 := par1) sender vl_myPeer2; + portname2_PT.getcall( S_ProvedureSignatureID6:{?} ) from vl_myPeer -> param (vl_gainedParam := par1) sender vl_myPeer2; + portname2_PT.getcall( S_ProvedureSignatureID:{?} ) from vl_myPeer -> param (vl_myPeer := par1) sender vl_myPeer2; + portname2_PT.getcall( S_ProvedureSignatureID5:{?} ) from vl_myPeer -> param (vl_gainedParam := par1) sender vl_myPeer2; + any port.getcall( templateInstance ) from myVar; +} + +function f_checkgetcallPortTests(testPortName_PT pl_port_par2)runs on componentName_CT{ + any port.check(getcall); + + portname2_PT.check(getcall); + portname2_PT.check(getcall( S_ProvedureSignatureID:{?} ) from myVar -> param (akarmi) sender myPeer); + pl_port_par2.check(getcall); + + any port.check(getcall -> param (akarmi)); + any port.check(getcall( S_ProvedureSignatureID:{?} )); + portname_PT.check(getcall); + portnameOut2_PT.check(getcall); + portname_PT.check(getcall( S_ProvedureSignatureID:{?} )); + portnameOut2_PT.check(getcall( S_ProvedureSignatureID:{?} )); + portname2_PT.check(getcall( S_ProvedureSignatureID2:{?} )); + portname2_PT.check(getcall( charstring:* )); + portname2_PT.check(getcall from myVar -> param (akarmi) sender myPeer); + any port.check(getcall( templateInstance ) from myVar); +} + +function f_getreplyPortTests(reply_PT pl_port_par2)runs on componentName_CT{ + var componentName_CT vl_myPeer, vl_myPeer2; + var integer vl_gainedParam, vl_gainedParam2; + + any port.getreply; + + portname2_PT.getreply; + portname2_PT.getreply( S_ProvedureSignatureID6:{?} ) from vl_myPeer -> param (vl_gainedParam) sender vl_myPeer2; + portname2_PT.getreply( S_ProvedureSignatureID6:{?} ) from vl_myPeer -> param (vl_gainedParam := par1) sender vl_myPeer2; + portname2_PT.getreply; + + any port.getreply -> param (akarmi); + any port.getreply -> value akarmi; + any port.getreply( S_ProvedureSignatureID:{?} ); + any port.getreply( S_ProvedureSignatureID4:{?} value S_ProvedureSignatureID4:{?} ); + portname_PT.getreply; + portname_PT.getreply( S_ProvedureSignatureID:{?} ); + portname2_PT.getreply; + portname2_PT.getreply( S_ProvedureSignatureID:{?} ); + portnameOut2_PT.getreply; + replyport_PT.getreply( S_ProvedureSignatureID:{?} ); + replyport_PT.getreply( charstring:* ); + portname2_PT.getreply from nonExi -> param (nonExi) sender nonExi; + portname2_PT.getreply( S_ProvedureSignatureID:{?} ) from vl_myPeer -> param (vl_gainedParam, vl_gainedParam2) sender vl_myPeer2; + portname2_PT.getreply( S_ProvedureSignatureID:{?} ) from vl_myPeer -> param (vl_myPeer) sender vl_myPeer2; + portname2_PT.getreply( S_ProvedureSignatureID5:{?} ) from vl_myPeer -> param (vl_gainedParam) sender vl_myPeer2; + portname2_PT.getreply( S_ProvedureSignatureID:{?} ) from vl_myPeer -> param (vl_gainedParam := par1, vl_gainedParam2 := par2) sender vl_myPeer2; + portname2_PT.getreply( S_ProvedureSignatureID6:{?} ) from vl_myPeer -> param (vl_gainedParam := par1, vl_gainedParam2 := par2) sender vl_myPeer2; + portname2_PT.getreply( S_ProvedureSignatureID6:{?} ) from vl_myPeer -> param (vl_gainedParam := par1, vl_gainedParam2 := par1) sender vl_myPeer2; + portname2_PT.getreply( S_ProvedureSignatureID6:{?} ) from vl_myPeer -> param (vl_myPeer := par1) sender vl_myPeer2; + portname2_PT.getreply( S_ProvedureSignatureID5:{?} ) from vl_myPeer -> param (vl_gainedParam := par1) sender vl_myPeer2; + any port.getreply( templateInstance ) from myVar; +} + +function f_checkgetreplyPortTests(reply_PT pl_port_par)runs on componentName_CT{ + any port.check(getreply); + + replyport_PT.check(getreply); + replyport_PT.check(getreply( S_ProvedureSignatureID3:{?} ) from myVar -> param (akarmi) sender myPeer); + pl_port_par.check(getreply); + + any port.check(getreply -> param (akarmi)); + any port.check(getreply -> value akarmi); + any port.check(getreply( S_ProvedureSignatureID:{?} )); + any port.check(getreply( S_ProvedureSignatureID4:{?} value S_ProvedureSignatureID4:{?} )); + portname_PT.check(getreply); + portname_PT.check(getreply( S_ProvedureSignatureID:{?} )); + portname2_PT.check(getreply); + portname2_PT.check(getreply( S_ProvedureSignatureID:{?} )); + portnameOut2_PT.check(getreply); + replyport_PT.check(getreply( S_ProvedureSignatureID:{?} )); + replyport_PT.check(getreply( charstring:* )); + replyport_PT.check(getreply from myVar -> param (akarmi) sender myPeer); + any port.check(getreply( templateInstance ) from myVar); +} + +function f_checkPortTests(reply_PT pl_port_par)runs on componentName_CT{ + any port.check; + + replyport_PT.check; + replyport_PT.check( from myVar -> sender myPeer); + pl_port_par.check; + + portnameOut_PT.check; +} + +function f_catchPortTests(reply_PT pl_port_par2)runs on componentName_CT{ + any port.catch; + + replyport_PT.catch; + replyport_PT.catch from myVar -> sender myPeer; + replyport_PT.catch( S_ProvedureSignatureID3, integer:* ) from myVar -> value akarmi sender myPeer; + replyport_PT.catch( S_ProvedureSignatureID3, charstring:* ); + pl_port_par2.catch; + + any port.catch(timeout); + portname_PT.catch(timeout); + portnameIn2_PT.catch(timeout); + replyport_PT.catch(timeout) from myVar -> value akarmi sender myPeer; + + any port.catch from myVar -> value akarmi sender myPeer; + any port.catch( S_ProvedureSignatureID3, integer:* ) from myVar -> value akarmi sender myPeer; + portname_PT.catch; + portnameIn2_PT.catch; + portname_PT.catch( S_ProvedureSignatureID3, integer:* ); + portnameIn2_PT.catch( S_ProvedureSignatureID3, integer:* ); + portname2_PT.catch( S_ProvedureSignatureID2, integer:* ); + portnameOut3_PT.catch; + portnameOut3_PT.catch( S_ProvedureSignatureID2, integer:* ); + replyport_PT.catch( S_ProvedureSignatureID3, boolean:* ); + replyport_PT.catch( S_ProvedureSignatureID3, S_ProvedureSignatureID3:* ); + replyport_PT.catch( S_ProvedureSignatureID3, reply_PT:* ); + replyport_PT.catch( S_ProvedureSignatureID3, default:* ); + replyport_PT.catch from myVar -> value akarmi sender myPeer; +} + +signature callTest_MyProc(in integer Par1,inout charstring Par2,out float Par3) +return boolean +exception(integer); + +signature s_t_callTest_StopPTC(); +signature s_callTest_incoming(); +signature s_callTest_extra(); +signature s_callTest_nonblocking() noblock; + +template s_t_callTest_StopPTC t_callTest_StopPTC := { } + +template callTest_MyProc t_callTest_MyProcTemplate:= { + Par1:=44, + Par2:="Q", + Par3:=324.664 +} + +type port callTest_ProcPort1 procedure +{ + inout callTest_MyProc,s_t_callTest_StopPTC, s_callTest_nonblocking; + in s_callTest_incoming; +} with {extension "internal"} +type port callTest_ProcPort2 procedure +{ + in s_callTest_incoming; +} with {extension "internal"} +type port callTest_MessagePort1 message +{ + inout integer; +} with {extension "internal"} + +type component callTest_ProcComponent +{ + port callTest_ProcPort1 Port0_PT; + port callTest_ProcPort2 Port2_PT; + port callTest_MessagePort1 Port1_PT; +} + +function f_callTests( ) runs on callTest_ProcComponent +{ + var boolean vl_b:=false; + Port0_PT.call(t_callTest_MyProcTemplate,nowait); + alt { + []Port0_PT.getreply(t_callTest_MyProcTemplate) -> value vl_b { + } + } + Port0_PT.call(t_callTest_StopPTC,0.5) { + []Port0_PT.getreply(t_callTest_StopPTC) { } + []Port0_PT.catch(timeout) { } + } + + nonExi.call(t_callTest_MyProcTemplate,nowait); + Port1_PT.call(t_callTest_MyProcTemplate,nowait); + Port0_PT.call(nonExi,nowait); + Port0_PT.call(s_callTest_extra : {},nowait); + Port0_PT.call(integer : 5,nowait); + Port2_PT.call(t_callTest_MyProcTemplate,nowait); + nonExi.call(s_callTest_extra : {},nowait); + Port0_PT.call(s_callTest_nonblocking : {},5.0); + Port0_PT.call(s_callTest_nonblocking : {},nowait); + Port0_PT.call(s_callTest_nonblocking : {}) { + []Port0_PT.catch(timeout) { } + } + Port0_PT.call(t_callTest_MyProcTemplate,nowait) { + []Port0.getreply(t_callTest_MyProcTemplate) { } + } + Port0_PT.call(t_callTest_MyProcTemplate); + Port0_PT.call(t_callTest_MyProcTemplate, 5) { + []Port0_PT.catch(timeout) { } + } + Port0_PT.call(t_callTest_MyProcTemplate, -5.0) { + []Port0_PT.catch(timeout) { } + } + Port0_PT.call(t_callTest_MyProcTemplate,nowait) to nonExi; + Port0_PT.call(t_callTest_MyProcTemplate,nowait) to vl_b; + Port0_PT.call(t_callTest_MyProcTemplate, 5.0) { + []Port0_PT.getreply(t_callTest_MyProcTemplate) { } + []Port2_PT.getreply(t_callTest_MyProcTemplate) { } + []any port.getreply(t_callTest_MyProcTemplate) { } + []Port0_PT.getreply(t_callTest_StopPTC) { } + []Port0_PT.catch(callTest_MyProc, integer : 5) { } + []Port2_PT.catch(callTest_MyProc, integer : 5) { } + []any port.catch(callTest_MyProc, integer : 5) { } + []Port0_PT.catch(s_t_callTest_StopPTC, integer : 5) { } + } +} + +testcase tc_testcaseName( ) +runs on componentName_CT +system componentName_CT +{ + { execute(tc_testcaseName(), 5.0);} +} + +altstep as_altstepName() +runs on componentName_CT +{ + timer TL_timerName; + [] TL_timerName.timeout + { + { return;} + + { execute(tc_testcaseName(), 5.0);} + { return akarmi;} + } + [else] + { + + } +} + + +function f_executeTests(){ + { execute(tc_testcaseName(), 5.0);} + + { execute(tc_testcaseName(), -5.0);} + { execute(tc_testcaseName(), 5);} + { execute(tc_testcaseName2(), 5.0);} + { execute(f_catchPortTests(), 5.0);} + { execute(tc_testcaseName(), infinity);} + { execute(tc_testcaseName(), -infinity);} + { return akarmi;} +} + +function f_executedereferedTests(){ + var t_testcase vl_akarmi; + var t_altstep vl_akarmi2; + + { execute(derefers( vl_akarmi ) ( parameters ), 5.0);} + + { execute(derefers( vl_akarmi ) ( parameters ), -5.0);} + { execute(derefers( vl_akarmi ) ( parameters ), 5);} + { execute(derefers( akarmi3 ) ( parameters ), -5.0);} + { execute(derefers( vl_akarmi2 ) ( parameters ), -5.0);} + { execute(derefers( vl_akarmi ) ( parameters ), infinity);} + { execute(derefers( vl_akarmi ) ( parameters ), -infinity);} +} + +function f_functionwith_return() +return integer +{ + { return 5;} + + { return;} + { return *;} + { return "akarmi";} +} + +function f_functionwith_returntemplate() +return template integer +{ + { return 5;} + { return *;} + + { return; } + { return "akarmi";} +} + +external function ef_f_externalfunction(); +external function ef_f_externalfunctionwith_return() return integer; +external function ef_f_externalfunctionwith_returntemplate() return template integer; + +function f_function_altstep_instanceTests(){ + f_executeTests(); + as_altstepName(); + ef_f_externalfunction(); + + f_functionwith_return(); + f_functionwith_returntemplate(); + ef_f_externalfunctionwith_return(); + ef_f_externalfunctionwith_returntemplate(); + + timer TL_timerName; + TL_timerName(); +} + +function f_activateTest() runs on componentName_CT2 { + var integer vl_parameter := 1; + activate(as_altstepName(vl_parameter)); + + activate(nonExi()); + activate(vl_parameter()); + activate(as_altstepName()); + activate(as_altstepName(1)); + activate(as_altstepName(1, 1)); +} + +function f_activateTests2() { + var integer vl_parameter := 1; + var t_altstep2 vl_altstep1; + activate(as_altstepName(vl_parameter)); +} + +function f_activate_referredTests() runs on componentName_CT2 { + var integer vl_parameter := 1; + var t_altstep2 vl_altstep1; + var t_altstep3 vl_altstep3; + activate(derefers(vl_altstep1)(vl_parameter)); + + activate(derefers(nonExi)(vl_parameter)); + activate(derefers(parameter)(vl_parameter)); + activate(derefers(vl_altstep1)()); + activate(derefers(vl_altstep1)(1)); + activate(derefers(vl_altstep1)(1, 1)); + activate(derefers(vl_altstep3)(vl_parameter)); +} + +function f_deactivateTest(){ + var default vl_akarmi; + + deactivate(vl_akarmi); + // add more checks as they are implemented +} + +function f_applyTests(){ + var t_function vl_functionVar; + var t_altstep vl_altstepVar; + + vl_functionVar.apply(); + vl_altstepVar.apply(); + + //add more checks as they are implemented +} + +function f_interleaveTests() runs on componentName_CT +{ +interleave +{ + [] portname_PT.receive(1) + { + label akarmi + repeat; + continue; + return; + goto akarmi + as_altstepName(); + } +}; +} + +function f_returnTest1() return integer { + return 5; + return "akarmi"; +} +function f_returnTest2() return integer { + var integer vl_var1; + //no return + if (vl_var1 == 0) { + return 5; + } else if (vl_var1 == 1) { + } else { + } +} +function f_returnTest3() return integer { + var integer vl_var1; + //no return + if (vl_var1 == 0) { + } else if (vl_var1 == 1) { + } else { + } + //almost return + if (vl_var1 == 0) { + } else if (vl_ar1 == 1) { + } else { + return 5; + } + if (vl_var1 == 0) { + } else if (vl_var1 == 1) { + return 5; + } else { + } + if (vl_var1 == 0) { + return 5; + } else if (vl_var1 == 1) { + } else { + } + if (vl_var1 == 0) { + return 5; + } else if (vl_var1 == 1) { + } else { + return 5; + } + if (vl_var1 == 0) { + return 5; + } else if (vl_var1 == 1) { + return 5; + } else { + } + if (vl_var1 == 0) { + } else if (vl_var1 == 1) { + return 5; + } else { + return 5; + } + // all return + if (vl_var1 == 0) { + return 5; + } else if (vl_var1 == 1) { + return 5; + } else { + return 5; + } +} + +function f_returnTest4() return integer { + var integer vl_var1; + select (vl_var1) { + case (1) {} + case (2) {} + case else {} + } +} + +function f_returnTest5() return integer { + var integer vl_var1; + select (vl_var1) { + case (1) {return 5;} + case (2) {} + case else {} + } +} + +function f_returnTest6() return integer { + var integer vl_var1; + select (vl_var1) { + case (1) {} + case (2) {return 5;} + case else {} + } +} + +function f_returnTest7() return integer { + var integer vl_var1; + select (vl_var1) { + case (1) {} + case (2) {} + case else {return 5;} + } +} + +function f_returnTest8() return integer { + var integer vl_var1; + select (vl_var1) { + case (1) {} + case (2) {return 5;} + case else {return 5;} + } +} + +function f_returnTest9() return integer { + var integer vl_var1; + select (vl_var1) { + case (1) {return 5;} + case (2) {} + case else {return 5;} + } +} + +function f_returnTest10() return integer { + var integer vl_var1; + select (vl_var1) { + case (1) {return 5;} + case (2) {return 5;} + case else {} + } +} + +function f_returnTest11() return integer { + var integer vl_var1; + select (vl_var1) { + case (1) {return 5;} + case (2) {return 5;} + case else {return 5;} + } +} + +control{ + { execute(tc_testcaseName(), 5.0);} + + { setverdict ( pass ); } + { map(akarmi:barmi, akarmi:barmi); } + { unmap(akarmi:barmi, akarmi:barmi); } + { connect(akarmi:barmi, akarmi:barmi); } + { disconnect(akarmi:barmi, akarmi:barmi); } + { all port.clear;} + { akarmi.clear;} + { akarmi.halt;} + { akarmi.trigger;} +/* { akarmi.start;} + { akarmi.stop;}*/ + { execute(tc_testcaseName(), -5.0);} + { execute(tc_testcaseName2(), 5.0);} + { execute(f_catchPortTests(), 5.0);} + { return;} + { return akarmi;} +} + +} // end of module diff --git a/Semantic_Analizer_Tests/src/Basic_tests/subtype_tests.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/subtype_tests.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..df40dd4b0bd8a9757b9118709af83a5f812c9f27 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/subtype_tests.ttcn @@ -0,0 +1,1127 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module subtype_tests +{ +// boolean sub-typing tests +function f_booleanFunction() return boolean +{ + return true; +} + +type boolean GoodBool1 (true,false); +type boolean GoodBool2 (true); + +type boolean FaultyBool1 (false..true); +type boolean Bool; +type Bool FaultyBool2 (false..true); +type boolean FaultyBool3 (true..true); +type boolean FaultyBool4 (true..false); +type boolean FaultyBool5 (f_booleanFunction()); + +type boolean FaultyBool6 length(1); +type boolean Bool2; +type Bool FaultyBool7 length(2 .. 3); +type Bool FaultyBool8 length(3 .. 2); +type Bool FaultyBool9 length(-4 .. -3); +type Bool FaultyBool10 length(4444444444444444444 .. 88888888888888888888888); +type Bool FaultyBool11 (-infinity .. infinity); + +type boolean FaultyBool12 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +function f_functionName() +{ +const GoodBool2 cl_bool1 := true; +const GoodBool2 cl_bool2 := false; +const GoodBool2 cl_bool3 := not true; +const GoodBool2 cl_bool4 := true and false; +const GoodBool2 cl_bool5 := false or false; +const GoodBool2 cl_bool6 := false xor false; +const GoodBool2 cl_bool7 := true == false; +const GoodBool2 cl_bool8 := false != false; +const GoodBool2 cl_bool9 := 5 < 5; +const GoodBool2 cl_bool10 := 5 > 5; +const GoodBool2 cl_bool11 := 6 <= 5; +const GoodBool2 cl_bool12 := 4 >= 5; + +template GoodBool2 t_bool1 := true; +template GoodBool2 t_bool2 := false; +template GoodBool2 t_bool3 := not true; +template GoodBool2 t_bool4 := true and false; +template GoodBool2 t_bool5 := false or false; +template GoodBool2 t_bool6 := false xor false; +template GoodBool2 t_bool7 := true == false; +template GoodBool2 t_bool8 := false != false; +template GoodBool2 t_bool9 := 5 < 5; +template GoodBool2 t_bool10 := 5 > 5; +template GoodBool2 t_bool11 := 6 <= 5; +template GoodBool2 t_bool12 := 4 >= 5; +} + +// integer sub-typing tests +type integer GoodInt1 (-4,-3,-2,-1,0,1,2,3,4); +type integer GoodInt2 (-4 .. 4, 6 .. 8); +type integer GoodInt3 (4 .. 4); +type integer Int; +type Int GoodInt4 (-infinity .. infinity); + +type integer FaultyInt1 (4,4); +type integer FaultyInt2 (4 .. -4); +type integer FaultyInt3 (-4 .. 4, 2 .. 6); + +type integer FaultyInt4 ( float2int(rnd()) .. 255 ); +type integer FaultyInt5 ( float2int(rnd()), 255 ); +type integer FaultyInt6 (-infinity .. infinity); +type integer FaultyInt7 (infinity .. -infinity); + +type integer FaultyInt8 length(10); +type Int FaultyInt9 length(4 .. 8); +type integer FaultyInt10 length(8 .. 4); +type integer FaultyInt11 length(-4 .. -3); +type integer FaultyInt12 length(4444444444444444444 .. 88888888888888888888888); +type integer Faultyint13 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodInt1 cg_int1 := 1; +const GoodInt1 cg_int2 := 10; +const GoodInt3 cg_int3 := +1; +const GoodInt3 cg_int4 := -1; +const GoodInt3 cg_int5 := 1*1; +const GoodInt3 cg_int6 := 1+0; +const GoodInt3 cg_int7 := 1-1; +const GoodInt3 cg_int8 := 1/1; +const GoodInt3 cg_int9 := 5 mod 5; +const GoodInt3 cg_int10 := 5 rem 5; +const GoodInt3 cg_int11 := bit2int('00'B); +const GoodInt3 cg_int12 := char2int("0"); +const GoodInt3 cg_int13 := float2int(1.0); +const GoodInt3 cg_int14 := hex2int('00'H); +const GoodInt3 cg_int15 := oct2int('01'O); +const GoodInt3 cg_int16 := str2int("0"); +const GoodInt3 cg_int17 := unichar2int(char(0,0,0,40)); +const GoodInt3 cg_int18 := unichar2int(char(1,0,0,40)); +const GoodInt3 cg_int19 := __LINE__; + +template GoodInt1 t_int1 := 1; +template GoodInt1 t_int2 := 10; +template GoodInt3 t_int3 := +1; +template GoodInt3 t_int4 := -1; +template GoodInt3 t_int5 := 1*1; +template GoodInt3 t_int6 := 1+0; +template GoodInt3 t_int7 := 1-1; +template GoodInt3 t_int8 := 1/1; +template GoodInt3 t_int9 := 5 mod 5; +template GoodInt3 t_int10 := 5 rem 5; +template GoodInt3 t_int11 := bit2int('00'B); +template GoodInt3 t_int12 := char2int("0"); +template GoodInt3 t_int13 := float2int(1.0); +template GoodInt3 t_int14 := hex2int('00'H); +template GoodInt3 t_int15 := oct2int('01'O); +template GoodInt3 t_int16 := str2int("0"); +template GoodInt3 t_int17 := unichar2int(char(0,0,0,40)); +template GoodInt3 t_int18 := unichar2int(char(1,0,0,40)); +template GoodInt3 t_int19 := __LINE__; + + +// float sub-typing tests +type float GoodFloat1 (-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0); +type float GoodFloat2 (-4.0 .. 4.0, 6.0 .. 8.0); +type float GoodFloat3 (4.0 .. 4.0); + +type float FaultyFloat1 (4.0,4.0); +type float FaultyFloat2 (4.0 .. -4.0); +type float FaultyFloat3 (-4.0 .. 4.0, 2.0 .. 6.0); + +type float FaultyFloat4 ( rnd() .. 255.0 ); +type float FaultyFloat5 ( rnd(), 255.0 ); +type float FaultyFloat6 (-infinity .. infinity); +type float FaultyFloat7 (infinity .. -infinity); + +type float FaultyFloat8 length(10); +type float Float; +type Float FaultyFloat9 length(4 .. 8); +type float FaultyFloat10 length(8 .. 4); +type float FaultyFloat11 length(-4 .. -3); +type float FaultyFloat12 length(4444444444444444444 .. 88888888888888888888888); +type float FaultyFloat13 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodFloat1 cg_float1 := 1.0; +const GoodFloat1 cg_float2 := 10.0; +const GoodFloat3 cg_float3 := + 1.0; +const GoodFloat3 cg_float4 := -1.0; +const GoodFloat3 cg_float5 := 1.0*1.0; +const GoodFloat3 cg_float6 := 1.0+0.0; +const GoodFloat3 cg_float7 := 1.0-1.0; +const GoodFloat3 cg_float8 := 1.0/1.0; +const GoodFloat3 cg_float9 := int2float(1); +const GoodFloat3 cg_float10 := str2float("00"); + +template GoodFloat1 t_float1 := 1.0; +template GoodFloat1 t_float2 := 10.0; +template GoodFloat3 t_float3 := + 1.0; +template GoodFloat3 t_float4 := -1.0; +template GoodFloat3 t_float5 := 1.0*1.0; +template GoodFloat3 t_float6 := 1.0+0.0; +template GoodFloat3 t_float7 := 1.0-1.0; +template GoodFloat3 t_float8 := 1.0/1.0; +template GoodFloat3 t_float9 := int2float(1); +template GoodFloat3 t_float10 := str2float("00"); + + +// bitstring sub-typing tests +function f_bitstringFunction() return bitstring +{ + return '00'B; +} + +type bitstring GoodBitstring1 ('00'B, '01'B, '10'B, '11'B); + +type bitstring GoodBitstring2 length(10); +type bitstring Bitstring; +type Bitstring GoodBitstring3 length(4 .. 8); + +type bitstring FaultyBitstring1 ('00'B, '00'B); +type bitstring FaultyBitstring2 ('00'B .. '11'B); +type bitstring FaultyBitstring3 ( f_bitstringFunction(), '00'B ); +type bitstring FaultyBitstring4 (-infinity .. infinity); +type bitstring FaultyBitstring5 length(8 .. 4); +type bitstring FaultyBitstring6 length(-4 .. -3); +type bitstring FaultyBitstring7 length(4444444444444444444 .. 88888888888888888888888); + +type bitstring FaultyBitstring8 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodBitstring1 cg_bitstring1 := '00'B; +const GoodBitstring1 cg_bitstring2 := '111'B; +const GoodBitstring2 cg_bitstring3 := '111'B; +const GoodBitstring1 cg_bitstring4 := not4b '000'B; +const GoodBitstring1 cg_bitstring5 := '000'B and4b '000'B; +const GoodBitstring1 cg_bitstring6 := '000'B or4b '000'B; +const GoodBitstring1 cg_bitstring7 := '000'B xor4b '000'B; +const GoodBitstring1 cg_bitstring8 := '00000'B << 1; +const GoodBitstring1 cg_bitstring9 := '00000'B >> 1; +const GoodBitstring1 cg_bitstring10 := '00000'B <@ 1; +const GoodBitstring1 cg_bitstring11 := '00000'B @> 1; +const GoodBitstring1 cg_bitstring12 := substr('00000'B, 1, 1); +const GoodBitstring1 cg_bitstring13 := '000'B & '000'B; +const GoodBitstring1 cg_bitstring14 := hex2bit('00000'H); +const GoodBitstring1 cg_bitstring15 := oct2bit('000000'O); +const GoodBitstring1 cg_bitstring16 := str2bit("000000"); +const GoodBitstring1 cg_bitstring17 := int2bit(0,1); +const GoodBitstring1 cg_bitstring18 := replace('000000'B, 1, 1, '0'B); + +template GoodBitstring1 t_bitstring1 := '00'B; +template GoodBitstring1 t_bitstring2 := '111'B; +template GoodBitstring2 t_bitstring3 := '111'B; +template GoodBitstring1 t_bitstring4 := not4b '000'B; +template GoodBitstring1 t_bitstring5 := '000'B and4b '000'B; +template GoodBitstring1 t_bitstring6 := '000'B or4b '000'B; +template GoodBitstring1 t_bitstring7 := '000'B xor4b '000'B; +template GoodBitstring1 t_bitstring8 := '00000'B << 1; +template GoodBitstring1 t_bitstring9 := '00000'B >> 1; +template GoodBitstring1 t_bitstring10 := '00000'B <@ 1; +template GoodBitstring1 t_bitstring11 := '00000'B @> 1; +template GoodBitstring1 t_bitstring12 := substr('00000'B, 1, 1); +template GoodBitstring1 t_bitstring13 := '000'B & '000'B; +template GoodBitstring1 t_bitstring14 := hex2bit('00000'H); +template GoodBitstring1 t_bitstring15 := oct2bit('000000'O); +template GoodBitstring1 t_bitstring16 := str2bit("000000"); +template GoodBitstring1 t_bitstring17 := int2bit(0,1); +template GoodBitstring1 t_bitstring18 := replace('000000'B, 1, 1, '0'B); + + +// hexstring sub-typing tests +function f_hexstringFunction() return hexstring +{ + return '00'H; +} + +type hexstring GoodHexstring1 ('00'H, '01'H, '10'H, '11'H); + +type hexstring GoodHexstring2 length(10); +type hexstring Hexstring; +type Hexstring GoodHexstring3 length(4 .. 8); + +type hexstring FaultyHexstring1 ('00'H, '00'H); +type hexstring FaultyHexstring2 ('00'H .. '11'H); +type hexstring FaultyHexstring3 ( f_hexstringFunction(), '00'H ); +type hexstring FaultyHexstring4 (-infinity .. infinity); +type hexstring FaultyHexstring5 length(8 .. 4); +type hexstring FaultyHexstring6 length(-4 .. -3); +type hexstring FaultyHexstring7 length(4444444444444444444 .. 88888888888888888888888); +type hexstring FaultyHexstring8 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodHexstring1 cg_hexstring1 := '00'H; +const GoodHexstring1 cg_hexstring2 := '111'H; +const GoodHexstring2 cg_hexstring3 := '111'H; +const GoodHexstring1 cg_hexstring4 := not4b '000'H; +const GoodHexstring1 cg_hexstring5 := '000'H and4b '000'H; +const GoodHexstring1 cg_hexstring6 := '000'H or4b '000'H; +const GoodHexstring1 cg_hexstring7 := '000'H xor4b '000'H; +const GoodHexstring1 cg_hexstring8 := '00000'H << 1; +const GoodHexstring1 cg_hexstring9 := '00000'H >> 1; +const GoodHexstring1 cg_hexstring10 := '00000'H <@ 1; +const GoodHexstring1 cg_hexstring11 := '00000'H @> 1; +const GoodHexstring1 cg_hexstring12 := substr('00000'H, 1, 1); +const GoodHexstring1 cg_hexstring13 := '000'H & '000'H; +const GoodHexstring1 cg_hexstring14 := bit2hex('0'B); +const GoodHexstring1 cg_hexstring15 := oct2hex('000000'O); +const GoodHexstring1 cg_hexstring16 := str2hex("000000"); +const GoodHexstring1 cg_hexstring17 := int2hex(0,1); +const GoodHexstring1 cg_hexstring18 := replace('000000'H, 1, 1, '0'H); + +template GoodHexstring1 t_hexstring1 := '00'H; +template GoodHexstring1 t_hexstring2 := '111'H; +template GoodHexstring2 t_hexstring3 := '111'H; +template GoodHexstring1 t_hexstring4 := not4b '000'H; +template GoodHexstring1 t_hexstring5 := '000'H and4b '000'H; +template GoodHexstring1 t_hexstring6 := '000'H or4b '000'H; +template GoodHexstring1 t_hexstring7 := '000'H xor4b '000'H; +template GoodHexstring1 t_hexstring8 := '00000'H << 1; +template GoodHexstring1 t_hexstring9 := '00000'H >> 1; +template GoodHexstring1 t_hexstring10 := '00000'H <@ 1; +template GoodHexstring1 t_hexstring11 := '00000'H @> 1; +template GoodHexstring1 t_hexstring12 := substr('00000'H, 1, 1); +template GoodHexstring1 t_hexstring13 := '000'H & '000'H; +template GoodHexstring1 t_hexstring14 := bit2hex('0'B); +template GoodHexstring1 t_hexstring15 := oct2hex('000000'O); +template GoodHexstring1 t_hexstring16 := str2hex("000000"); +template GoodHexstring1 t_hexstring17 := int2hex(0,1); +template GoodHexstring1 t_hexstring18 := replace('000000'H, 1, 1, '0'H); + +// octetstring sub-typing tests +function f_octetstringFunction() return octetstring +{ + return '01'O; +} + +type octetstring GoodOctetstring1 ('00'O, '01'O, '10'O, '11'O); + +type octetstring GoodOctetstring2 length(10); +type octetstring Octetstring; +type Octetstring GoodOctetstring3 length(4 .. 8); + +type octetstring FaultyOctetstring1 ('00'O, '00'O); +type octetstring FaultyOctetstring2 ('00'O .. '11'O); + +type octetstring FaultyOctetstring3 ( f_octetstringFunction(), '01'O ); +type octetstring FaultyOctetstring4 (-infinity .. infinity); +type octetstring FaultyOctetstring5 length(8 .. 4); +type octetstring FaultyOctetstring6 length(-4 .. -3); +type octetstring FaultyOctetstring7 length(4444444444444444444 .. 88888888888888888888888); +type octetstring FaultyOctetstring8 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodOctetstring1 cg_octetstring1 := '00'O; +const GoodOctetstring1 cg_octetstring2 := '1111'O; +const GoodOctetstring2 cg_octetstring3 := '1111'O; +const GoodOctetstring1 cg_octetstring4 := not4b '0000'O; +const GoodOctetstring1 cg_octetstring5 := '0000'O and4b '0000'O; +const GoodOctetstring1 cg_octetstring6 := '0000'O or4b '0000'O; +const GoodOctetstring1 cg_octetstring7 := '0000'O xor4b '0000'O; +const GoodOctetstring1 cg_octetstring8 := '000000'O << 1; +const GoodOctetstring1 cg_octetstring9 := '000000'O >> 1; +const GoodOctetstring1 cg_octetstring10 := '000000'O <@ 1; +const GoodOctetstring1 cg_octetstring11 := '000000'O @> 1; +const GoodOctetstring1 cg_octetstring12 := substr('000000'O, 1, 2); +const GoodOctetstring1 cg_octetstring13 := '0000'O & '0000'O; +const GoodOctetstring1 cg_octetstring14 := bit2oct(''B); +const GoodOctetstring1 cg_octetstring15 := char2oct("0"); +const GoodOctetstring1 cg_octetstring16 := hex2oct(''H); +const GoodOctetstring1 cg_octetstring17 := str2oct("000000"); +const GoodOctetstring1 cg_octetstring18 := int2oct(0,1); +const GoodOctetstring1 cg_octetstring19 := replace('000000'O, 1, 1, '01'O); + +template GoodOctetstring1 t_octetstring1 := '00'O; +template GoodOctetstring1 t_octetstring2 := '1111'O; +template GoodOctetstring2 t_octetstring3 := '1111'O; +template GoodOctetstring1 t_octetstring4 := not4b '0000'O; +template GoodOctetstring1 t_octetstring5 := '0000'O and4b '0000'O; +template GoodOctetstring1 t_octetstring6 := '0000'O or4b '0000'O; +template GoodOctetstring1 t_octetstring7 := '0000'O xor4b '0000'O; +template GoodOctetstring1 t_octetstring8 := '000000'O << 1; +template GoodOctetstring1 t_octetstring9 := '000000'O >> 1; +template GoodOctetstring1 t_octetstring10 := '000000'O <@ 1; +template GoodOctetstring1 t_octetstring11 := '000000'O @> 1; +template GoodOctetstring1 t_octetstring12 := substr('000000'O, 1, 2); +template GoodOctetstring1 t_octetstring13 := '0000'O & '0000'O; +template GoodOctetstring1 t_octetstring14 := bit2oct(''B); +template GoodOctetstring1 t_octetstring15 := char2oct("0"); +template GoodOctetstring1 t_octetstring16 := hex2oct(''H); +template GoodOctetstring1 t_octetstring17 := str2oct("000000"); +template GoodOctetstring1 t_octetstring18 := int2oct(0,1); +template GoodOctetstring1 t_octetstring19 := replace('000000'O, 1, 1, '01'O); + + +// charstring sub-typing tests +function f_charstringFunction() return charstring +{ + return "something"; +} + +type charstring GoodCharstring1 ("a", "b", "c", "d", "something"); + +type charstring GoodCharstring2 ("a" .. "k"); +type charstring GoodCharstring3 ("a" .. "a"); +type charstring GoodCharstring4 ("aa" .. "zz"); + +type charstring GoodCharstring5 length(10); +type charstring Charstring; +type Charstring GoodCharstring6 length(4 .. 8); + +type charstring FaultyCharstring1 ("a", "a"); +type charstring FaultyCharstring2 ("z" .. "a"); + +type charstring FaultyCharstring3 ( f_charstringFunction(), "" ); +type charstring FaultyCharstring4 (-infinity .. infinity); +type charstring FaultyCharstring5 length(8 .. 4); +type charstring FaultyCharstring6 length(-4 .. -3); +type charstring FaultyCharstring7 length(4444444444444444444 .. 88888888888888888888888); +type charstring FaultyCharstring8 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodCharstring1 cg_charstring1 := "something"; +const GoodCharstring1 cg_charstring2 := "error"; +const GoodCharstring2 cg_charstring3 := "z"; +const GoodCharstring1 cg_charstring12 := substr("akarmi", 1, 3); +const GoodCharstring1 cg_charstring13 := "ab" & "c"; +const GoodCharstring1 cg_charstring14 := bit2str(''B); +const GoodCharstring1 cg_charstring15 := float2str(5.5); +const GoodCharstring1 cg_charstring16 := oct2char('01'O); +const GoodCharstring1 cg_charstring17 := oct2str('01'O); +const GoodCharstring1 cg_charstring18 := hex2str(''H); +const GoodCharstring1 cg_charstring20 := int2char(5); +const GoodCharstring1 cg_charstring21 := int2str(5); +const GoodCharstring1 cg_charstring22 := replace("akarmi", 1, 1, "cbe"); +const GoodCharstring1 cg_charstring23 := unichar2char(char(0,0,0,40)); +const GoodCharstring1 cg_charstring24 := %moduleId; +const GoodCharstring1 cg_charstring25 := %fileName; +const GoodCharstring1 cg_charstring26 := __BFILE__; +const GoodCharstring1 cg_charstring27 := %lineNumber; +const GoodCharstring1 cg_charstring28 := __SCOPE__; +const GoodCharstring1 cg_charstring29 := %definitionId; +function f_charstringconstsubFunction() +{ +const GoodCharstring1 cl_charstring30 := %definitionId; +} + + +template GoodCharstring1 t_charstring1 := "something"; +template GoodCharstring1 t_charstring2 := "error"; +template GoodCharstring2 t_charstring3 := "z"; +template GoodCharstring1 t_charstring12 := substr("akarmi", 1, 3); +template GoodCharstring1 t_charstring13 := "ab" & "c"; +template GoodCharstring1 t_charstring14 := bit2str(''B); +template GoodCharstring1 t_charstring15 := float2str(5.5); +template GoodCharstring1 t_charstring16 := oct2char('01'O); +template GoodCharstring1 t_charstring17 := oct2str('01'O); +template GoodCharstring1 t_charstring18 := hex2str(''H); +template GoodCharstring1 t_charstring20 := int2char(5); +template GoodCharstring1 t_charstring21 := int2str(5); +template GoodCharstring1 t_charstring22 := replace("akarmi", 1, 1, "cbe"); +template GoodCharstring1 t_charstring23 := unichar2char(char(0,0,0,40)); +template GoodCharstring1 t_charstring24 := %moduleId; +template GoodCharstring1 t_charstring25 := %fileName; +template GoodCharstring1 t_charstring26 := __BFILE__; +template GoodCharstring1 t_charstring27 := %lineNumber; +template GoodCharstring1 t_charstring28 := __SCOPE__; + +// universal charstring sub-typing tests +function f_universalcharstringFunction() return universal charstring +{ + return "something"; +} + +type universal charstring GoodUniversalCharstring1 ("a", "b", "c", "d", "something", char(0,0,0,110)); + +type universal charstring GoodUniversalCharstring2 ("a" .. "k"); +type universal charstring GoodUniversalCharstring3 ("a" .. "a"); +type universal charstring GoodUniversalCharstring4 (char(0,0,0,100) .. char(0,0,0,100)); +type universal charstring GoodUniversalCharstring5 (char(0,0,0,100) .. char(1,0,0,100)); +type universal charstring GoodUniversalCharstring6 (char(0,0,0,100) .. char(0,1,0,100)); +type universal charstring GoodUniversalCharstring7 (char(0,0,0,100) .. char(0,0,1,100)); + +type universal charstring GoodUniversalCharstring8 length(10); +type universal charstring UniversalCharstring; +type UniversalCharstring GoodUniversalCharstring9 length(4 .. 8); + +type universal charstring FaultyUniversalCharstring1 ("a", "a"); +type universal charstring FaultyUniversalCharstring2 ("z" .. "a"); +type universal charstring FaultyUniversalCharstring3 ("aa" .. "zz"); +type universal charstring FaultyUniversalCharstring4 (char(1,0,0,0) .. char(0,0,0,0)); +type universal charstring FaultyUniversalCharstring5 (char(0,1,0,0) .. char(0,0,0,0)); +type universal charstring FaultyUniversalCharstring6 (char(0,0,1,0) .. char(0,0,0,0)); +type universal charstring FaultyUniversalCharstring7 (char(0,0,0,1) .. char(0,0,0,0)); +type universal charstring FaultyUniversalCharstring7 (char(0,0,0,0) & char(0,0,0,0) .. char(0,0,0,0)); +type universal charstring FaultyUniversalCharstring7 (char(0,0,0,0) .. char(0,0,0,0) & char(0,0,0,0)); +type universal charstring FaultyUniversalCharstring4 (char(1,0,0,0) & char(0,0,0,0) .. char(0,0,0,0) & char(0,0,0,0)); +type universal charstring FaultyUniversalCharstring5 (char(0,1,0,0) & char(0,0,0,0) .. char(0,0,0,0) & char(0,0,0,0)); +type universal charstring FaultyUniversalCharstring6 (char(0,0,1,0) & char(0,0,0,0) .. char(0,0,0,0) & char(0,0,0,0)); +type universal charstring FaultyUniversalCharstring7 (char(0,0,0,1) & char(0,0,0,0) .. char(0,0,0,0) & char(0,0,0,0)); +const universal charstring cg_universalChar := char(0,0,0,0); +type universal charstring FaultyUniversalCharstring9 (cg_universalChar .. cg_universalChar); + +type universal charstring FaultyUniversalCharstring10 ( f_universalcharstringFunction(), char(50,0,0,0) ); +type universal charstring FaultyUniversalCharstring11 (-infinity .. infinity); +type universal charstring FaultyUniversalCharstring12 length(8 .. 4); +type universal charstring FaultyUniversalCharstring13 length(-4 .. -3); +type universal charstring FaultyUniversalCharstring14 length(4444444444444444444 .. 88888888888888888888888); +type universal charstring FaultyUniversalCharstring15 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodUniversalCharstring1 cg_universalcharstring1 := "something"; +const GoodUniversalCharstring1 cg_universalcharstring2 := "error"; +const GoodUniversalCharstring2 cg_universalcharstring3 := "z"; +const GoodUniversalCharstring1 cg_universalcharstring12 := substr("akarmi", 1, 3); +const GoodUniversalCharstring1 cg_universalcharstring13 := "ab" & "c"; +const GoodUniversalCharstring1 cg_universalcharstring14 := bit2str(''B); +const GoodUniversalCharstring1 cg_universalcharstring15 := float2str(5.5); +const GoodUniversalCharstring1 cg_universalcharstring16 := oct2char('01'O); +const GoodUniversalCharstring1 cg_universalcharstring17 := oct2str('01'O); +const GoodUniversalCharstring1 cg_universalcharstring18 := hex2str(''H); +const GoodUniversalCharstring1 cg_universalcharstring19 := int2char(5); +const GoodUniversalCharstring1 cg_universalcharstring20 := int2unichar(5); +const GoodUniversalCharstring1 cg_universalcharstring21 := int2str(5); +const GoodUniversalCharstring1 cg_universalcharstring22 := replace("akarmi", 1, 1, "cbe"); +const GoodUniversalCharstring1 cg_universalcharstring23 := unichar2char(char(0,0,0,40)); +const GoodUniversalCharstring1 cg_universalcharstring24 := %moduleId; +const GoodUniversalCharstring1 cg_universalcharstring25 := %fileName; +const GoodUniversalCharstring1 cg_universalcharstring26 := __BFILE__; +const GoodUniversalCharstring1 cg_universalcharstring27 := %lineNumber; +const GoodUniversalCharstring1 cg_universalcharstring28 := __SCOPE__; +const GoodUniversalCharstring1 cg_universalcharstring29 := %definitionId; +function f_universalcharstringconstsubFunction() +{ +const GoodUniversalCharstring1 cl_universalcharstring30 := %definitionId; +} + +template GoodUniversalCharstring1 t_universalcharstring1 := "something"; +template GoodUniversalCharstring1 t_universalcharstring2 := "error"; +template GoodUniversalCharstring2 t_universalcharstring3 := "z"; +template GoodUniversalCharstring1 t_universalcharstring12 := substr("akarmi", 1, 3); +template GoodUniversalCharstring1 t_universalcharstring13 := "ab" & "c"; +template GoodUniversalCharstring1 t_universalcharstring14 := bit2str(''B); +template GoodUniversalCharstring1 t_universalcharstring15 := float2str(5.5); +template GoodUniversalCharstring1 t_universalcharstring16 := oct2char('01'O); +template GoodUniversalCharstring1 t_universalcharstring17 := oct2str('01'O); +template GoodUniversalCharstring1 t_universalcharstring18 := hex2str(''H); +template GoodUniversalCharstring1 t_universalcharstring19 := int2char(5); +template GoodUniversalCharstring1 t_universalcharstring20 := int2unichar(5); +template GoodUniversalCharstring1 t_universalcharstring21 := int2str(5); +template GoodUniversalCharstring1 t_universalcharstring22 := replace("akarmi", 1, 1, "cbe"); +template GoodUniversalCharstring1 t_universalcharstring23 := unichar2char(char(0,0,0,40)); +template GoodUniversalCharstring1 t_universalcharstring24 := %moduleId; +template GoodUniversalCharstring1 t_universalcharstring25 := %fileName; +template GoodUniversalCharstring1 t_universalcharstring26 := __BFILE__; +template GoodUniversalCharstring1 t_universalcharstring27 := %lineNumber; +template GoodUniversalCharstring1 t_universalcharstring28 := __SCOPE__; + + +// record sub-typing tests +type record recordType +{ + integer field1, + integer field2 +}; + +function f_recordFunction() return recordType +{ + var recordType vl_akarmi := {1,1}; + return vl_akarmi; +} + +type recordType GoodRecord1 ({1,1}, {1,2}, {2,1}, {2,2}); + +type recordType FaultyRecord1 ({1,1}, {1,1}); +type recordType FaultyRecord2 ({1,10} .. {1,1}); +type recordType FaultyRecord3 ({1,1} .. {1,10}); +type recordType FaultyRecord4 ({1,1} .. {1,1}); +type recordType FaultyRecord5 ( f_recordFunction(), {1,1} ); +type recordType FaultyRecord6 (-infinity .. infinity); +type recordType FaultyRecord7 length(10); +type recordType Record; +type Record FaultyRecord8 length(4 .. 8); +type recordType FaultyRecord9 length(8 .. 4); +type recordType FaultyRecord10 length(-4 .. -3); +type recordType FaultyRecord11 length(4444444444444444444 .. 88888888888888888888888); +type recordType FaultyRecord12 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodRecord1 cg_record1 := {1,1}; +const GoodRecord1 cg_record2 := {1,3}; + +template GoodRecord1 t_record1 := {1,1}; +template GoodRecord1 t_record2 := {1,3}; + + +// set sub-typing tests +type set setType +{ + integer field1, + integer field2 +}; + +function f_setFunction() return setType +{ + var setType vl_akarmi := {field1 := 1, field2 := 1}; + return vl_akarmi; +} + +type setType GoodSet1 ({field1 := 1, field2 := 1}, {field1 := 1, field2 := 2} + , {field1 := 2, field2 := 1}, {field1 := 2, field2 := 2}); + +type setType FaultySet1 ({field1 := 1, field2 := 1}, {field1 := 1, field2 := 1}); +type setType FaultySet2 ({field1 := 1, field2 := 10} .. {field1 := 1, field2 := 1}); +type setType FaultySet3 ({field1 := 1, field2 := 1} .. {field1 := 1, field2 := 10}); +type setType FaultySet4 ({field1 := 1, field2 := 1} .. {field1 := 1, field2 := 1}); +type setType FaultySet5 ( f_setFunction(), {field1 := 1, field2 := 1} ); +type setType FaultySet6 (-infinity .. infinity); +type setType FaultySet7 length(10); +type setType Set; +type Set FaultySet8 length(4 .. 8); +type setType FaultySet9 length(8 .. 4); +type setType FaultySet10 length(-4 .. -3); +type setType FaultySet11 length(4444444444444444444 .. 88888888888888888888888); +type setType FaultySet12 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodSet1 cg_set1 := {field1 := 1, field2 := 1}; +const GoodSet1 cg_set2 := {field1 := 1, field2 := 3}; + +template GoodSet1 t_set1 := {field1 := 1, field2 := 1}; +template GoodSet1 t_set2 := {field1 := 1, field2 := 3}; + + +// union sub-typing tests +type union unionType +{ + integer field1, + charstring field2 +}; + +function f_unionFunction() return unionType +{ + var unionType vl_akarmi := {field1 := 1}; + return vl_akarmi; +} + +type unionType GoodUnion1 ({field1 := 1}, {field1 := 2}, {field1 := 3}, {field1 := 4}); + +type unionType FaultyUnion1 ({field1 := 1}, {field1 := 1}); +type unionType FaultyUnion2 ({field1 := 10} .. {field1 := 1}); +type unionType FaultyUnion3 ({field1 := 1} .. {field1 := 10}); +type unionType FaultyUnion4 ({field1 := 1} .. {field1 := 1}); +type unionType FaultyUnion5 ( f_unionFunction(), {field1 := 1} ); +type unionType FaultyUnion6 (-infinity .. infinity); +type unionType FaultyUnion7 length(10); +type unionType Union; +type Union FaultyUnion8 length(4 .. 8); +type unionType FaultyUnion9 length(8 .. 4); +type unionType FaultyUnion10 length(-4 .. -3); +type unionType FaultyUnion11 length(4444444444444444444 .. 88888888888888888888888); +type unionType FaultyUnion12 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodUnion1 cg_union1 := {field1 := 1}; +const GoodUnion1 cg_union2 := {field1 := 10}; + +template GoodUnion1 t_union1 := {field1 := 1}; +template GoodUnion1 t_union2 := {field1 := 10}; + + +// record of sub-typing tests +type record of integer recordofType; + +function f_recordofFunction() return recordofType +{ + var recordofType vl_akarmi := {1 ,2}; + return vl_akarmi; +} + +type recordofType GoodRecordof1 ({1 ,1}, {1 ,2}, {1 ,3}, {1 ,4}, {1 ,5}); + +type recordofType GoodRecordof2 length(10); +type recordofType Recordof; +type Recordof GoodRecordof3 length(4 .. 8); + +type recordofType FaultyRecordof1 ({1 ,1}, {1 ,1}); +type recordofType FaultyRecordof2 ({1 ,10} .. {1 ,1}); +type recordofType FaultyRecordof3 ({1 ,1} .. {1 ,10}); +type recordofType FaultyRecordof4 ({1 ,1} .. {1 ,1}); +type recordofType FaultyRecordof5 ( f_recordofFunction(), {1 ,1} ); +type recordofType FaultyRecordof6 (-infinity .. infinity); +type recordofType FaultyRecordof7 length(8 .. 4); +type recordofType FaultyRecordof8 length(-4 .. -3); +type recordofType FaultyRecordof9 length(4444444444444444444 .. 88888888888888888888888); +type recordofType FaultyRecordof10 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodRecordof1 cg_recordof1 := {1 ,1}; +const GoodRecordof1 cg_recordof2 := {1 ,10}; +const GoodRecordof3 cg_recordof3 := {1 ,1}; + +template GoodRecordof1 t_recordof1 := {1 ,1}; +template GoodRecordof1 t_recordof2 := {1 ,10}; +template GoodRecordof3 t_recordof3 := {1 ,1}; + + +// set of sub-typing tests +type set of integer setofType; + +function f_setofFunction() return setofType +{ + var setofType vl_akarmi := {1 ,2}; + return vl_akarmi; +} + +type setofType GoodSetof1 ({1 ,1}, {1 ,2}, {1 ,3}, {1 ,4}, {1 ,5}); + +type setofType GoodSetof2 length(10); +type setofType Setof; +type Setof GoodSetof3 length(4 .. 8); + +type setofType FaultySetof1 ({1 ,1}, {1 ,1}); +type setofType FaultySetof2 ({1 ,10} .. {1 ,1}); +type setofType FaultySetof3 ({1 ,1} .. {1 ,10}); +type setofType FaultySetof4 ({1 ,1} .. {1 ,1}); +type setofType FaultySetof5 ( f_setofFunction(), {1 ,1} ); +type setofType FaultySetof6 (-infinity .. infinity); +type setofType FaultySetof7 length(8 .. 4); +type setofType FaultySetof8 length(-4 .. -3); +type setofType FaultySetof9 length(4444444444444444444 .. 88888888888888888888888); +type setofType FaultySetof10 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodSetof1 cg_setof1 := {1 ,1}; +const GoodSetof1 cg_setof2 := {1 ,10}; +const GoodSetof3 cg_setof3 := {1 ,1}; + +template GoodSetof1 t_setof1 := {1 ,1}; +template GoodSetof1 t_setof2 := {1 ,10}; +template GoodSetof3 t_setof3 := {1 ,1}; + + +// verdict type sub-typing tests +function f_verdictFunction() return verdicttype +{ + var verdicttype vl_akarmi := error; + return vl_akarmi; +} + +type verdicttype GoodVerdict1 (pass, error, fail); +type verdicttype GoodVerdict2 (none); + +type verdicttype FaultyVerdict1 (pass, pass); +type verdicttype FaultyVerdict2 (error .. pass); +type verdicttype FaultyVerdict3 (pass .. error); +type verdicttype FaultyVerdict4 (pass .. pass); +type verdicttype FaultyVerdict5 ( f_verdictFunction(), pass ); +type verdicttype FaultyVerdict6 (-infinity .. infinity); +type verdicttype FaultyVerdict7 length(10); +type verdicttype Verdict; +type Verdict FaultyVerdict8 length(4 .. 8); +type verdicttype FaultyVerdict9 length(8 .. 4); +type verdicttype FaultyVerdict10 length(-4 .. -3); +type verdicttype FaultyVerdict11 length(4444444444444444444 .. 88888888888888888888888); +type verdicttype FaultyVerdict12 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodVerdict1 cg_verdict1 := pass; +const GoodVerdict1 cg_verdict2 := none; +const GoodVerdict2 cg_verdict3 := pass; +const GoodVerdict2 cg_verdict4 := error; +const GoodVerdict2 cg_verdict5 := fail; +const GoodVerdict2 cg_verdict6 := inconc; +const GoodVerdict2 cg_verdict7 := getverdict; + +template GoodVerdict1 t_verdict1 := pass; +template GoodVerdict1 t_verdict2 := none; +template GoodVerdict2 t_verdict3 := pass; +template GoodVerdict2 t_verdict4 := error; +template GoodVerdict2 t_verdict5 := fail; +template GoodVerdict2 t_verdict6 := inconc; + + +// enum type sub-typing tests +type enumerated enumerationType +{ + item1(1), + item2(2), + item3(3), + item4(4) +}; + +function f_enumFunction() return enumerationType +{ + var enumerationType vl_akarmi := item1; + return vl_akarmi; +} + +type enumerationType GoodEnumeration1 (item1, item2, item3); + +type enumerationType FaultyEnumeration1 (item1, item1); +type enumerationType FaultyEnumeration2 (item3 .. item1); +type enumerationType FaultyEnumeration3 (item1 .. item3); +type enumerationType FaultyEnumerationt4 (item1 .. item1); +type enumerationType FaultyEnumeration5 ( f_enumFunction(), item3 ); +type enumerationType FaultyEnumeration6 (-infinity .. infinity); +type enumerationType FaultyEnumeration7 length(10); +type enumerationType Enumeration; +type Enumeration FaultyEnumeration8 length(4 .. 8); +type enumerationType FaultyEnumeration9 length(8 .. 4); +type enumerationType FaultyEnumeration10 length(-4 .. -3); +type enumerationType FaultyEnumeration11 length(4444444444444444444 .. 88888888888888888888888); +type enumerationType FaultyEnumeration12 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodEnumeration1 cg_enumeration1 := item1; +const GoodEnumeration1 cg_enumeration2 := item10; +const GoodEnumeration1 cg_enumeration3 := item4; + +template GoodEnumeration1 t_enumeration1 := item1; +template GoodEnumeration1 t_enumeration2 := item10; +template GoodEnumeration1 t_enumeration3 := item4; + +// function type sub-typing tests +type function functionType(); + +function f_first() {} +function f_second() {} +function f_third() {} +function f_forth() {} + +function f_functionTypeFunction() return functionType +{ + var functionType vl_akarmi := refers(f_first); + return vl_akarmi; +} + +type functionType GoodFunctionType1 (refers(f_first), refers(f_second), refers(f_third)); + +type functionType FaultyFunctionType1 (refers(f_first), refers(f_first)); +type functionType FaultyFunctionType2 (refers(f_third) .. refers(f_first)); +type functionType FaultyFunctionType3 (refers(f_first) .. refers(f_third)); +type functionType FaultyFunctionType4 (refers(f_first) .. refers(f_first)); +type functionType FaultyFunctionType5 ( f_functionTypeFunction(), refers(f_third) ); +type functionType FaultyFunctionType6 (-infinity .. infinity); +type functionType FaultyFunctionType7 length(10); +type functionType FunctionType; +type FunctionType FaultyFunctionType8 length(4 .. 8); +type functionType FaultyFunctionType9 length(8 .. 4); +type functionType FaultyFunctionType10 length(-4 .. -3); +type functionType FaultyFunctionType11 length(4444444444444444444 .. 88888888888888888888888); +type functionType FaultyFunctionType12 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodFunctionType1 cg_functiontype1 := refers(f_first); +const GoodFunctionType1 cg_functiontype2 := refers(f_forth); + +template GoodFunctionType1 t_functiontype1 := refers(f_first); +template GoodFunctionType1 t_functiontype2 := refers(f_forth); + + +// altstep type sub-typing tests +type altstep altstepType(); + +altstep as_first(){ [else]{} } +altstep as_second(){ [else]{} } +altstep as_third(){ [else]{} } +altstep as_forth(){ [else]{} } + +function f_altstepTypeFunction() return altstepType +{ + var altstepType vl_akarmi := refers(as_first); + return vl_akarmi; +} + +type altstepType GoodAltstepType1 (refers(as_first), refers(as_second), refers(as_third)); + +type altstepType FaultyAltstepType1 (refers(as_first), refers(as_first)); +type altstepType FaultyAltstepType2 (refers(as_third) .. refers(as_first)); +type altstepType FaultyAltstepType3 (refers(as_first) .. refers(as_third)); +type altstepType FaultyAltstepType4 (refers(as_first) .. refers(as_first)); +type altstepType FaultyAltstepType5 ( f_altstepTypeFunction(), refers(as_third) ); +type altstepType FaultyAltstepType6 (-infinity .. infinity); +type altstepType FaultyAltstepType7 length(10); +type altstepType AltstepType; +type AltstepType FaultyAltstepType8 length(4 .. 8); +type altstepType FaultyAltstepType9 length(8 .. 4); +type altstepType FaultyAltstepType10 length(-4 .. -3); +type altstepType FaultyAltstepType11 length(4444444444444444444 .. 88888888888888888888888); +type altstepType FaultyAltstepType12 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodAltstepType1 cg_altsteptype1 := refers(as_first); +const GoodAltstepType1 cg_altsteptype2 := refers(as_forth); + +template GoodAltstepType1 t_altsteptype1 := refers(as_first); +template GoodAltstepType1 t_altsteptype2 := refers(as_forth); + + +// testcase type sub-typing tests +type component Empty_CT { } + +type testcase testcaseType() runs on Empty_CT system Empty_CT; + +testcase tc_first() runs on Empty_CT system Empty_CT{ } +testcase tc_second() runs on Empty_CT system Empty_CT{ } +testcase tc_third() runs on Empty_CT system Empty_CT{ } +testcase tc_forth() runs on Empty_CT system Empty_CT{ } + +function f_testcaseTypeFunction() return testcaseType +{ + var testcaseType vl_akarmi := refers(tc_first); + return vl_akarmi; +} + +type testcaseType GoodTestcaseType1 (refers(tc_first), refers(tc_second), refers(tc_third)); + +type testcaseType FaultyTestcaseType1 (refers(tc_first), refers(tc_first)); +type testcaseType FaultyTestcaseType2 (refers(tc_third) .. refers(tc_first)); +type testcaseType FaultyTestcaseType3 (refers(tc_first) .. refers(tc_third)); +type testcaseType FaultyTestcaseType4 (refers(tc_first) .. refers(tc_first)); +type testcaseType FaultyTestcaseType5 ( f_testcaseTypeFunction(), refers(tc_third) ); +type testcaseType FaultyTestcaseType6 (-infinity .. infinity); +type testcaseType FaultyTestcaseType7 length(10); +type testcaseType TestcaseType; +type TestcaseType FaultyTestcaseType8 length(4 .. 8); +type testcaseType FaultyTestcaseType9 length(8 .. 4); +type testcaseType FaultyTestcaseType10 length(-4 .. -3); +type testcaseType FaultyTestcaseType11 length(4444444444444444444 .. 88888888888888888888888); +type testcaseType FaultyTestcaseType12 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodTestcaseType1 cg_testcasetype1 := refers(tc_first); +const GoodTestcaseType1 cg_testcasetype2 := refers(tc_forth); + +template GoodTestcaseType1 t_testcasetype1 := refers(tc_first); +template GoodTestcaseType1 t_testcasetype2 := refers(tc_forth); + + +/// embeddedness tests +type port testPortName_PT message +{ inout integer; } +signature S_signature_good( + inout integer pl_parameterName ) +return integer; +signature S_signature_bad( + inout testPortName_PT parameter1, inout S_signature_good parameter2, inout default parameter3 ) +return testPortName_PT +exception( testPortName_PT, S_signature_good, default ); +signature S_signature_bad2( + inout testPortName_PT parameter1, inout S_signature_good parameter2, inout default parameter3 ) +return S_signature_good +exception( testPortName_PT, S_signature_good, default ); +signature S_signature_bad3( + inout testPortName_PT parameter1, inout S_signature_good parameter2, inout default parameter3 ) +return default +exception( testPortName_PT, S_signature_good, default ); + +type record recordName +{ + testPortName_PT field1, + S_signature_good field2, + default field3 +}; + +//objid tests +type objid myObjID; + +function f_objidFunction() return myObjID +{ + var myObjID vl_akarmi := objid { itu_t(0) recommendation (0) 0}; + return vl_akarmi; +} + +type myObjID GoodObjid1 (objid { itu_t(0) recommendation (0) 0}, objid { itu_t(0) recommendation (0) 1}, objid { itu_t(0) recommendation (0) 2}); + +type myObjID GoodObjid2 length(10); +type myObjID Objid; +type Objid GoodObjid3 length(4 .. 8); + +type myObjID FaultyObjid1 (objid { itu_t(0) recommendation (0) 0}, objid { itu_t(0) recommendation (0) 0}); +type myObjID FaultyObjid2 (objid { itu_t(0) recommendation (0) 10} .. objid { itu_t(0) recommendation (0) 0}); +type myObjID FaultyObjid3 (objid { itu_t(0) recommendation (0) 0} .. objid { itu_t(0) recommendation (0) 10}); +type myObjID FaultyObjid4 (objid { itu_t(0) recommendation (0) 0} .. objid { itu_t(0) recommendation (0) 0}); +type myObjID FaultyObjid5 ( f_objidFunction(), objid { itu_t(0) recommendation (0) 0} ); +type myObjID FaultyObjid6 (-infinity .. infinity); +type myObjID FaultyObjid7 length(8 .. 4); +type myObjID FaultyObjid8 length(-4 .. -3); +type myObjID FaultyObjid9 length(4444444444444444444 .. 88888888888888888888888); +type myObjID FaultyObjid10 (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(50,0,0,0)); + +const GoodObjid1 cg_objid1 := objid { itu_t(0) recommendation (0) 0}; +const GoodObjid1 cg_objid2 := objid { itu_t(0) recommendation (0) 10}; +const GoodObjid3 cg_objid3 := objid { iso(1) standard (0) 0}; + +template GoodObjid1 t_objid1 := objid { itu_t(0) recommendation (0) 0}; +template GoodObjid1 t_objid2 := objid { itu_t(0) recommendation (0) 10}; +template GoodObjid3 t_objid3 := objid { iso(1) standard (0) 0}; + +type integer FaultyInt44 ( 11.0 .. 255 ); + + +type union myu1 { + integer f1, + charstring f2 +} +type myu1 myu2 ({f1 := 0}, {f2 := ""}) +const myu2 cg_myu1 := {f1 := 1} + + +type integer i1 (1..2) +type i1 i2 (f_f1()) +function f_f1() return integer { return 1; } + + +type integer MYARRAY[3..5]; +type MYARRAY MYARR2 ( {3,4,5}, {5,6,7} ); + + +type octetstring myo1 (mycomp2) +type record of myo1 myo1o +type port myport message { + inout myo1o +} +type component mycomp1 { + port myport port1_PT +} +type mycomp1 mycomp2 + + +type bitstring BST ('00'B, '01'B, '10'B, '11'B, '0'B, '1'B, '1111111111111'B); +type BST BST2 length(0..2); +const BST cg_cbst := ''B; + + +type integer MyInt1 (1..20,25,26,30..40,5); +type MyInt1 MyInt2 (11..22); + + +const integer cg_EPTF_LGenBase_tcStateIdle := 0; +const integer cg_EPTF_LGenBase_tcStateRunning := 1; +const integer cg_EPTF_LGenBase_tcStateStopping := 2; +const integer cg_EPTF_LGenBase_tcStateStopped := 3; +const integer cg_EPTF_LGenBase_tcStateAborting := 4; +const integer cg_EPTF_LGenBase_tcStateAborted := 5; +const integer cg_EPTF_LGenBase_tcStateFinished := 6; +const integer cg_EPTF_LGenBase_tcStatePaused := 7; +const integer cg_EPTF_LGenBase_tcStateTerminated := 8; +type integer EPTF_LGenBase_tcState ( + cg_EPTF_LGenBase_tcStateIdle, + cg_EPTF_LGenBase_tcStateRunning, + cg_EPTF_LGenBase_tcStatePaused, + cg_EPTF_LGenBase_tcStateStopping, + cg_EPTF_LGenBase_tcStateStopped, + cg_EPTF_LGenBase_tcStateAborting, + cg_EPTF_LGenBase_tcStateAborted, + cg_EPTF_LGenBase_tcStateFinished, + cg_EPTF_LGenBase_tcStateTerminated +); +const EPTF_LGenBase_tcState cg_EPTF_szar := 11; + + +type charstring MyStr1 ("abc","efg"); +type charstring MyStr2 length (5..6); +type charstring MyStr3 ("xy","zw","haha"); +type charstring MyStr4 length (8); +type charstring MyStrX (MyStr1, MyStr2, MyStr3, MyStr4); +const MyStrX cg_my_str := "huhu"; + + +type record RRR { boolean b (false), integer i (1..3) } +type RRR RRR1 ({false,1},{false,2}); +type RRR RRR2 (RRR1.bread); + + +type hexstring MYHEXSTR_1 (''H, '0'H, '1'H, '2'H, '3'H, '4'H, '5'H, '6'H, '7'H, '8'H, '9'H, 'E'H, 'B'H, 'C'H, 'D'H); +const MYHEXSTR_1 cg_myhexstr1 := 'ABCD'H; + + +type bitstring MYBSTR1 (''B,'1'B,'0'B) +type bitstring MYBSTR2 ('00'B,'01'B,'10'B) +type bitstring MYBSTRX (MYBSTR1,MYBSTR2,'000'B,'001'B,'010'B,'011'B,'100'B,'101'B,'110'B) +const MYBSTRX cg_cmybstrx := '10101010101'B + + +type charstring SINF ("a"..infinity); + + +type integer II1 (11,II2); +type integer II2 (22,II1); + + +type octetstring MYOCTSTR_1 ( ''O, + '00'O, '10'O, '20'O, '30'O, '40'O, '50'O, '60'O, '70'O, '80'O, '90'O, 'A0'O, 'B0'O, 'C0'O, 'D0'O, 'E0'O, 'F0'O, + '01'O, '11'O, '21'O, '31'O, '41'O, '51'O, '61'O, '71'O, '81'O, '91'O, 'A1'O, 'B1'O, 'C1'O, 'D1'O, 'E1'O, 'F1'O, + '02'O, /*'12'O,*/ '22'O, '32'O, '42'O, '52'O, '62'O, '72'O, '82'O, '92'O, 'A2'O, 'B2'O, 'C2'O, 'D2'O, 'E2'O, 'F2'O, + '03'O, '13'O, '23'O, '33'O, '43'O, '53'O, '63'O, '73'O, '83'O, '93'O, 'A3'O, 'B3'O, 'C3'O, 'D3'O, 'E3'O, 'F3'O, + '04'O, '14'O, '24'O, '34'O, '44'O, '54'O, '64'O, '74'O, '84'O, '94'O, 'A4'O, 'B4'O, 'C4'O, 'D4'O, 'E4'O, 'F4'O, + '05'O, '15'O, '25'O, '35'O, '45'O, '55'O, '65'O, '75'O, '85'O, '95'O, 'A5'O, 'B5'O, 'C5'O, 'D5'O, 'E5'O, 'F5'O, + '06'O, '16'O, '26'O, /*'36'O,*/ '46'O, '56'O, '66'O, '76'O, '86'O, '96'O, 'A6'O, 'B6'O, 'C6'O, 'D6'O, 'E6'O, 'F6'O, + '07'O, '17'O, '27'O, '37'O, '47'O, '57'O, '67'O, '77'O, '87'O, '97'O, 'A7'O, 'B7'O, 'C7'O, 'D7'O, 'E7'O, 'F7'O, + '08'O, '18'O, '28'O, '38'O, '48'O, '58'O, '68'O, '78'O, '88'O, '98'O, 'A8'O, 'B8'O, 'C8'O, 'D8'O, 'E8'O, 'F8'O, + '09'O, '19'O, '29'O, '39'O, '49'O, '59'O, '69'O, '79'O, '89'O, '99'O, 'A9'O, 'B9'O, 'C9'O, 'D9'O, 'E9'O, 'F9'O, + '0A'O, '1A'O, '2A'O, '3A'O, '4A'O, '5A'O, '6A'O, '7A'O, '8A'O, '9A'O, 'AA'O, 'BA'O, 'CA'O, 'DA'O, 'EA'O, 'FA'O, + '0B'O, '1B'O, '2B'O, '3B'O, '4B'O, '5B'O, '6B'O, '7B'O, '8B'O, '9B'O, 'AB'O, 'BB'O, 'CB'O, 'DB'O, 'EB'O, 'FB'O, + '0C'O, '1C'O, '2C'O, '3C'O, '4C'O, '5C'O, '6C'O, '7C'O, '8C'O, '9C'O, 'AC'O, 'BC'O, 'CC'O, 'DC'O, 'EC'O, 'FC'O, + '0D'O, '1D'O, '2D'O, '3D'O, '4D'O, '5D'O, '6D'O, '7D'O, '8D'O, '9D'O, 'AD'O, 'BD'O, 'CD'O, 'DD'O, 'ED'O, 'FD'O, + '0E'O, '1E'O, '2E'O, '3E'O, '4E'O, '5E'O, '6E'O, '7E'O, '8E'O, '9E'O, 'AE'O, 'BE'O, 'CE'O, 'DE'O, 'EE'O, 'FE'O, + '0F'O, '1F'O, '2F'O, '3F'O, '4F'O, '5F'O, '6F'O, '7F'O, '8F'O, '9F'O, 'AF'O, 'BF'O, 'CF'O, 'DF'O, 'EF'O, 'FF'O +) length(0..10); +const MYOCTSTR_1 cg_myoctstr1 := 'ABCD'O; + + +type integer INT1 (1..3); +type integer INT2 (10..11); +type integer III; +type III III1 (1..3) +type III III2 (10..11) +function f_fv() +{ + var INT1 vl_int1 := 1; + var INT2 vl_int2 := 10; + vl_int1 := vl_int2; + var III1 vl_iii1 := 1; + var III2 vl_iii2 := 10; + vl_iii1 := vl_iii2; +} + +const float cg_f_pinf := infinity; +const float cg_f_minf := -infinity; +const float cg_f_nan := not_a_number; +type float MyFlt1 (-infinity..infinity); +type float MyFlt2 (not_a_number); +function f_float_test_fn() { + var MyFlt1 vl_f1; + var MyFlt2 vl_f2; + vl_f1 := not_a_number; + vl_f2 := 1.0; + vl_f2 := vl_f1; +} + +type integer MyInt3 (!-infinity..!10); +type integer MyInt4 (!-10..!infinity); +type integer MyInt5 (!1..!2); +type integer MyInt6 (!1..!10,!10..!20); +const MyInt6 cg_myint6 := 10; +type MyInt6 MyInt7 (2..19); +type integer MyInt8 (MyInt4,10); +const MyInt8 cg_myint8a := 10; +const MyInt8 cg_myint8b := 20; + +type charstring MyStr5 (!"a".."a"); +type charstring MyStr6 (!"a"..!"b"); +type charstring MyStr7 (!"a"..!"c",!"c"..!"z"); +const MyStr7 cg_mystr7 := "c"; +type charstring MyStr8 ("c".."c",!"0".."9"); +type charstring MyStr9 (MyStr7, MyStr8); +const MyStr9 cg_mystr9a := "c"; +const MyStr9 cg_mystr9b := "0"; + +type float MyFlt3 (!-infinity..!-infinity); +type float MyFlt4 (!infinity..!infinity); +type float MyFlt5 (not_a_number..!infinity); +type float MyFlt6 (!-infinity..!infinity); +const MyFlt6 cg_myflt6a := -infinity; +const MyFlt6 cg_myflt6b := infinity; +const MyFlt6 cg_myflt6c := not_a_number; +type float MyFlt7 (MyFlt6, -infinity, infinity, not_a_number); +type float MyFlt8 (-infinity..!0.0,!0.0..infinity); +const MyFlt8 cg_myflt8 := 0.0; + +} diff --git a/Semantic_Analizer_Tests/src/Basic_tests/t3doc_explicit_negative_test.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/t3doc_explicit_negative_test.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..954ee22067e5de9d1f93e55dbc4827e456aa11c9 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/t3doc_explicit_negative_test.ttcn @@ -0,0 +1,1113 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +//* @author RZ/ETHBAAT A +//* ETH/RZ A +//* @desc This module is T3doc_Test_Types_explicitDoc_negativeTest.ttcn A +//* is part of TITAN regression test. State: passed A +//* All tagged comments are invalid except @author and @desc +//* @purpose This module is for negative testing explicit T3Doc tagging A +//* @config This tag is not supported A +//* @desc
this is a delimiter between two not supported tag +//* @exception This tag is not supported A +//* @desc this is a delimiter between two not supported tag +//* @member This tag is not supported A +//* @desc this is a delimiter between two not supported tag +//* @param This tag is not supported A +//* @desc this is a delimiter between two not supported tag +//* @priority This tag is not supported A +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported A +//* @desc this is a delimiter between two not supported tag +//* @dummy this is an unknown tag +module t3doc_explicit_negative_test +{ + +//* @author Anreas L B +//* @desc modulepar integer tsp_i B +//* @config This tag is not supported B +//* @desc this is a delimiter between two not supported tag B +//* @exception This tag is not supported B +//* @desc this is a delimiter between two not supported tag B +//* @param This tag "param" is not supported B +//* @desc this is a delimiter between two not supported tag B +//* @priority This tag is not supported B +//* @desc this is a delimiter between two not supported tag B +//* @purpose This tag is not supported B +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported B +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported B +//* @desc this is a delimiter between two not supported tag B +//* @verdict This tag is not supported B +//* @desc this is a delimiter between two not supported tag B +modulepar integer tsp_i; + +//* @author Anreas L C +//* @desc this is a modulepar block test C +//* @config This tag is not supported C +//* @desc this is a delimiter between two not supported tag C +//* @exception This tag is not supported C +//* @desc this is a delimiter between two not supported tag C +//* @param This tag "param" is not supported C +//* @desc this is a delimiter between two not supported tag C +//* @priority This tag is not supported C +//* @desc this is a delimiter between two not supported tag C +//* @purpose This tag is not supported C +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported C +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported C +//* @desc this is a delimiter between two not supported tag C +//* @verdict This tag is not supported C +//* @desc this is a delimiter between two not supported tag C +modulepar { + integer tsp_i2 := 1; + //* @desc this is unvisible + charstring tsp_ch:="hyppo"; +} + +//* @author ETHBAAT D +//* @desc This is the T3Doc test for groups D
+//* @config This tag is not supported D +//* @desc this is a delimiter between two not supported tag D +//* @exception This tag is not supported D +//* @desc this is a delimiter between two not supported tag D +//* @member This tag is not supported D +//* @desc this is a delimiter between two not supported tag D +//* @param This tag "param" is not supported D +//* @desc this is a delimiter between two not supported tag D +//* @priority This tag is not supported D +//* @desc this is a delimiter between two not supported tag D +//* @purpose This tag is not supported D +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported D +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported D +//* @desc this is a delimiter between two not supported tag D +//* @verdict This tag is not supported D +//* @desc this is a delimiter between two not supported tag D +group G { + const integer cg_ig1:=1; + const integer cg_ig2:=2; +} + +//* @author cg_i_Author E +//* and nobody else +//* @desc cg_i global const integer E
+//* @config This tag is not supported E +//* @desc this is a delimiter between two not supported tag E +//* @exception This tag is not supported E +//* @desc this is a delimiter between two not supported tag E +//* @member This tag "member" is not supported E +//* @desc this is a delimiter between two not supported tag E +//* @param This tag "param" is not supported E +//* @desc this is a delimiter between two not supported tag E +//* @priority This tag is not supported E +//* @desc this is a delimiter between two not supported tag E +//* @purpose This tag is not supported E +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported E +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported E +//* @desc this is a delimiter between two not supported tag E +//* @verdict This tag is not supported E +//* @desc this is a delimiter between two not supported tag E +const integer cg_i:=1; + +//* @author CGI_Author F +//* and nobody else +//* @desc cg_f global const charstring F +//* @config This tag is not supported F +//* @desc this is a delimiter between two not supported tag F +//* @exception This tag is not supported F +//* @desc this is a delimiter between two not supported tag F +//* @param This tag "param" is not supported F +//* @desc this is a delimiter between two not supported tag F +//* @priority This tag is not supported F +//* @desc this is a delimiter between two not supported tag F +//* @purpose This tag is not supported F +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported F +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported F +//* @desc this is a delimiter between two not supported tag F +//* @verdict This tag is not supported F +//* @desc this is a delimiter between two not supported tag F +const float cg_f:=1.0; + + +//* @author cg_f_Author G +//* and nobody else G +//* @desc cg_v global const verdicttype G +//* @config This tag is not supported G +//* @desc this is a delimiter between two not supported tag G +//* @exception This tag is not supported G +//* @desc this is a delimiter between two not supported tag G +//* @member This tag "member" is not supported G +//* @desc this is a delimiter between two not supported tag G +//* @param This tag "param" is not supported G +//* @desc this is a delimiter between two not supported tag G +//* @priority This tag is not supported G +//* @desc this is a delimiter between two not supported tag G +//* @purpose This tag is not supported G +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported G +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported G +//* @desc this is a delimiter between two not supported tag G +//* @verdict This tag is not supported G +//* @desc this is a delimiter between two not supported tag G +const verdicttype cg_v:=fail; + +//* @author bitstring_Author H +//* and nobody else H +//* @desc cg_bs global const bitstring H
+//* @config This tag is not supported H +//* @desc this is a delimiter between two not supported tag H +//* @exception This tag is not supported H +//* @desc this is a delimiter between two not supported tag H +//* @member This tag "member" is not supported H +//* @desc this is a delimiter between two not supported tag H +//* @param This tag "param" is not supported H +//* @desc this is a delimiter between two not supported tag H +//* @priority This tag is not supported H +//* @desc this is a delimiter between two not supported tag H +//* @purpose This tag is not supported H +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported H +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported H +//* @desc this is a delimiter between two not supported tag H +//* @verdict This tag is not supported H +//* @desc this is a delimiter between two not supported tag H +const bitstring cg_bs:='101'B; + +//* @author hexstring_Author I +//* and nobody else I +//* @desc cg_hs global const hextring I +//* @config This tag is not supported I +//* @desc this is a delimiter between two not supported tag I +//* @exception This tag is not supported I +//* @desc this is a delimiter between two not supported tag I +//* @member This tag "member" is not supported I +//* @desc this is a delimiter between two not supported tag I +//* @param This tag "param" is not supported I +//* @desc this is a delimiter between two not supported tag I +//* @priority This tag is not supported I +//* @desc this is a delimiter between two not supported tag I +//* @purpose This tag is not supported I +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported I +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported I +//* @desc this is a delimiter between two not supported tag I +//* @verdict This tag is not supported I +//* @desc this is a delimiter between two not supported tag I +const hexstring cg_hs:='AFC'H; + +//* @author octetstring_Author J +//* and nobody else J +//* @desc cg_os global const hextring J +//* @config This tag is not supported J +//* @desc this is a delimiter between two not supported tag J +//* @exception This tag is not supported J +//* @desc this is a delimiter between two not supported tag J +//* @param This tag "param" is not supported J +//* @member This tag "member" is not supported J +//* @desc this is a delimiter between two not supported tag J +//* @desc this is a delimiter between two not supported tag J +//* @priority This tag is not supported J +//* @desc this is a delimiter between two not supported tag J +//* @purpose This tag is not supported J +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported J +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported J +//* @desc this is a delimiter between two not supported tag J +//* @verdict This tag is not supported J +//* @desc this is a delimiter between two not supported tag J + +const octetstring cg_os:='AFC1'O; + +//* @author charstring_Author K +//* and nobody else K +//* @desc cg_cs global const charstring K +//* @config This tag is not supported K +//* @desc this is a delimiter between two not supported tag K +//* @exception This tag is not supported K +//* @desc this is a delimiter between two not supported tag K +//* @member This tag "member" is not supported K +//* @desc this is a delimiter between two not supported tag K +//* @param This tag "param" is not supported K +//* @desc this is a delimiter between two not supported tag K +//* @priority This tag is not supported K +//* @desc this is a delimiter between two not supported tag K +//* @purpose This tag is not supported K +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported K +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported K +//* @desc this is a delimiter between two not supported tag K +//* @verdict This tag is not supported K +//* @desc this is a delimiter between two not supported tag K + +const charstring cg_cs:="Snowhite and the Smurfs" + +//* @author u_charstring_Author L +//* and nobody else L +//* @config This tag is not supported L +//* @desc this is a delimiter between two not supported tag L +//* @exception This tag is not supported L +//* @desc this is a delimiter between two not supported tag L +//* @member This tag "member" is not supported L +//* @desc this is a delimiter between two not supported tag L +//* @param This tag "param" is not supported L +//* @desc this is a delimiter between two not supported tag L +//* @priority This tag is not supported L +//* @desc this is a delimiter between two not supported tag L +//* @purpose This tag is not supported L +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported L +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported L +//* @desc this is a delimiter between two not supported tag L +//* @verdict This tag is not supported L +//* @desc this is a delimiter between two not supported tag L + +const universal charstring cg_ucs := int2unichar (367) + +//* @author IntegerList_Author M +//* and nobody else M +//* @desc cg_i global const integer M +//* @config This tag is not supported M +//* @desc this is a delimiter between two not supported tag M +//* @exception This tag is not supported M +//* @desc this is a delimiter between two not supported tag M +//* @param This tag "param" is not supported M +//* @desc this is a delimiter between two not supported tag M +//* @priority This tag is not supported M +//* @desc this is a delimiter between two not supported tag M +//* @purpose This tag is not supported M +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported M +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported M +//* @desc this is a delimiter between two not supported tag M +//* @verdict This tag is not supported M +//* @desc this is a delimiter between two not supported tag M + +const IntegerList cg_il:={1,2,3}; + +//* @author MyRec_Author N +//* and nobody else N +//* @desc cg_myRec global const MyRec N +//* @config This tag is not supported N +//* @desc this is a delimiter between two not supported tag N +//* @exception This tag is not supported N +//* @desc this is a delimiter between two not supported tag N +//* @param This tag "param" is not supported N +//* @desc this is a delimiter between two not supported tag N +//* @priority This tag is not supported N +//* @desc this is a delimiter between two not supported tag N +//* @purpose This tag is not supported N +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported N +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported N +//* @desc this is a delimiter between two not supported tag N +//* @verdict This tag is not supported N +//* @desc this is a delimiter between two not supported tag N +const MyRec cg_myRec:={1,true} + +//* @author cg_myFL_Author N1 +//* and nobody else N1 +//* @desc cg_i global const integer N1 +//* @config This tag is not supported N1 +//* @desc this is a delimiter between two not supported tag N1 +//* @exception This tag is not supported N1 +//* @desc this is a delimiter between two not supported tag N1 +//* @param This tag "param" is not supported N1 +//* @desc this is a delimiter between two not supported tag N1 +//* @priority This tag is not supported N1 +//* @desc this is a delimiter between two not supported tag N1 +//* @purpose This tag is not supported N1 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported N1 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported N1 +//* @desc this is a delimiter between two not supported tag N1 +//* @verdict This tag is not supported N1 +//* @desc this is a delimiter between two not supported tag N1 +const FloatList cg_myFL:={1.0,2.2} + +//* @author cg_myVL_Author N2 +//* and nobody else N2 +//* @config This tag is not supported N2 +//* @desc this is a delimiter between two not supported tag N2 +//* @exception This tag is not supported N2 +//* @desc this is a delimiter between two not supported tag N2 +//* @param This tag "param" is not supported N2 +//* @desc this is a delimiter between two not supported tag N2 +//* @priority This tag is not supported N2 +//* @desc this is a delimiter between two not supported tag N2 +//* @purpose This tag is not supported N2 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported N2 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported N2 +//* @desc this is a delimiter between two not supported tag N2 +//* @verdict This tag is not supported N2 +//* @desc this is a delimiter between two not supported tag N2 +const VerdictList cg_myVL:={pass,pass} + +//* @author cg_myBS_Author N3 +//* and nobody else N3 +//* @desc global const BSList cg_myBSL N3 +//* @config This tag is not supported N3 +//* @desc this is a delimiter between two not supported tag N3 +//* @exception This tag is not supported N3 +//* @desc this is a delimiter between two not supported tag N3 +//* @param This tag "param" is not supported N3 +//* @desc this is a delimiter between two not supported tag N3 +//* @priority This tag is not supported N3 +//* @desc this is a delimiter between two not supported tag N3 +//* @purpose This tag is not supported N3 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported N3 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported N3 +//* @desc this is a delimiter between two not supported tag N3 +//* @verdict This tag is not supported N3 +//* @desc this is a delimiter between two not supported tag N3 +const BSList cg_myBSL:={'0000'B,'0001'B,'0010'B,'0011'B,'0100'B} + +//* @author cg_myHS_Author N4 +//* and nobody else N4 +//* @desc global const HSList cg_myHSL N4 +//* @config This tag is not supported N4 +//* @desc this is a delimiter between two not supported tag N4 +//* @exception This tag is not supported N4 +//* @desc this is a delimiter between two not supported tag N4 +//* @param This tag "param" is not supported N4 +//* @desc this is a delimiter between two not supported tag N4 +//* @priority This tag is not supported N4 +//* @desc this is a delimiter between two not supported tag N4 +//* @purpose This tag is not supported N4 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported N4 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported N4 +//* @desc this is a delimiter between two not supported tag N4 +//* @verdict This tag is not supported N4 +//* @desc this is a delimiter between two not supported tag N4 +const HSList cg_myHSL:={'AFC'H, 'DC6'H}; + +//* @author cg_myOS_Author N5 +//* and nobody else N5 +//* @desc cg_i global const integer N5 +//* @config This tag is not supported N5 +//* @desc this is a delimiter between two not supported tag N5 +//* @exception This tag is not supported N5 +//* @desc this is a delimiter between two not supported tag N5 +//* @param This tag "param" is not supported N5 +//* @desc this is a delimiter between two not supported tag N5 +//* @priority This tag is not supported N5 +//* @desc this is a delimiter between two not supported tag N5 +//* @purpose This tag is not supported N5 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported N5 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported N5 +//* @desc this is a delimiter between two not supported tag N5 +//* @verdict This tag is not supported N5 +//* @desc this is a delimiter between two not supported tag N5 +const OSList cg_myOSL:={'AFCD'O, 'DC66'O} + +//* @author cg_myCS_Author N6 +//* and nobody else N6 +//* @desc cg_i global const integer N6 +//* @config This tag is not supported N6 +//* @desc this is a delimiter between two not supported tag N6 +//* @exception This tag is not supported N6 +//* @desc this is a delimiter between two not supported tag N6 +//* @param This tag "param" is not supported N6 +//* @desc this is a delimiter between two not supported tag N6 +//* @priority This tag is not supported N6 +//* @desc this is a delimiter between two not supported tag N6 +//* @purpose This tag is not supported N6 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported N6 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported N6 +//* @desc this is a delimiter between two not supported tag N6 +//* @verdict This tag is not supported N6 +//* @desc this is a delimiter between two not supported tag N6 +const CSList cg_myCSL:={"Hello ", "World!"} + +//* @author cg_myUCS_Author N7 +//* and nobody else N7 +//* @config This tag is not supported N7 +//* @desc this is a delimiter between two not supported tag N7 +//* @exception This tag is not supported N7 +//* @desc this is a delimiter between two not supported tag N7 +//* @param This tag "param" is not supported N7 +//* @desc this is a delimiter between two not supported tag N7 +//* @priority This tag is not supported N7 +//* @desc this is a delimiter between two not supported tag N7 +//* @purpose This tag is not supported N7 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported N7 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported N7 +//* @desc this is a delimiter between two not supported tag N7 +//* @verdict This tag is not supported N7 +//* @desc this is a delimiter between two not supported tag N7 +const UCSList cg_myUCSL:={int2unichar (367), int2unichar (368), int2unichar (369)} + +//===== Types ===== + +//==== Structured data types ===== + +// T3Doc block d2) + +//* @author IntegerList_Author O +//* and nobodyElse O +//* on the Earth O +//* @desc IntegerList O +//* @config This tag is not supported O +//* @desc this is a delimiter between two not supported tag O +//* @exception This tag is not supported O +//* @desc this is a delimiter between two not supported tag O +//* @member This tag "member is not supported or it is ambiguous O +//* @desc this is a delimiter between two not supported tag O +//* @param This tag "param" is not supported O +//* @desc this is a delimiter between two not supported tag O +//* @priority This tag is not supported O +//* @desc this is a delimiter between two not supported tag O +//* @purpose This tag is not supported O +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported O +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported O +//* @desc this is a delimiter between two not supported tag O +//* @verdict This tag is not supported O +//* @desc this is a delimiter between two not supported tag O +type record of integer IntegerList; + + +//* @author FloatList_Author O1 +//* and nobodyElse O1 +//* on the Earth O1 +//* @desc FloatList O1 +//* only +//* @config This tag is not supported O1 +//* @desc this is a delimiter between two not supported tag O1 +//* @exception This tag is not supported O1 +//* @desc this is a delimiter between two not supported tag O1 +//* @member This tag "member is not supported or it is ambiguous O1 +//* @desc this is a delimiter between two not supported tag O1 +//* @param This tag "param" is not supported O1 +//* @desc this is a delimiter between two not supported tag O1 +//* @priority This tag is not supported O1 +//* @desc this is a delimiter between two not supported tag O1 +//* @purpose This tag is not supported O1 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported O1 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported O1 +//* @desc this is a delimiter between two not supported tag O1 +//* @verdict This tag is not supported O1 +//* @desc this is a delimiter between two not supported tag O1 +type record of float FloatList; + +//* @author VerdictList_Author O2 +//* and nobodyElse O2 +//* on the Earth O2 +//* @desc VerdictList O2 +//* only O2 +//* @config This tag is not supported O2 +//* @desc this is a delimiter between two not supported tag O2 +//* @exception This tag is not supported O2 +//* @desc this is a delimiter between two not supported tag O2 +//* @member This tag "member is not supported or it is ambiguous O2 +//* @desc this is a delimiter between two not supported tag O2 +//* @param This tag "param" is not supported O2 +//* @desc this is a delimiter between two not supported tag O2 +//* @priority This tag is not supported O2 +//* @desc this is a delimiter between two not supported tag O2 +//* @purpose This tag is not supported O2 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported O2 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported O2 +//* @desc this is a delimiter between two not supported tag O2 +//* @verdict This tag is not supported O2 +//* @desc this is a delimiter between two not supported tag O2 +type record of verdicttype VerdictList; + + +//* @author BSList_Author O2A +//* @desc BSList O2A +//* only O2A +//* @config This tag is not supported O2A +//* @desc this is a delimiter between two not supported tag O2A +//* @exception This tag is not supported O2A +//* @desc this is a delimiter between two not supported tag O2A +//* @member This tag "member is not supported or it is ambiguous O2A +//* @desc this is a delimiter between two not supported tag O2A +//* @param This tag "param" is not supported O2A +//* @desc this is a delimiter between two not supported tag O2A +//* @priority This tag is not supported O2A +//* @desc this is a delimiter between two not supported tag O2A +//* @purpose This tag is not supported O2A +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported O2A +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported O2A +//* @desc this is a delimiter between two not supported tag O2A +//* @verdict This tag is not supported O2A +//* @desc this is a delimiter between two not supported tag O2A +type record of bitstring BSList; + + +//* @author HSList_Author O3 +//* @desc HSList O3 +//* only O3 +//* @config This tag is not supported O3 +//* @desc this is a delimiter between two not supported tag O3 +//* @exception This tag is not supported O3 +//* @desc this is a delimiter between two not supported tag O3 +//* @member This tag "member is not supported or it is ambiguous O3 +//* @desc this is a delimiter between two not supported tag O3 +//* @param This tag "param" is not supported O3 +//* @desc this is a delimiter between two not supported tag O3 +//* @priority This tag is not supported O3 +//* @desc this is a delimiter between two not supported tag O3 +//* @purpose This tag is not supported O3 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported O3 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported O3 +//* @desc this is a delimiter between two not supported tag O3 +//* @verdict This tag is not supported O3 +//* @desc this is a delimiter between two not supported tag O3 +type record of hexstring HSList; + +//* @author CSList_Author O3A +//* and nobodyElse O3A +//* on the Earth O3A +//* @desc CSList O3A +//* only O3A +//* @config This tag is not supported O3A +//* @desc this is a delimiter between two not supported tag O3A +//* @exception This tag is not supported O3A +//* @desc this is a delimiter between two not supported tag O3A +//* @member This tag "member is not supported or it is ambiguous O3A +//* @desc this is a delimiter between two not supported tag O3A +//* @param This tag "param" is not supported O3A +//* @desc this is a delimiter between two not supported tag O3A +//* @priority This tag is not supported O3A +//* @desc this is a delimiter between two not supported tag O3A +//* @purpose This tag is not supported O3A +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported O3A +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported O3A +//* @desc this is a delimiter between two not supported tag O3A +//* @verdict This tag is not supported O3A +//* @desc this is a delimiter between two not supported tag O3A +type record of charstring CSList; + +//* @author UCSList_Author O3B +//* and nobodyElse O3B +//* on the Earth O3B +//* @desc UCSList O3B +//* only O3B +//* @config This tag is not supported O3B +//* @desc this is a delimiter between two not supported tag O3B +//* @exception This tag is not supported O3B +//* @desc this is a delimiter between two not supported tag O3B +//* @member This tag "member is not supported or it is ambiguous O3B +//* @desc this is a delimiter between two not supported tag O3B +//* @param This tag "param" is not supported O3B +//* @desc this is a delimiter between two not supported tag O3B +//* @priority This tag is not supported O3B +//* @desc this is a delimiter between two not supported tag O3B +//* @purpose This tag is not supported O3B +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported O3B +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported O3B +//* @desc this is a delimiter between two not supported tag O3B +//* @verdict This tag is not supported O3B +//* @desc this is a delimiter between two not supported tag O3B +type record of universal charstring UCSList; + +//* @author OSList_Author O3C +//* and nobodyElse O3C +//* on the Earth O3C +//* @desc OSList O3C +//* only O3C +//* @config This tag is not supported O3C +//* @desc this is a delimiter between two not supported tag O3C +//* @exception This tag is not supported O3C +//* @desc this is a delimiter between two not supported tag O3C +//* @member This tag "member is not supported or it is ambiguous O3C +//* @desc this is a delimiter between two not supported tag O3C +//* @param This tag "param" is not supported O3C +//* @desc this is a delimiter between two not supported tag O3C +//* @priority This tag is not supported O3C +//* @desc this is a delimiter between two not supported tag O3C +//* @purpose This tag is not supported O3C +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported O3C +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported O3C +//* @desc this is a delimiter between two not supported tag O3C +//* @verdict This tag is not supported O3C +//* @desc this is a delimiter between two not supported tag O3C +type record of octetstring OSList; + + +//* @author BoolList_Author O3D +//* and nobodyElse O3D +//* on the Earth O3D +//* @desc BoolList O3D +//* only O3D +//* @config This tag is not supported O3D +//* @desc this is a delimiter between two not supported tag O3D +//* @exception This tag is not supported O3D +//* @desc this is a delimiter between two not supported tag O3D +//* @member This tag "member is not supported or it is ambiguous O3D +//* @desc this is a delimiter between two not supported tag O3D +//* @param This tag "param" is not supported O3D +//* @desc this is a delimiter between two not supported tag O3D +//* @priority This tag is not supported O3D +//* @desc this is a delimiter between two not supported tag O3D +//* @purpose This tag is not supported O3D +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported O3D +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported O3D +//* @desc this is a delimiter between two not supported tag O3D +//* @verdict This tag is not supported O3D +//* @desc this is a delimiter between two not supported tag O3D +type record of boolean BoolList; + +//* @author MyEnum_Author O3E +//* and nobodyElse O3E +//* on the Earth O3E +//* @desc MyEnum O3E +//* only O3E +//* @config This tag is not supported O3E +//* @desc this is a delimiter between two not supported tag O3E +//* @exception This tag is not supported O3E +//* @desc this is a delimiter between two not supported tag O3E +//* @member This tag "member is not supported or it is ambiguous O3E +//* @desc this is a delimiter between two not supported tag O3E +//* @param This tag "param" is not supported O3E +//* @desc this is a delimiter between two not supported tag O3E +//* @priority This tag is not supported O3E +//* @desc this is a delimiter between two not supported tag O3E +//* @purpose This tag is not supported O3E +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported O3E +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported O3E +//* @desc this is a delimiter between two not supported tag O3E +//* @verdict This tag is not supported O3E +//* @desc this is a delimiter between two not supported tag O3E +type enumerated MyEnum2 {first, second, third, fourth}; + +//* @author EnumList_Author O3F +//* and nobodyElse O3F +//* on the Earth O3F +//* @desc EnumList O3F +//* only O3F +//* @config This tag is not supported O3F +//* @desc this is a delimiter between two not supported tag O3F +//* @exception This tag is not supported O3F +//* @desc this is a delimiter between two not supported tag O3F +//* @member This tag "member is not supported or it is ambiguous O3F +//* @desc this is a delimiter between two not supported tag O3F +//* @param This tag "param" is not supported O3F +//* @desc this is a delimiter between two not supported tag O3F +//* @priority This tag is not supported O3F +//* @desc this is a delimiter between two not supported tag O3F +//* @purpose This tag is not supported O3F +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported O3F +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported O3F +//* @desc this is a delimiter between two not supported tag O3F +//* @verdict This tag is not supported O3F +//* @desc this is a delimiter between two not supported tag O3F +type record of MyEnum2 EnumList; + +// T3Doc block d3 + +//* @author MyRec_Author +//* @desc This record used to test record tooltip P +//* @config This tag is not supported P +//* @desc this is a delimiter between two not supported tag P +//* @exception This tag is not supported P +//* @desc this is a delimiter between two not supported tag P +//* @param This tag "param" is not supported P +//* @desc this is a delimiter between two not supported tag P +//* @priority This tag is not supported P +//* @desc this is a delimiter between two not supported tag P +//* @purpose This tag is not supported P +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported P +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported P +//* @desc this is a delimiter between two not supported tag P +//* @verdict This tag is not supported P +//* @desc this is a delimiter between two not supported tag P +type record MyRec { + integer i, + boolean b +}; + + +//* @author MyUnion_Author is the +//* authhhhor Q +//* @desc This record used to test record tooltip Q +//* @config This tag is not supported Q +//* @desc this is a delimiter between two not supported tag Q +//* @exception This tag is not supported Q +//* @desc this is a delimiter between two not supported tag Q +//* @param This tag "param" is not supported Q +//* @desc this is a delimiter between two not supported tag Q +//* @priority This tag is not supported Q +//* @desc this is a delimiter between two not supported tag Q +//* @purpose This tag is not supported Q +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported Q +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported Q +//* @desc this is a delimiter between two not supported tag Q +//* @verdict This tag is not supported Q +//* @desc this is a delimiter between two not supported tag Q +type union MyUnion { + integer i, + boolean b, + float f +} + + +//* @author MySet_Author is the +//* authhhhor R +//* @desc This record used to test record tooltip R +//* @config This tag is not supported R +//* @desc this is a delimiter between two not supported tag R +//* @exception This tag is not supported R +//* @desc this is a delimiter between two not supported tag R +//* @param This tag "param" is not supported R +//* @desc this is a delimiter between two not supported tag R +//* @priority This tag is not supported R +//* @desc this is a delimiter between two not supported tag R +//* @purpose This tag is not supported R +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported R +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported R +//* @desc this is a delimiter between two not supported tag R +//* @verdict This tag is not supported R +//* @desc this is a delimiter between two not supported tag R +type set MySet { + integer i, + boolean b, + float f +} + +//* @desc MyEnum +//* @desc This record used to test record tooltip R1 +//* @config This tag is not supported R1 +//* @desc this is a delimiter between two not supported tag R1 +//* @exception This tag is not supported R1 +//* @desc this is a delimiter between two not supported tag R1 +//* @param This tag "param" is not supported R1 +//* @desc this is a delimiter between two not supported tag R1 +//* @priority This tag is not supported R1 +//* @desc this is a delimiter between two not supported tag R1 +//* @purpose This tag is not supported R1 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported R1 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported R1 +//* @desc this is a delimiter between two not supported tag R1 +//* @verdict This tag is not supported R1 +//* @desc this is a delimiter between two not supported tag R1 +type enumerated MyEnum1 { e1,e2 } + + +//===== Templates ====== + +//* @desc This template "t_myrec" used to test template documentation +//* @author t_myrec_Author is the +//* authhhhor S +//* @desc This record used to test record tooltip S +//* @config This tag is not supported S +//* @desc this is a delimiter between two not supported tag S +//* @exception This tag is not supported S +//* @desc this is a delimiter between two not supported tag S +// +//* @desc this is a delimiter between two not supported tag S +//* @priority This tag is not supported S +//* @desc this is a delimiter between two not supported tag S +//* @purpose This tag is not supported S +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported S +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported S +//* @desc this is a delimiter between two not supported tag S +//* @verdict This tag is not supported S +//* @desc this is a delimiter between two not supported tag S +template MyRec t_myrec := { + 1, + true +} + +//* @desc This template "t_myrec1" used to test template documentation T +//* @author t_myrec_Author is the +//* authhhhor T +//* @config This tag is not supported T +//* @desc this is a delimiter between two not supported tag T +//* @exception This tag is not supported T +//* @desc this is a delimiter between two not supported tag T +// +//* @desc this is a delimiter between two not supported tag T +//* @priority This tag is not supported T +//* @desc this is a delimiter between two not supported tag T +//* @purpose This tag is not supported T +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported T +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported T +//* @desc this is a delimiter between two not supported tag T +//* @verdict This tag is not supported T +//* @desc this is a delimiter between two not supported tag T +template MyRec t_myrec1(integer pl_i, boolean pl_b):={ + i:= pl_i, + b:=pl_b +} + +//* @desc MyPort_PT +//*

This is a paragraph
in the description


+//* @config This tag is not supported T1 +//* @desc this is a delimiter between two not supported tag T1 +//* @exception This tag is not supported T1 +//* @desc this is a delimiter between two not supported tag T1 +//* @param This tag "param" is not supported T1 +//* @desc this is a delimiter between two not supported tag T1 +//* @priority This tag is not supported T1 +//* @desc this is a delimiter between two not supported tag T1 +//* @purpose This tag is not supported T1 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported T1 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported T1 +//* @desc this is a delimiter between two not supported tag T1 +//* @verdict This tag is not supported T1 +//* @desc this is a delimiter between two not supported tag T1 +type port MyPort_PT message { + inout MyRec; +} with { extension "internal" } + + +//* @author My_CT_Author is the +//* @desc My_CT U +//*

This is a paragraph
in the description


U +//* @config This tag is not supported U +//* @desc this is a delimiter between two not supported tag U +//* @exception This tag is not supported U +//* @desc this is a delimiter between two not supported tag U +//* @param This tag "param" is not supported U +//* @desc this is a delimiter between two not supported tag U +//* @priority This tag is not supported U +//* @desc this is a delimiter between two not supported tag U +//* @purpose This tag is not supported U +//* @desc this is a delimiter between two not supported tag U +//* @requirement This tag is not supported U +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported U +//* @desc this is a delimiter between two not supported tag U +//* @verdict This tag is not supported U +//* @desc this is a delimiter between two not supported tag U +type component My_CT { + //* @author myPort_author U1 + //* @desc This is the first component local definition U1 +//* @config This tag is not supported U1 +//* @desc this is a delimiter between two not supported tag U1 +//* @exception This tag is not supported U1 +//* @desc this is a delimiter between two not supported tag U1 +//* @param This tag "param" is not supported U1 +//* @desc this is a delimiter between two not supported tag U1 +//* @priority This tag is not supported U1 +//* @desc this is a delimiter between two not supported tag U1 +//* @purpose This tag is not supported U1 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported U1 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported U1 +//* @desc this is a delimiter between two not supported tag U1 +//* @verdict This tag is not supported U1 +//* @desc this is a delimiter between two not supported tag U1 + port MyPort_PT myPort_PT; + //* @author myComponentvar_author U2 + //* @desc This is the second component local definition U2 + //* @config This tag is not supported U2 +//* @desc this is a delimiter between two not supported tag U2 +//* @exception This tag is not supported U2 +//* @desc this is a delimiter between two not supported tag U2 +//* @param This tag "param" is not supported U2 +//* @desc this is a delimiter between two not supported tag U2 +//* @priority This tag is not supported U2 +//* @desc this is a delimiter between two not supported tag U2 +//* @purpose This tag is not supported U2 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported U2 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported U2 +//* @desc this is a delimiter between two not supported tag U2 +//* @verdict This tag is not supported U2 +//* @desc this is a delimiter between two not supported tag U2 + var integer v_myComponentVar; + //* @desc This is a default variable + //* @config This tag is not supported U3 +//* @desc this is a delimiter between two not supported tag U3 +//* @exception This tag is not supported U3 +//* @desc this is a delimiter between two not supported tag U3 +//* @param This tag "param" is not supported U3 +//* @desc this is a delimiter between two not supported tag U3 +//* @priority This tag is not supported U3 +//* @desc this is a delimiter between two not supported tag U3 +//* @purpose This tag is not supported U3 +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported U3 +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported U3 +//* @desc this is a delimiter between two not supported tag U3 +//* @verdict This tag is not supported U3 +//* @desc this is a delimiter between two not supported tag U3 + var default v_myDefault1:=null; + timer T_T; +} + +// T3Doc i1 + +//* @author mySignature_Author Z +//* @desc mySignature is a blocking signature Z +//* @config This tag is not supported Z +//* @desc this is a delimiter between two not supported tag Z +//* @member This tag is not supported Z +//* @desc this is a delimiter between two not supported tag Z +//* @priority This tag is not supported Z +//* @desc this is a delimiter between two not supported tag Z +//* @purpose This tag is not supported Z +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported Z +//* @desc this is a delimiter between two not supported tag +//* @verdict This tag is not supported Z +//* @desc this is a delimiter between two not supported tag Z +signature mySignature(in integer pl_i, in float pl_f) +return integer +exception( + integer, + boolean); + +//* T3Doc i2 +//* @author Function_author AA +//* @desc This is the description of the function +//* @config This tag is not supported AA +//* @desc this is a delimiter between two not supported tag AA +//* @exception This tag is not supported AA +//* @desc this is a delimiter between two not supported tag AA +//* @member This tag is not supported AA +//* @desc this is a delimiter between two not supported tag AA +//* @priority This tag is not supported AA +//* @desc this is a delimiter between two not supported tag AA +//* @purpose This tag is not supported AA +//* @desc this is a delimiter between two not supported tag AA +function f_myfuncF( + in charstring pl_firstArg1, + out boolean pl_success1 +) runs on My_CT return integer +{ + //* @desc This is a default variable + var default vl_myDefault2:=null; + log(vl_myDefault2); + pl_success1:=true; + log("First arg: ", pl_firstArg1," second arg: ", pl_success1) + T_T.start(3.0); + as_myAltstep("trial",true); + return 1 +} + +//* @author Altstep_author AA1 +//* @desc This is the description of the altstep +//* @config This tag is not supported AA1 +//* @desc this is a delimiter between two not supported tag AA1 +//* @exception This tag is not supported AA1 +//* @desc this is a delimiter between two not supported tag AA1 +//* @member This tag is not supported AA1 +//* @desc this is a delimiter between two not supported tag AA1 +//* @priority This tag is not supported AA1 +//* @desc this is a delimiter between two not supported tag AA1 +//* @purpose This tag is not supported AA1 +//* @desc this is a delimiter between two not supported tag AA1 +//* @return This tag is not supported AA1 +//* @desc this is a delimiter between two not supported tag AA1 +altstep as_myAltstep( + in charstring pl_firstArg2, + in boolean pl_success2 + )runs on My_CT { + [] myPort_PT.receive {log("Hi, these are the args:",pl_firstArg2,pl_success2); repeat;} + [] T_T.timeout {} +} + +//* @author tc_author AB +//* @desc This is the description of the testcase AB +//* @exception This tag is not supported AB +//* @desc this is a delimiter between two not supported tag AB +//* @member This tag is not supported AB +//* @desc this is a delimiter between two not supported tag AB +//* @return This tag is not supported AB +//* @desc this is a delimiter between two not supported tag AB +testcase tc_explicit1(charstring pl_what) runs on My_CT { + var boolean vl_succ; + var integer vl_result:= f_myfuncF(pl_what,vl_succ); + log(vl_result); + setverdict(pass); +} + +//* @config This tag is not supported AC +//* @desc this is a delimiter between two not supported tag AC +//* @exception This tag is not supported AC +//* @desc this is a delimiter between two not supported tag AC +//* @member This tag "member" is not supported AC +//* @desc this is a delimiter between two not supported tag AC +//* @param This tag "param" is not supported AC +//* @desc this is a delimiter between two not supported tag AC +//* @priority This tag is not supported AC +//* @desc this is a delimiter between two not supported tag AC +//* @purpose This tag is not supported AC +//* @desc this is a delimiter between two not supported tag +//* @requirement This tag is not supported AC +//* @desc this is a delimiter between two not supported tag +//* @return This tag is not supported AC +//* @desc this is a delimiter between two not supported tag AC +//* @verdict This tag is not supported AC +//* @desc this is a delimiter between two not supported tag AC +control{ + execute(tc_explicit1("ANY")); +} + +} // end of module + diff --git a/Semantic_Analizer_Tests/src/Basic_tests/t3doc_explicit_test.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/t3doc_explicit_test.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d51a111bb6b2d5a484aa1601bd866faf0380bfc0 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/t3doc_explicit_test.ttcn @@ -0,0 +1,876 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +//* @author RZ/ETHBAAT +//* ETH/RZ +//* @author Jack Kent, Peggy Parish, Crockett Johnson, +//* A.A. Milne, Marjorie Weinman Sharmat, +//* Mary Shelley, and Madeleine L'Engle +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn +//* @desc This module is T3doc_Test_Types_explicitDoc.ttcn +//* is part of TITAN regression test +//* @purpose This module is for positive testing explicit T3Doc tagging +//* @version 1.7 +//* @remark This is not the final version +//* @requirement RS999 +//* @reference ETSI ES 201 873-10 V4.3.1 +//* @see http://www.ttcn-3.org/OpenSourceTools.htm +//* @since 2012-04-11 A +//* @status Test Finished A +//* @verdict passed A +//* @config This is the only line not accepted +module t3doc_explicit_test +{ + +//* @author Anreas L +//* @desc modulepar integer tsp_i +//* @remark it is for testing single line modulepar +//* @reference this is a dummy ref +//* @see BalticSee B +//* @since 2012-04-02 B +//* @status Ready B +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn B +//* @version 0.2 B +modulepar integer tsp_i; + +//* @author Anreas L C +//* @desc this is a modulepar block test +//* @remark it is for testing single line modulepar +//* @reference this is a dummy ref C +//* @see BalticSee C +//* @since 2012-04-02 C +//* @status Ready C +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn C +//* @version 0.2 C +//* @member integer tsp_i2 is equal to 1 +//* @member charstring tsp_ch is initialized for "hyppo" +modulepar { + integer tsp_i2 := 1; + //* @desc this is unvisible + charstring tsp_ch:="hyppo"; +} + +//* @author ETHBAAT D +//* @desc This is the T3Doc test for groups D +//* @remark This part is ambigous a little bit D +//* @reference this is a dummy ref D +//* @see also documentation D +//* @since 2012-04-02 D +//* @status Ready D +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn D +//* @version 0.2 D +group G { + const integer cg_ig1:=1; + const integer cg_ig2:=2; +} + +//* @author CGI_Author E +//* and nobody else +//* @desc cg_i global const integer E +//* @remark this is a new part E +//* @reference this is a dummy ref E +//* @see also documentation E +//* @since 2012-04-02 E +//* @status Ready E +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn E +//* @version 0.2 E +const integer cg_i:=1; + +//* @author CGI_Author F +//* and nobody else +//* @desc cg_f global const charstring F +//* @remark this is a new part F +//* @reference this is a dummy ref F +//* @see also documentation F +//* @since 2012-04-02 F +//* @status Ready F +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn F +//* @version 0.2 F +const float cg_f:=1.0; + + +//* @author CGI_Author G +//* and nobody else G +//* @desc cg_v global const verdicttype G +//* @remark this is a new part G +//* @reference this is a dummy ref G +//* @see also documentation G +//* @since 2012-04-02 G +//* @status Ready G +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn G +//* @version 0.2 G +const verdicttype cg_v:=fail; + + +//* @author bitstring_Author H +//* and nobody else H +//* @desc cg_bs global const bitstring H +//* @remark this is a new part H +//* @reference this is a dummy ref H +//* @see also documentation H +//* @since 2012-04-02 H +//* @status Ready H +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn H +//* @version 0.2 H +const bitstring cg_bs:='101'B; + +//* @author hexstring_Author I +//* and nobody else I +//* @desc cg_hs global const hextring I +//* @remark this is a new part I +//* @reference this is a dummy ref I +//* @see also documentation I +//* @since 2012-04-02 I +//* @status Ready I +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn I +//* @version 0.2 I +const hexstring cg_hs:='AFC'H; + +//* @author octetstring_Author J +//* and nobody else J +//* @desc cg_os global const hextring J +//* @remark this is a new part J +//* @reference this is a dummy ref J +//* @see also documentation J +//* @since 2012-04-02 J +//* @status Ready J +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn J +//* @version 0.2 J + +const octetstring cg_os:='AFC1'O; + +//* @author charstring_Author K +//* and nobody else K +//* @desc cg_cs global const charstring K +//* @remark this is a new part K +//* @reference this is a dummy ref K +//* @see also documentation K +//* @since 2012-04-02 K +//* @status Ready K +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn K +//* @version 0.2 K +const charstring cg_cs:="Snowhite and the Smurfs" + +//* @author u_charstring_Author L +//* and nobody else L +//* @desc cg_hs global const hextring L +//* @remark this is a new part L +//* @reference this is a dummy ref L +//* @see also documentation L +//* @since 2012-04-02 L +//* @status Ready L +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn L +//* @version 0.2 L +const universal charstring cg_ucs := int2unichar (367) + +//* @author IntegerList_Author M +//* and nobody else M +//* @desc cg_i global const integer M +//* @remark this is a new part M +//* @reference this is a dummy ref M +//* @see also documentation M +//* @since 2012-04-02 M +//* @status Ready M +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn M +//* @version 0.2 M +const IntegerList cg_il:={1,2,3}; + +//* @author MyRec_Author N +//* and nobody else N +//* @desc cg_i global const integer N +//* @member 1 N +//* @member true N +//* @remark this is a new part N +//* @reference this is a dummy ref N +//* @see also documentation N +//* @since 2012-04-02 N +//* @status Ready N +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn N +//* @version 0.2 N +const MyRec cg_myRec:={1,true} + + +//* @author cg_myFL_Author N1 +//* and nobody else N1 +//* @desc cg_i global const integer N1 +//* @member 1 N1 +//* @member true N1 +//* @remark this is a new part N1 +//* @reference this is a dummy ref N1 +//* @see also documentation N1 +//* @since 2012-04-02 N1 +//* @status Ready N1 +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn N1 +//* @version 0.2 N1 +const FloatList cg_myFL:={1.0,2.2} + +//* @author cg_myVL_Author N2 +//* and nobody else N2 +//* @desc cg_i global const integer N2 +//* @member 1 N2 +//* @member true N2 +//* @remark this is a new part N2 +//* @reference this is a dummy ref N2 +//* @see also documentation N2 +//* @since 2012-04-02 N2 +//* @status Ready N2 +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn N2 +//* @version 0.2 N2 + const VerdictList cg_myVL:={pass,pass} + +//* @author cg_myBS_Author N3 +//* and nobody else N3 +//* @desc cg_i global const integer N3 +//* @member 1 N3 +//* @member true N3 +//* @remark this is a new part N3 +//* @reference this is a dummy ref N3 +//* @see also documentation N3 +//* @since 2012-04-02 N3 +//* @status Ready N3 +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn N3 +//* @version 0.2 N3 +const BSList cg_myBSL:={'0000'B,'0001'B,'0010'B,'0011'B,'0100'B} + +//* @author cg_myHS_Author N4 +//* and nobody else N4 +//* @desc cg_i global const integer N4 +//* @member 1 N4 +//* @member true N4 +//* @remark this is a new part N4 +//* @reference this is a dummy ref N4 +//* @see also documentation N4 +//* @since 2012-04-02 N4 +//* @status Ready N4 +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn N4 +//* @version 0.2 N4 +const HSList cg_myHSL:={'AFC'H, 'DC6'H} + +//* @author cg_myOS_Author N5 +//* and nobody else N5 +//* @desc cg_i global const integer N5 +//* @member 1 N5 +//* @member true N5 +//* @remark this is a new part N5 +//* @reference this is a dummy ref N5 +//* @see also documentation N5 +//* @since 2012-04-02 N5 +//* @status Ready N5 +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn N5 +//* @version 0.2 N5 +const OSList cg_myOSL:={'AFCD'O, 'DC66'O} + +//* @author cg_myCS_Author N6 +//* and nobody else N6 +//* @desc cg_i global const integer N6 +//* @member 1 N6 +//* @member true N6 +//* @remark this is a new part N6 +//* @reference this is a dummy ref N6 +//* @see also documentation N6 +//* @since 2012-04-02 N6 +//* @status Ready N6 +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn N6 +//* @version 0.2 N6 +const CSList cg_myCSL:={"Hello ", "World!"} + +//* @author cg_myUCS_Author N7 +//* and nobody else N7 +//* @desc cg_i global const integer N7 +//* @member 1 N7 +//* @member true N7 +//* @remark this is a new part N7 +//* @reference this is a dummy ref N7 +//* @see also documentation N7 +//* @since 2012-04-02 N7 +//* @status Ready N7 +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn N7 +//* @version 0.2 N7 +const UCSList cg_myUCSL:={int2unichar (367), int2unichar (368), int2unichar (369)} + +//===== Types ===== + +//==== Structured data types ===== + +// T3Doc block d2) + +//* @author IntegerList_Author O +//* and nobodyElse O +//* on the Earth O +//* @desc IntegerList O +//* only +//* @remark this is a new part O +//* @reference this is a dummy ref O +//* @see also documentation O +//* @since 2012-04-02 O +//* @status Ready O +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn O +//* @version 0.2 O +type record of integer IntegerList; + + +//* @author FloatList_Author O1 +//* and nobodyElse O1 +//* on the Earth O1 +//* @desc FloatList O1 +//* only +//* @remark this is a new part O1 +//* @reference this is a dummy ref O1 +//* @see also documentation O1 +//* @since 2012-04-02 O1 +//* @status Ready O1 +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn O1 +//* @version 0.2 O1 +type record of float FloatList; + +//* @author VerdictList_Author O2 +//* and nobodyElse O2 +//* on the Earth O2 +//* @desc VerdictList O2 +//* only O2 +//* @remark this is a new part O2 +//* @reference this is a dummy ref O2 +//* @see also documentation O2 +//* @since 2012-04-02 O2 +//* @status Ready O2 +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn O2 +//* @version 0.2 O2 +type record of verdicttype VerdictList; + + +//* @author BSList_Author O2A +//* and nobodyElse O2A +//* on the Earth O2A +//* @desc BSList O2A +//* only O2A +//* @remark this is a new part O2A +//* @reference this is a dummy ref O2A +//* @see also documentation O2A +//* @since 2012-04-02 O2A +//* @status Ready O2A +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn O2A +//* @version 0.2 O2A +type record of bitstring BSList; + + +//* @author HSList_Author O3 +//* and nobodyElse O3 +//* on the Earth O3 +//* @desc HSList O3 +//* only O3 +//* @remark this is a new part O3 +//* @reference this is a dummy ref O3 +//* @see also documentation O3 +//* @since 2012-04-02 O3 +//* @status Ready O3 +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn O3 +//* @version 0.2 O3 +type record of hexstring HSList; + +//* @author CSList_Author O3A +//* and nobodyElse O3A +//* on the Earth O3A +//* @desc CSList O3A +//* only O3A +//* @remark this is a new part O3A +//* @reference this is a dummy ref O3A +//* @see also documentation O3A +//* @since 2012-04-02 O3A +//* @status Ready O3A +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn O3A +//* @version 0.2 O3A +type record of charstring CSList; + +//* @author UCSList_Author O3B +//* and nobodyElse O3B +//* on the Earth O3B +//* @desc UCSList O3B +//* only O3B +//* @remark this is a new part O3B +//* @reference this is a dummy ref O3B +//* @see also documentation O3B +//* @since 2012-04-02 O3B +//* @status Ready O3B +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn O3B +//* @version 0.2 O3B +type record of universal charstring UCSList; + +//* @author OSList_Author O3C +//* and nobodyElse O3C +//* on the Earth O3C +//* @desc OSList O3C +//* only O3C +//* @remark this is a new part O3C +//* @reference this is a dummy ref O3C +//* @see also documentation O3C +//* @since 2012-04-02 O3C +//* @status Ready O3C +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn O3C +//* @version 0.2 O3C +type record of octetstring OSList; + + +//* @author BoolList_Author O3C +//* and nobodyElse O3C +//* on the Earth O3C +//* @desc BoolList O3C +//* only O3C +//* @remark this is a new part O3C +//* @reference this is a dummy ref O3C +//* @see also documentation O3C +//* @since 2012-04-02 O3C +//* @status Ready O3C +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn O3C +//* @version 0.2 O3C +type record of boolean BoolList; + +//* @author MyEnum_Author O3D +//* and nobodyElse O3D +//* on the Earth O3D +//* @desc MyEnum O3D +//* only O3D +//* @remark this is a new part O3D +//* @reference this is a dummy ref O3D +//* @see also documentation O3D +//* @since 2012-04-02 O3D +//* @status Ready O3D +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn O3D +//* @version 0.2 O3D +type enumerated MyEnum2 {first, second, third, fourth}; + +//* @author EnumList_Author O3E +//* and nobodyElse O3E +//* on the Earth O3E +//* @desc EnumList O3E +//* only O3E +//* @remark this is a new part O3E +//* @reference this is a dummy ref O3E +//* @see also documentation O3E +//* @since 2012-04-02 O3E +//* @status Ready O3E +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn O3E +//* @version 0.2 O3E +type record of MyEnum2 EnumList; + +// T3Doc block d3 + +//* @author MyRec_Author is the +//* authhhhor P +//* @desc This record used to test record tooltip P +//* @member i the first field +//* but this text is too short for test thus I'm trying to write something longer P +//* @member b the second field but +//* this text is too short for test thus I'm trying to write something longer P +//* @remark this is a new part P +//* @reference this is a dummy ref P +//* @see also documentation P +//* @since 2012-04-02 P +//* @status Ready P +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn P +//* @version 0.2 P +type record MyRec { + integer i, + boolean b +}; + +//* @author MyUnion_Author is the +//* authhhhor Q +//* @desc This record used to test record tooltip Q +//* @member i integer is the first choice +//* but this text is too short for test thus I'm trying to write something longer Q +//* @member b boolean is the second field +//* @member f float is the third field but +//* this text is too short for test thus I'm trying to write something longer Q +//* @remark this is a new part Q +//* @reference this is a dummy ref Q +//* @see also documentation Q +//* @since 2012-04-02 Q +//* @status Ready Q +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn Q +//* @version 0.2 Q +type union MyUnion { + integer i, + boolean b, + float f +} + + +//* @author MySet_Author is the +//* authhhhor R +//* @desc This record used to test record tooltip R +//* @member i integer is the first element R +//* but this text is too short for test thus I'm trying to write something longer R +//* @member b boolean is the second element R +//* @member f float is the third element but R +//* this text is too short for test thus I'm trying to write something longer R +//* @remark this is a new part R +//* @reference this is a dummy ref R +//* @see also documentation R +//* @since 2012-04-02 R +//* @status Ready R +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn R +//* @version 0.2 R +type set MySet { + integer i, + boolean b, + float f +} + +//* @desc MyEnum +//* @member e1 +//* @member e2 +//* @desc

This is a paragraph
in the description

+//* This is an italic line +//* This is an emphasis line +//* This is italic and emphasis +//* This is emphasis and italic +//* This is a code fragment +//*
Preformatted text
+//*
    +//*
  • UnorderedListElement1
  • +//*
  • UnorderedListElement2
  • +//*
  • UnorderedListElement3
  • +//*
+//*
    +//*
  1. OrderedListElement1
  2. +//*
  3. OrderedListElement2
  4. +//*
  5. OrderedListElement3
  6. +//*
+//* +type enumerated MyEnum1 { e1,e2 } + +//* @author MyEnum_Author V +//* @desc MyEnum V +//*

This is a paragraph
in the description


V +//* @member e1 - first enum value V +//* @member e2 - second enum value V +//* but this text is too short for test thus I'm trying to write something longer V +//* @remark form tag params there was not warning !!! V +//* @reference this is a dummy ref1 V +//* @see also documentation V +//* @since 2012-04-04 V +//* @status Ready V +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn V +//* @version 0.2 V +//* @reference this is a dummy ref2 V +type enumerated MyEnum { e1,e2 } + +//===== Templates ====== + +//* @desc This template "t_myrec" used to test template documentation +//* @author t_myrec_Author is the +//* authhhhor S +//* @desc This record used to test record tooltip S +//* @member i integer is the first element S +//* but this text is too short for test thus I'm trying to write something longer S +//* @member b boolean is the second element S +//* this text is too short for test thus I'm trying to write something longer S +//* @param It has no parameter +//* @remark this is a new part S +//* @reference this is a dummy ref S +//* @see also documentation S +//* @since 2012-04-02 S +//* @status Ready S +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn S +//* @version 0.2 S +template MyRec t_myrec := { + 1, + true +} + +//* @desc This template "t_myrec1" used to test template documentation T +//* @author t_myrec_Author is the +//* authhhhor T +//* @desc This record used to test record tooltip T +//* @member i integer is the first element T +//* but this text is too short for test thus I'm trying to write something longer T +//* @member b boolean is the second element T +//* this text is too short for test thus I'm trying to write something longer T +//* @param pl_i is the first param T +//* @param pl_b is the second param T +//* @remark this is a new part T +//* @reference this is a dummy ref T +//* @see also documentation T +//* @since 2012-04-02 T +//* @status Ready T +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn T +//* @version 0.2 T + +template MyRec t_myrec1(integer pl_i, boolean pl_b):={ + i:= pl_i, + b:=pl_b +} + +//* @desc MyPort_PT +//*

This is a paragraph
in the description


+//* @member inout MyRec +//* @remark This is an internal port; +//* @author MyPort_PT_Author is the +//* author T +//* @desc This record used to test record tooltip T +//* @member inout MyRec T +//* but this text is too short for test thus I'm trying to write something longer T +//* @remark form tag params there was not warning !!! T +//* @reference this is a dummy ref T +//* @see also documentation T +//* @since 2012-04-04 T +//* @status Ready T +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn T +//* @version 0.2 T +type port MyPort_PT message { + inout MyRec; +} with { extension "internal" } + +//* T3Doc f1) +//* @desc The component My_CT is created for testcases +//* @remark This is a remark to My_CT +//* @desc

This is a paragraph
in the description

+//* This is an italic line +//* This is an emphasis line +//* This is italic and emphasis +//* This is emphasis and italic +//* This is a code fragment +//*
Preformatted text
+//*
    +//*
  • UnorderedListElement1
  • +//*
  • UnorderedListElement2
  • +//*
  • UnorderedListElement3
  • +//*
+//*
    +//*
  1. OrderedListElement1
  2. +//*
  3. OrderedListElement2
  4. +//*
  5. OrderedListElement3
  6. +//*
+type component My_CT1 { + //* T3Doc f2) + port MyPort_PT myPort_PT; +} + +//* @author My_CT_Author is the +//* @desc My_CT U +//*

This is a paragraph
in the description


U +//* @member port MyPort myPort - is the only port U +//* This is an internal port and this member should be accepted !!! +//* @member var integer v_myComponentVar U +//* but this text is too short for test thus I'm trying to write something longer U +//* @remark form tag params there was not warning !!! U +//* @reference this is a dummy ref U +//* @see also documentation U +//* @since 2012-04-04 U +//* @status Ready U +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn U +//* @version 0.2 U +type component My_CT { + //* @author myPort_author U1 + //* @desc This is the first component local definition U1 + //* @remark This is just a remark U1 + port MyPort_PT myPort_PT; + //* @author myComponentvar_author U2 + //* @desc This is the second component local definition U2 + //* @remark This is just a remark U2 + //* @reference This is a ref + var integer v_myComponentVar; + //* @desc This is a default variable + var default v_myDefault1:=null; + timer T_T; +} + +// T3Doc i1 +//* @desc mySignature is an example for nonblocking signature +//* @exception integer the type of the exception +//* @exception boolean true if normal else false +//* @status ready +//* @desc

This is a paragraph
in the description

+//* This is an italic line +//* This is an emphasis line +//* This is italic and emphasis +//* This is emphasis and italic +//* This is a code fragment +//*
Preformatted text
+//*
    +//*
  • UnorderedListElement1
  • +//*
  • UnorderedListElement2
  • +//*
  • UnorderedListElement3
  • +//*
+//*
    +//*
  1. OrderedListElement1
  2. +//*
  3. OrderedListElement2
  4. +//*
  5. OrderedListElement3
  6. +//*
+//* +signature mySignature1 () +noblock +exception( + integer, + boolean); + +//* @author mySignature_Author Z +//* @desc mySignature is a blocking signature Z +//*

This is a paragraph
in the description


Z +//* @param in integer pl_i is the first argument Z +//* @param in float pl_f is the second argument Z +//* @exception integer: this execption is enabled only for signatures Z
+//* @exception boolean: this is the second exeption Z +//* @remark form tag params there was not warning !!! Z +//* @reference this is a dummy ref Z +//* @return integer (has no name) Z +//* @see also documentation Z +//* @since 2012-04-04 Z +//* @status Ready Z +//* @url file:///home/ethbaat/T3DocTest/T3doc_Test_Types_explicitDoc.ttcn Z +//* @version 0.2 Z +signature mySignature(in integer pl_i, in float pl_f) +return integer +exception( + integer, + boolean); + +//====== HTML first test case ============ + +//* T3Doc i2 +//* @author Function_author AA +//* @desc This is the description of the function +//* f_myfuncE +//* @desc

This is a paragraph
in the description

+//* This is an italic line +//* This is an emphasis line +//* This is italic and emphasis +//* This is emphasis and italic +//* This is a code fragment +//*
Preformatted text
+//*
    +//*
  • UnorderedListElement1
  • +//*
  • UnorderedListElement2
  • +//*
  • UnorderedListElement3
  • +//*
+//*
    +//*
  1. OrderedListElement1
  2. +//*
  3. OrderedListElement2
  4. +//*
  5. OrderedListElement3
  6. +//*
+//* +//* @param pl_firstArg1 this is the first arg AA +//* @param pl_success1 this is the output parameter AA +//* @return integer this function always returns 1 AA +//* @reference This function is used by tc_1 - This is an unrecommended ref AA +//* @remark this function doesn't perform any useful calculation just logs a line AA +//* @requirement This feature required by XY AA +//* @see in T3 documentation AA +//* @since R9B AA +//* @status under construction AA +//* @url blabla AA +//* @verdict This fuction does not modify verdict AA +//* @version 0.2 AA +function f_myfuncE( + in charstring pl_firstArg1, + out boolean pl_success1 +) return integer +{ + //* @desc This is a default variable + var default vl_myDefault2:=null; + log(vl_myDefault2); + pl_success1:=true; + log("First arg: ", pl_firstArg1," second arg: ", pl_success1) + + return 1 +} + + +//* T3Doc i2 +//* @author Function_author AA +//* @desc This is the description of the function +//* f_myfuncF +//* @param pl_firstArg1 this is the first arg AA +//* @param pl_success1 this is the output parameter AA +//* @return integer this function always returns 1 AA +//* @reference This function is used by tc_1 - This is an unrecommended ref AA +//* @remark this function doesn't perform any useful calculation just logs a line AA +//* @requirement This feature required by XY AA +//* @see in T3 documentation AA +//* @since R9B AA +//* @status under construction AA +//* @url blabla AA +//* @verdict This fuction does not modify verdict AA +//* @version 0.2 AA +function f_myfuncF( + in charstring pl_firstArg1, + out boolean pl_success1 +) runs on My_CT return integer +{ + //* @desc This is a default variable + var default vl_myDefault2 :=null; + log(vl_myDefault2); + pl_success1:=true; + log("First arg: ", pl_firstArg1," second arg: ", pl_success1) + T_T.start(3.0); + as_myAltstep("trial",true); + return 1 +} + + +//* @author Altstep_author AA1 +//* @desc This is the description of the altstep +//* as_myAltstep +//* @param pl_firstArg2 this is the first arg AA1 +//* @param pl_success2 this is the output parameter AA1 +// +//* @reference This function is used by tc_1 - This is an unrecommended ref AA1 +//* @remark this function doesn't perform any useful calculation just logs a line AA1 +//* @requirement This feature required by XY AA1 +//* @see in T3 documentation AA1 +//* @since R9B AA1 +//* @status under construction AA1 +//* @url blabla AA1 +//* @verdict This fuction does not modify verdict AA1 +//* @version 0.2 AA1 +altstep as_myAltstep( + in charstring pl_firstArg2, + in boolean pl_success2 + )runs on My_CT { + [] myPort_PT.receive {log("Hi, these are the args:",pl_firstArg2,pl_success2); var integer vl_i:= 3;vl_i := vl_i + 1;repeat;} + [] T_T.timeout {} +} + +//* @author tc_author AB +//* @desc This is the description of the testcase AB +//* @config This testcase does not require config set AB +//* special configuration no neededAB +//* @param charstring pl_what: what should pass to the func AB +//* @param this is dummy par text AB +//* @priority high +//* @purpose To test the t3 doc behavior fro testcases AB +//* @remark T3doc functionality has not been working yet for prority and purpose AB +//* @reference This is the ref of a testcase AB +//* @requirement RS999 AB +//* @see in T3 documentation AB +//* @since R9B AB +//* @status ready AB +//* @url blabla AB +//* @verdict This testcase sets verdict for pass AB +//* @version 0.2 AB +testcase tc_explicit1(charstring pl_what) runs on My_CT { + var boolean vl_succ; + var integer vl_result:= f_myfuncE(pl_what,vl_succ); + log(vl_result); + setverdict(pass); +} + +//* @author ControlAuthor AC +//* @desc This is the description of the testcase AC +//* @remark T3doc functionality has not been working yet AC +//* @reference This is the ref of a testcase AC +//* @see in T3 documentation AC +//* @since R9B AC +//* @status ready AC +//* @url blabla AC +//* @version 0.2 AC +control{ + execute(tc_explicit1("ANY")); +} + +} // end of module + diff --git a/Semantic_Analizer_Tests/src/Basic_tests/template_assignment_tests.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/template_assignment_tests.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..420ca580708b5806e8369a98e8e0716af978cca0 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/template_assignment_tests.ttcn @@ -0,0 +1,5240 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module template_assignment_tests +{ +import from ASNTypes all; + +type enumerated enumeration +{ + item1(1), + item2(1), + item2(2), + item3(3) +}; + +//FIXME add tests for ispresent, ischoosen, valueof + +type enumerated myenum1 {xx1,xx2,xx3}; +type enumerated myenum2 {xx4,xx5,xx6}; +type default mydefault; +type component mycomponent{}; +type record of integer myrecordofType; +type set of integer mysetofType; +type integer myarrayType[3]; +type objid myObjID; + +type set mysetType +{ + integer field1, + charstring field2 +}; + +type record myrecordType +{ + integer field1, + charstring field2, + integer field3 optional +}; + +const integer cg_integer := 5; +const myrecordofType cg_recordof := {1}; + +type component mycomponent2{}; +type function t_function(); +type function t_function2() runs on mycomponent; +external function ef_c_ext_function(); + +type altstep t_altstep() runs on mycomponent; +type altstep t_altstep2(); +altstep as_c_altstep() +runs on mycomponent +{ + [guard2] timerName.timeout + {} + [else] + {} +} + + +type testcase t_testcase() runs on mycomponent system mycomponent; +testcase tc_c_testcase() +runs on mycomponent +system mycomponent +{ + //local declarations + + //dynamic behaviour +} + + +function f_comp_return() return mycomponent{} + +signature mySignature(in integer Par1, out integer Par2, inout integer Par3) return integer; + +function f_integerValueTest() +{ + timer TL_t := 5.0; + + var template integer vt_i := omit; + { vt_i := (1 .. 2); } + { vt_i := (1,2,3); } + { vt_i := 5; } + { vt_i := 5+5; } + { vt_i := 5-5; } + { vt_i := 5*5; } + { vt_i := 5/5; } + { vt_i := vt_i; } + { vt_i := bit2int('00'B); } + { vt_i := char2int("5"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('00'H); } + { vt_i := oct2int('0F'O); } + { vt_i := str2int("5"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := true; } + { vt_i := false; } + { vt_i := pass; } + { vt_i := not false; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'O; } + { vt_i := '00'B; } + { vt_i := '00'H; } + { vt_i := 5.5 * 5.5; } + { vt_i := 5.5 + 5.5; } + { vt_i := 5.5 - 5.5; } + { vt_i := 5.5 / 5.5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'O; } + { vt_i := not4b '00'B; } + { vt_i := not4b '00'H; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'O and4b '00'O; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'O or4b '00'O; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'O xor4b '00'O; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'O << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'O >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'O <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'O @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := '00'O & '00'O; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2str(5.5); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := 5 length(2..5); } +} + +function f_floatValueTests() +{ + timer TL_t := 5.0; + var template float vt_i := omit; + + { vt_i := (1.0 .. 2.0); } + { vt_i := (1.0,2.0,3.0); } + { vt_i := 5.5; } + { vt_i := 5.5+5.5; } + { vt_i := 5.5-5.5; } + { vt_i := 5.5*5.5; } + { vt_i := 5.5/5.5; } + { vt_i := vt_i; } + { vt_i := int2float(5); } + { vt_i := str2float("5.5"); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := TL_t.read; } + + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := true; } + { vt_i := false; } + { vt_i := pass; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'O; } + { vt_i := '00'B; } + { vt_i := '00'H; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'O; } + { vt_i := not4b '00'B; } + { vt_i := not4b '00'H; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'O and4b '00'O; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'O or4b '00'O; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'O xor4b '00'O; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'O << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'O >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'O <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'O @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := '00'O & '00'O; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5.5 == 5.5; } + { vt_i := 5.5 != 5.5; } + { vt_i := 5.5 < 5.5; } + { vt_i := 5.5 > 5.5; } + { vt_i := 5.5 <= 5.5; } + { vt_i := 5.5 >= 5.5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := 5.0 length(2..5); } + + { template float t_i0 := omit; + template float t_i1 := t_i0.nonExi; + template float t_i2 := t_i0[1]; + template float t_i3 := t_i0.nonExi();} +} + +function f_booleanValueTests() +{ + timer TL_t := 5.0; + var template boolean vt_i := omit; + + { vt_i := (true, true, false); } + { vt_i := true; } + { vt_i := false; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not true; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := vt_i; } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := match(5,5); } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := pass; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'O; } + { vt_i := '00'B; } + { vt_i := '00'H; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := not4b 'aa'O; } + { vt_i := not4b '00'B; } + { vt_i := not4b '00'H; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'O and4b '00'O; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'O or4b '00'O; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'O xor4b '00'O; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'O << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'O >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'O <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'O @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := '00'O & '00'O; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := true length(2..5); } +} + +function f_bitstringValueTests() +{ + timer TL_t := 5.0; + var template bitstring vt_i := omit; + + { vt_i := ('00'B, '11'B, '0*?0'B); } + { vt_i := '00'B; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'B << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := vt_i; } + { vt_i := oct2bit('00FF'O); } + { vt_i := str2bit("0101"); } + { vt_i := int2bit(1,3); } + { vt_i := '00'B length(2..5); } + + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := true; } + { vt_i := false; } + { vt_i := pass; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'O; } + { vt_i := '00'H; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'O; } + { vt_i := not4b '00'H; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'O and4b '00'O; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'O or4b '00'O; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'O xor4b '00'O; } + { vt_i := '00'H << 1; } + { vt_i := '00'O << 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'O >> 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'O <@ 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'O @> 1; } + { vt_i := '00'H & '00'H; } + { vt_i := '00'O & '00'O; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := '0'B length(2..5); } + { vt_i := '000000'B length(2..5); } + log(vt_i[0]); +} + +function f_hexstringValueTests() +{ + timer TL_t := 5.0; + var template hexstring vt_i := omit; + + { vt_i := ('00'H, '11'H, '0*?0'H); } + { vt_i := '00'H; } + { vt_i := not4b '00'H; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'H << 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'H & '00'H; } + { vt_i := vt_i; } + { vt_i := bit2hex('00'B); } + { vt_i := oct2hex('0F'O); } + { vt_i := str2hex("0101"); } + { vt_i := int2hex(1,3); } + { vt_i := '00'H length(2..5); } + + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := true; } + { vt_i := false; } + { vt_i := pass; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'O; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'O; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'O and4b '00'O; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'O or4b '00'O; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'O xor4b '00'O; } + { vt_i := '00'B << 1; } + { vt_i := '00'O << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'O >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'O <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'O @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'O & '00'O; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := '0'H length(2..5); } + { vt_i := '000000'H length(2..5); } + log(vt_i[0]); +} + +function f_octetstringValueTests() +{ + timer TL_t := 5.0; + var template octetstring vt_i := omit; + + { vt_i := ('00'O, '11'O, '0000'O); } + { vt_i := 'aa'O; } + { vt_i := not4b 'aa'O; } + { vt_i := '00'O and4b '00'O; } + { vt_i := '00'O or4b '00'O; } + { vt_i := '00'O xor4b '00'O; } + { vt_i := '00'O << 1; } + { vt_i := '00'O >> 1; } + { vt_i := '1100'O <@ 1; } + { vt_i := '1100'O @> 1; } + { vt_i := '00'O & '00'O; } + { vt_i := vt_i; } + { vt_i := bit2oct('00'B); } + { vt_i := char2oct("akarmi"); } + { vt_i := hex2oct('FF00'H); } + { vt_i := str2oct("0101"); } + { vt_i := int2oct(1,3); } + { vt_i := '0000'O length(2..5); } + + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := true; } + { vt_i := false; } + { vt_i := pass; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := '00'O length(2..5); } + { vt_i := '001122334455'O length(2..5); } + log(vt_i[0]); +} + +function f_verdicttypeValueTests() +{ + timer TL_t := 5.0; + var template verdicttype vt_i := omit; + + { vt_i := pass; } + { vt_i := inconc; } + { vt_i := error; } + { vt_i := fail; } + { vt_i := none; } + { vt_i := vt_i; } + { vt_i := (pass, inconc, error, fail ,none); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := pass length(2..5); } +} + +function f_enumeratedValueTests() +{ + timer TL_t := 5.0; + var template myenum1 vt_i := omit; + + { vt_i := xx1; } + { vt_i := xx2; } + { vt_i := xx3; } + { vt_i := vt_i; } + { vt_i := (xx1, xx2); } + + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := xx1 length(2..5); } +} + +function f_defaultValueTests() +{ + timer TL_t := 5.0; + var template mydefault vt_i := omit; + + { vt_i := null; } + { vt_i := vt_i; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := (null, activate(temp_altstep())); } + + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := null length(2..5); } +} + +function f_charstringValueTests() +{ + timer TL_t := 5.0; + var template charstring vt_i := omit; + + { vt_i := "akarmi"; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := ("akarmi", "akarmi2"); } + { vt_i := vt_i; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := "akar" length(2..5); } + + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := "a" length(2..5); } + { vt_i := "akarmi" length(2..5); } + log(vt_i[0]); +} + +function f_universalcharstringValueTests() +{ + timer TL_t := 5.0; + var template universal charstring vt_i := omit; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := (char(0,0,0,0), "0"); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := vt_i; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := "akar" length(2..5); } + + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := "a" length(2..5); } + { vt_i := "akarmi" length(2..5); } + log(vt_i[0]); +} + +function f_componentValueTests() +{ + timer TL_t := 5.0; + var template mycomponent vt_i := omit; + + { vt_i := null; } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := vt_i; } + { vt_i := (mtc, system, null, self); } + { vt_i := mycomponent.create; } + + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := mtc length(2..5); } +} + +function f_recordofValueTests() +{ + timer TL_t := 5.0; + var template myrecordofType vt_i := omit; + + { vt_i := {}; } + { vt_i := vt_i; } + { vt_i := {1,2,3,4}; } + { vt_i := {[0] := 0, [1] := 1}; } + { vt_i := {1,2,3} length(2..5); } + + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := null; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := {[TL_t] := 0, [-1] := 1, [1] := 1, [1] := 5, [99999999999999999] := 1}; } + { vt_i := {1} length(2..5); } + { vt_i := {1,2,3,4,5,6} length(2..5); } +} + +function f_setofValueTests() +{ + timer TL_t := 5.0; + var template mysetofType vt_i := omit; + + { vt_i := {}; } + { vt_i := {1,2,3,4}; } + { vt_i := {[0] := 0, [1] := 1}; } + { vt_i := vt_i; } + { vt_i := subset(1,2,3); } + { vt_i := superset(1,2,3); } + { vt_i := {1,2,3} length(2..5); } + { vt_i := subset(1,2,3) length(2..5); } + { vt_i := superset(1,2,3) length(2..5); } + { vt_i := superset(1) length(2..5); } + { vt_i := subset(1,2,3,4,5,6) length(2..5); } + + { vt_i := subset(1,2,3,*); } + { vt_i := superset(1,2,3,*); } + + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := null; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := {[TL_t] := 0, [-1] := 1, [1] := 1, [1] := 5, [99999999999999999] := 1}; } + { vt_i := {1} length(2..5); } + { vt_i := subset(1) length(2..5); } + { vt_i := {1,2,3,4,5,6} length(2..5); } + { vt_i := superset(1,2,3,4,5,6) length(2..5); } +} + +function f_setValueTests() +{ + timer TL_t := 5.0; + var template mysetType vt_i := omit; + + { vt_i := vt_i; } + { vt_i := {field1:=1, field2:="akarmi"}; } + + { vt_i := {field2:=1}; } + { vt_i := {field3:=1}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := {1, "akarmi"}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:='00'O, field2:='00'B}; } + { vt_i := null; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := omit length(2..5); } +} + +function f_recordValueTests() +{ + timer TL_t := 5.0; + var template myrecordType vt_i := omit; + + { vt_i := vt_i; } + { vt_i := {field1:=1, field2:="akarmi", field3:=omit}; } + + { vt_i := {}; } + { vt_i := {1,"akarmi",3,4,5}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field2:=1}; } + { vt_i := {field4:=1}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := {field1:=omit, field2:=omit}; } + { vt_i := {field2:="akarmi", field1:=1}; } + { vt_i := {1}; } + { vt_i := {1,2,3}; } + { vt_i := {-,-}; } + { vt_i := {field1:='00'O, field2:='00'B}; } + { vt_i := null; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := omit length(2..5); } +} + +function f_arrayValueTests() +{ + timer TL_t := 5.0; + var template myarrayType vt_i := omit; + + { vt_i := vt_i; } + { vt_i := {1,2,3}; } + + { vt_i := {1,2,3} length(3..3); } + + { vt_i := {1,2}; } + { vt_i := {1,2,3,4}; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := null; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := {1,2,3} length(2..5); } +} + +function f_functiontypeValueTest() runs on mycomponent +{ + timer TL_t := 5.0; + var template t_function vt_i := omit; + + { vt_i := refers(ef_c_ext_function); } + { vt_i := null; } + + { vt_i := {}; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field2:=1}; } + { vt_i := {field4:=1}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := {field1:=omit, field2:=omit}; } + { vt_i := {field2:="akarmi", field1:=1}; } + { vt_i := {1}; } + { vt_i := {1,2,3}; } + { vt_i := {-,-}; } + { vt_i := {field1:='00'O, field2:='00'B}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(tc_c_testcase); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := null length(2..5); } +} + +function f_altsteptypeValueTest() +{ + timer TL_t := 5.0; + var template t_altstep vt_i := omit; + + { vt_i := refers(as_c_altstep); } + { vt_i := null; } + { vt_i := vt_i; } + { vt_i := (null, refers(as_c_altstep)); } + + { vt_i := {}; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field2:=1}; } + { vt_i := {field4:=1}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := {field1:=omit, field2:=omit}; } + { vt_i := {field2:="akarmi", field1:=1}; } + { vt_i := {1}; } + { vt_i := {1,2,3}; } + { vt_i := {-,-}; } + { vt_i := {field1:='00'O, field2:='00'B}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(tc_c_testcase); } + { vt_i := null length(2..5); } +} + +function f_testcasetypeValueTest() +{ + timer TL_t := 5.0; + var template t_testcase vt_i := omit; + + { vt_i := refers(tc_c_testcase); } + { vt_i := null; } + { vt_i := vt_i; } + { vt_i := (null, refers(tc_c_testcase)); } + + { vt_i := {}; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field2:=1}; } + { vt_i := {field4:=1}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := {field1:=omit, field2:=omit}; } + { vt_i := {field2:="akarmi", field1:=1}; } + { vt_i := {1}; } + { vt_i := {1,2,3}; } + { vt_i := {-,-}; } + { vt_i := {field1:='00'O, field2:='00'B}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := null length(2..5); } +} + +function f_signatureTests() +{ + timer TL_t := 5.0; + var template mySignature vt_i := omit; + + { vt_i := vt_i; } + { vt_i := {Par1:=1, Par2:=1, Par3:=1}; } + { vt_i := {1, 1, 1}; } + { vt_i := ({Par1:=1, Par2:=1, Par3:=1}); } + { vt_i := ({1, 1, 1}); } + { vt_i := {Par1:=1, Par3:=1}; } + + { vt_i := ({1, 1}); } + { vt_i := ({}); } + { vt_i := ({Par1:=1, Par3:=1 ,Par3:=1, nonExi:=1}); } + { vt_i := ({Par1:=1, Par3:=1 ,Par2:=1}); } + { vt_i := ({1,"akarmi",3,4,5}); } + { vt_i := {1, 1}; } + { vt_i := {}; } + { vt_i := {Par1:=1, Par3:=1 ,Par3:=1}; } + { vt_i := {1,"akarmi",3,4,5}; } + { vt_i := (null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)); } + { vt_i := {field2:=1}; } + { vt_i := {field4:=1}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := {field1:=omit, field2:=omit}; } + { vt_i := {field2:="akarmi", field1:=1}; } + { vt_i := {1}; } + { vt_i := {-,-}; } + { vt_i := {field1:='00'O, field2:='00'B}; } + { vt_i := null; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := {1, 1, 1} length(2..5); } +} + +function f_ASNNullValueTests() +{ + timer TL_t := 5.0; + var template ASNNull vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := null length(2..5); } +} + +function f_ASNBMPstringValueTests() +{ + timer TL_t := 5.0; + var template ASNBMPstring vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := "akarmi" length(2..5); } +} + +function f_ASNGeneralstringValueTests() +{ + timer TL_t := 5.0; + var template ASNGeneralstring vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNGraphicstringValueTests() +{ + timer TL_t := 5.0; + var template ASNGraphicstring vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNIA5stringValueTests() +{ + timer TL_t := 5.0; + var template ASNIA5string vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNNumericstringValueTests() +{ + timer TL_t := 5.0; + var template ASNNumericstring vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNOctetStringValueTests() +{ + timer TL_t := 5.0; + var template ASNOctetString vt_i; + + { vt_i := 'aa'O; } + { vt_i := not4b 'aa'O; } + { vt_i := '00'O and4b '00'O; } + { vt_i := '00'O or4b '00'O; } + { vt_i := '00'O xor4b '00'O; } + { vt_i := '00'O << 1; } + { vt_i := '00'O >> 1; } + { vt_i := '1100'O <@ 1; } + { vt_i := '1100'O @> 1; } + { vt_i := '00'O & '00'O; } + { vt_i := bit2oct('00'B); } + { vt_i := char2oct("akarmi"); } + { vt_i := hex2oct('FF00'H); } + { vt_i := str2oct("0101"); } + { vt_i := int2oct(1,3); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := true; } + { vt_i := false; } + { vt_i := pass; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNISO646StringValueTests() +{ + timer TL_t := 5.0; + var template ASNISO646String vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNT61StringValueTests() +{ + timer TL_t := 5.0; + var template ASNT61String vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNPrintablestringValueTests() +{ + timer TL_t := 5.0; + var template ASNPrintablestring vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNTeletexstringValueTests() +{ + timer TL_t := 5.0; + var template ASNTeletexstring vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNUniversalstringValueTests() +{ + timer TL_t := 5.0; + var template ASNUniversalstring vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNUTF8stringValueTests() +{ + timer TL_t := 5.0; + var template ASNUTF8string vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNVideotexstringValueTests() +{ + timer TL_t := 5.0; + var template ASNVideotexstring vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNVisiblestringValueTests() +{ + timer TL_t := 5.0; + var template ASNVisiblestring vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNGeneralizedTimeValueTests() +{ + timer TL_t := 5.0; + var template ASNGeneralizedTime vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNUTCTimeValueTests() +{ + timer TL_t := 5.0; + var template ASNUTCTime vt_i; + + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := bit2str('00'B); } + { vt_i := float2str(5.5); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := regexp("akarmi","akarmi", 0); } + + { vt_i := omit; } + { vt_i := null; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := {1,2,3}; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := int2float(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNSetValueTests() +{ + timer TL_t := 5.0; + var template ASNSetType vt_i; + + { vt_i := {field1:=1, field2:="akarmi"}; } + { vt_i := {field1:=1}; } + + { vt_i := {}; } + { vt_i := {field2:=1}; } + { vt_i := {field3:=1}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := {1, "akarmi"}; } + { vt_i := {field1:='00'O, field2:='00'B}; } + { vt_i := omit; } + { vt_i := null; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNSequenceValueTests() +{ + timer TL_t := 5.5; + var template ASNSequenceType vt_i; + + { vt_i := {field1:=1, field2:="akarmi"}; } + { vt_i := {field1:=1, field2:="akarmi", field3:=omit}; } + { vt_i := {field1:=1}; } + + { vt_i := {}; } + { vt_i := {1,"akarmi",3,4,5}; } + { vt_i := {field2:=1}; } + { vt_i := {field4:=1}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := {field1:=omit, field2:=omit}; } + { vt_i := {field2:="akarmi", field1:=1}; } + { vt_i := {1}; } + { vt_i := {1,2,3}; } + { vt_i := {-,-}; } + { vt_i := {field1:='00'O, field2:='00'B}; } + { vt_i := omit; } + { vt_i := null; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_ASNChoiceValueTests() +{ + timer TL_t := 5.0; + var template ASNChoiceType vt_i; + + { vt_i := {field1:=1}; } + { vt_i := {field2:="akarmi"}; } + + { vt_i := {}; } + { vt_i := {1,"akarmi",3,4,5}; } + { vt_i := {field2:=1}; } + { vt_i := {field4:=1}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := {field1:=omit, field2:=omit}; } + { vt_i := {field2:="akarmi", field1:=1}; } + { vt_i := {1}; } + { vt_i := {1,2,3}; } + { vt_i := {-,-}; } + { vt_i := {field1:='00'O, field2:='00'B}; } + { vt_i := omit; } + { vt_i := null; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } +} + +function f_objValueTests() +{ + timer TL_t := 5.0; + var template myObjID vt_i; + + { vt_i := objid { 0 1 2}; } + { vt_i := objid { itu_t (0) 1 2 }; } + { vt_i := objid { itu_t recommendation 0}; } + { vt_i := objid { itu_t(0) recommendation (0) 0}; } + { vt_i := objid { itu_t(0) question (1) 0}; } + { vt_i := objid { itu_t(0) administration (2) 0}; } + { vt_i := objid { itu_t(0) network_operator (3) 0}; } + { vt_i := objid { itu_t(0) identified_organization (4) 0}; } + { vt_i := objid { itu_t(0) r_recommendation (5) 0}; } + { vt_i := objid { ccitt recommendation 0}; } + { vt_i := objid { ccitt(0) recommendation (0) 0}; } + { vt_i := objid { ccitt(0) question (1) 0}; } + { vt_i := objid { ccitt(0) administration (2) 0}; } + { vt_i := objid { ccitt(0) network_operator (3) 0}; } + { vt_i := objid { ccitt(0) identified_organization (4) 0}; } + { vt_i := objid { ccitt(0) r_recommendation (5) 0}; } + { vt_i := objid { iso(1) standard (0) 0}; } + { vt_i := objid { iso(1) regisztration_authority (1) 0}; } + { vt_i := objid { iso(1) member_body (2) 0}; } + { vt_i := objid { iso(1) identified_organization (3) 0}; } + { vt_i := objid { joint_iso_itu_t(2) presentation (0) 0}; } //joint__iso__ccitt + { vt_i := objid { joint_iso_itu_t(2) asn1 (1) 0}; } + { vt_i := objid { joint_iso_itu_t(2) association_control (2) 0}; } + { vt_i := objid { joint_iso_itu_t(2) reliable_transfer (3) 0}; } + { vt_i := objid { joint_iso_itu_t(2) remote_operations (4) 0}; } + { vt_i := objid { joint_iso_itu_t(2) ds (5) 0}; } + { vt_i := objid { joint_iso_itu_t(2) directory (5) 0}; } + { vt_i := objid { joint_iso_itu_t(2) mhs (6) 0}; } + { vt_i := objid { joint_iso_itu_t(2) mhs_motis (6) 0}; } + { vt_i := objid { joint_iso_itu_t(2) ccr (7) 0}; } + { vt_i := objid { joint_iso_itu_t(2) oda (8) 0}; } + { vt_i := objid { joint_iso_itu_t(2) ms (9) 0}; } + { vt_i := objid { joint_iso_itu_t(2) osi_management (9) 0}; } + { vt_i := objid { joint_iso_itu_t(2) transaction_processing (10) 0}; } + { vt_i := objid { joint_iso_itu_t(2) dor (11) 0}; } + { vt_i := objid { joint_iso_itu_t(2) distinguished_object_reference (11) 0}; } + { vt_i := objid { joint_iso_itu_t(2) reference_data_transfer (12) 0}; } + { vt_i := objid { joint_iso_itu_t(2) network_layer (13) 0}; } + { vt_i := objid { joint_iso_itu_t(2) network_layer_management (13) 0}; } + { vt_i := objid { joint_iso_itu_t(2) transport_layer (14) 0}; } + { vt_i := objid { joint_iso_itu_t(2) transport_layer_management (14) 0}; } + { vt_i := objid { joint_iso_itu_t(2) datalink_layer (15) 0}; } + { vt_i := objid { joint_iso_itu_t(2) datalink_layer_management (15) 0}; } + { vt_i := objid { joint_iso_itu_t(2) datalink_layer_management_information (15) 0}; } + { vt_i := objid { joint_iso_itu_t(2) country (16) 0}; } + { vt_i := objid { joint_iso_itu_t(2) registration_procedures (17) 0}; } + { vt_i := objid { joint_iso_itu_t(2) registration_procedure (17) 0}; } + { vt_i := objid { joint_iso_itu_t(2) physiscal_layer (18) 0}; } + { vt_i := objid { joint_iso_itu_t(2) physical_layer_management (18) 0}; } + { vt_i := objid { joint_iso_itu_t(2) mheg (19) 0}; } + { vt_i := objid { joint_iso_itu_t(2) genericULS (20) 0}; } + { vt_i := objid { joint_iso_itu_t(2) generic_upper_layer_security (20) 0}; } + { vt_i := objid { joint_iso_itu_t(2) guls (20) 0}; } + { vt_i := objid { joint_iso_itu_t(2) transport_layer_security_protocol (21) 0}; } + { vt_i := objid { joint_iso_itu_t(2) network_layer_security_protocol (22) 0}; } + { vt_i := objid { joint_iso_itu_t(2) international_organisations (23) 0}; } + { vt_i := objid { joint_iso_itu_t(2) internationalRA (23) 0}; } + { vt_i := objid { joint_iso_itu_t(2) sios (24) 0}; } + { vt_i := objid { joint_iso_itu_t(2) uuid (25) 0}; } + { vt_i := objid { joint_iso_itu_t(2) odp (26) 0}; } + { vt_i := objid { joint_iso_itu_t(2) upu (40) 0}; } + + { vt_i := objid { itu_t(0) identified_organization (4) etsi(0) reserved(127) + etsi_identified_organization(0) ericsson(5) + testing (0) generic(0) sccp(1) v3(3) typeDefinitions(2) patchNo(3) + }; } + { vt_i := objid {iso(1) member_body(2) bsi(826) disc(0) ericsson(1249)}; } + + { vt_i := objid { itu_r r_recommendation 0}; } + { vt_i := objid { joint_iso_itu_t presentation 0}; } + { vt_i := objid { itu_t(1) recommendation (0) 0}; } + { vt_i := objid { ccitt(1) recommendation (0) 0}; } + { vt_i := objid { iso(0) standard (0) 0}; } + { vt_i := objid { joint_iso_itu_t(0) presentation (0) 0}; } + { vt_i := objid { joint_iso_ccitt(0) presentation (0) 0}; } + + { vt_i := objid { TL_t recommendation (0) 0}; } + { vt_i := objid { 99999999999999999 recommendation (0) 0}; } + { vt_i := objid { 3 recommendation (0) 0}; } + { vt_i := objid { itu_t(1) 39 0}; } + { vt_i := objid { iso(0) 39 0}; } + { vt_i := omit; } + { vt_i := {null, omit, '00'B, '00'H, '00'O, true, "akarmi", 5, 5.5, char(0,0,0,0)}; } + { vt_i := {field1:=1, field1:="akarmi"}; } + { vt_i := null; } + { vt_i := xx4; } + { vt_i := true; } + { vt_i := false; } + { vt_i := not false; } + { vt_i := vt_i; } + { vt_i := 5; } + { vt_i := 5.5; } + { vt_i := "akarmi"; } + { vt_i := char(0,0,0,0); } + { vt_i := 'aa'H; } + { vt_i := '00'B; } + { vt_i := 5 * 5; } + { vt_i := 5 + 5; } + { vt_i := 5 - 5; } + { vt_i := 5 / 5; } + { vt_i := 5 mod 5; } + { vt_i := 5 rem 5; } + { vt_i := true and true; } + { vt_i := true or true; } + { vt_i := not4b 'aa'H; } + { vt_i := not4b '00'B; } + { vt_i := '00'B and4b '00'B; } + { vt_i := '00'H and4b '00'H; } + { vt_i := '00'B or4b '00'B; } + { vt_i := '00'H or4b '00'H; } + { vt_i := '00'B xor4b '00'B; } + { vt_i := '00'H xor4b '00'H; } + { vt_i := '00'B << 1; } + { vt_i := '00'H << 1; } + { vt_i := '00'B >> 1; } + { vt_i := '00'H >> 1; } + { vt_i := '00'B <@ 1; } + { vt_i := '00'H <@ 1; } + { vt_i := '00'B @> 1; } + { vt_i := '00'H @> 1; } + { vt_i := '00'B & '00'B; } + { vt_i := '00'H & '00'H; } + { vt_i := "akarmi" & "akarmi2"; } + { vt_i := 5 == 5; } + { vt_i := 5 != 5; } + { vt_i := 5 < 5; } + { vt_i := 5 > 5; } + { vt_i := 5 <= 5; } + { vt_i := 5 >= 5; } + { vt_i := bit2hex('00'B); } + { vt_i := bit2int('00'B); } + { vt_i := bit2oct('00'B); } + { vt_i := bit2str('00'B); } + { vt_i := char2int("5"); } + { vt_i := char2oct("akarmi"); } + { vt_i := float2int( 5.5); } + { vt_i := float2str(5.5); } + { vt_i := hex2int('FF'H); } + { vt_i := hex2oct('FF00'H); } + { vt_i := hex2str('FF00'H); } + { vt_i := int2char(5); } + { vt_i := int2float(5); } + { vt_i := int2str(5); } + { vt_i := int2unichar(5); } + { vt_i := oct2bit('00FF'O); } + { vt_i := oct2char('0F'O); } + { vt_i := oct2hex('0F'O); } + { vt_i := oct2int('0F'O); } + { vt_i := oct2str('0F'O); } + { vt_i := str2bit("0101"); } + { vt_i := str2float("5.5"); } + { vt_i := str2hex("0101"); } + { vt_i := str2int("5"); } + { vt_i := str2oct("0101"); } + { vt_i := unichar2int(char(0,0,0,0)); } + { vt_i := unichar2char(char(0,0,0,0)); } + { vt_i := int2bit(1,3); } + { vt_i := int2hex(1,3); } + { vt_i := int2oct(1,3); } + { vt_i := rnd(); } + { vt_i := rnd(5.5); } + { vt_i := isbound(5.5); } + { vt_i := isvalue(5.5); } + { vt_i := lengthof("akarmi"); } + { vt_i := sizeof(cg_recordof); } + { vt_i := regexp("akarmi","akarmi", 0); } + { vt_i := match(5,5); } + { vt_i := mtc; } + { vt_i := system; } + { vt_i := self; } + { vt_i := any component . running; } + { vt_i := all component . running; } + { vt_i := any component . alive; } + { vt_i := all component . alive; } + { vt_i := any timer . running; } + { vt_i := f_comp_return().running; } + { vt_i := f_comp_return().alive; } + { vt_i := TL_t.read; } + { vt_i := mycomponent.create; } + { vt_i := activate(temp_altstep()); } + { vt_i := activate(derefers(temp_altstep_pointer)()); } + { vt_i := execute(temp_altstep(), 5); } + { vt_i := execute(derefers(temp_altstep_pointer)(),5); } + { vt_i := refers(f_functiontypeValueTest); } + { vt_i := refers(ef_c_ext_function); } + { vt_i := refers(as_c_altstep); } + { vt_i := refers(tc_c_testcase); } + { vt_i := {[TL_t] := 0, [-1] := 1, [1] := 1, [1] := 5, [99999999999999999] := 1}; } + { vt_i := {[0] := 0, [1] := 1, [5] := 5} } +} + +} // end of module diff --git a/Semantic_Analizer_Tests/src/Basic_tests/template_formalparlist_tests.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/template_formalparlist_tests.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3a4a26df8605fa89b1822a9b4570696a463f5b50 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/template_formalparlist_tests.ttcn @@ -0,0 +1,100 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module template_formalparlist_tests { + +type component Empty { timer T_T := 1.0 } + +type record MyRec { + integer f1, + integer f2 +} + +const integer cg_int := 5; + +template integer t_integer_descriptiveName(integer pl_x, integer pl_y, integer pl_z) := *; + +template integer t_integer_descriptiveName2 +modifies cg_int := *; + +template integer t_integer_descriptiveName3(template boolean pl_z) +modifies t_integer_descriptiveName := *; + +template integer t_integer_descriptiveName4 +modifies t_integer_descriptiveName4 := *; + +/////////////////// +// For ETSI CR5091. +/////////////////// +template MyRec t_MyTemp1(integer pl_p1, integer pl_p2 := 1) := { + f1 := pl_p1, + f2 := pl_p2 +} +// Correct. +template MyRec t_MyTemp(integer pl_p1, integer pl_p2 := -) modifies t_MyTemp1 := { + f1 := pl_p1, + f2 := pl_p2 +} +// No default parameter for "p1" in the base template. +template MyRec t_MyTemp2(integer pl_p1 := -, integer pl_p2 := -) modifies t_MyTemp1 := { + f1 := pl_p1, + f2 := pl_p2 +} +// Too many parameters. +template MyRec t_MyTemp3(integer pl_p1, integer pl_p2, integer pl_p3 := -) modifies t_MyTemp1 := { + f1 := pl_p1, + f2 := pl_p2 +} +// Base templates. +template MyRec t_MyTemp4(integer pl_p1 := -, integer pl_p2 := -) := { + f1 := pl_p1, + f2 := pl_p2 +} +template MyRec t_MyTTemp1(template integer pl_p1, template integer pl_p2 := 1) := { + f1 := pl_p1, + f2 := pl_p2 +} +template MyRec t_MyTTemp2(template integer pl_p1 := -, template integer pl_p2 := -) modifies t_MyTTemp1 := { + f1 := pl_p1, + f2 := pl_p2 +} +template MyRec t_MyTTemp3(template integer pl_p1, template integer pl_p2, template integer pl_p3 := -) modifies t_MyTTemp1 := { + f1 := pl_p1, + f2 := pl_p2 +} +template MyRec t_MyTTemp4(template integer pl_p1 := -, template integer pl_p2 := -) := { + f1 := pl_p1, + f2 := pl_p2 +} +template MyRec t_MyT_all_default(template integer pl_1 := 0, template integer pl_2 := 1) := { + f1 := pl_1, + f2 := pl_2 +} + +testcase TC1(in integer pl_p1 := -) runs on Empty { } +testcase TC2(in template integer pl_p1 := -) runs on Empty { } + +function Func1(in integer pl_p1 := -) { } +function Func2(in template integer pl_p1 := -) { } + +altstep Alt1(in integer pl_p1 := -) runs on Empty { [1 > 2] T.timeout { } } +altstep Alt2(in template integer pl_p1 := -) runs on Empty { [1 > 2] T.timeout { } } + +function f_parenthesisLessTests() { + {var template MyRec vt := t_MyT_all_default(1,2);} + {var template MyRec vt := t_MyT_all_default();} + {var template MyRec vt := t_MyT_all_default;} + + {var template MyRec vt := t_MyTTemp1();} + {var template MyRec vt := t_MyTTemp1;} +} +} // end of module diff --git a/Semantic_Analizer_Tests/src/Basic_tests/template_specific_test.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/template_specific_test.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e58cb0d18a32fa72f3ef2a599520c6baa9d43f00 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/template_specific_test.ttcn @@ -0,0 +1,275 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +/* +//AUTHOR: +//DATE: +//VERSION: +*/ +module template_specific_test +// [.objid{ itu_t(0) identified_organization(4) etsi(0) +// identified_organization(127) ericsson(5) testing(0) +// }] +{ +type set of integer mysetofType; +type record of integer myrecordofType; +type integer Array[2 .. 4][3 .. 5]; + +type record myrecordType { + integer field1, + integer field2 +}; +type set mysetType { + integer field1, + integer field2 +}; +type union myunionType +{ + integer field1, + charstring field2 +}; + +type objid myObjID; +type component mycomponent{}; +type port testPort message +{ + inout integer; +} +signature S_ProvedureSignatureID( ) +return integer; + +type function t_function(); +type altstep t_altstep(); +type testcase t_testcase() runs on mycomponent system mycomponent; + +template integer t_recursiveTemplate1 := t_recursiveTemplate1; +template myrecordType t_recursiveTemplate2 := {field1 := t_recursiveTemplate2.field1, field2 := 2}; +template mysetType t_recursiveTemplate3 := {field1 := t_recursiveTemplate3.field1, field2 := 2}; +template myrecordofType t_recursiveTemplate4 := {t_recursiveTemplate4[0]}; +template myrecordofType t_recursiveTemplate5 := { [0] := t_recursiveTemplate5[0]}; +template myrecordofType t_recursiveTemplate6 := { [0] := t_recursiveTemplate5[1]}; + +function f_valuerangeTemplateTest() +{ + { template integer t_i := (1 .. 2); } + { template integer t_i := (-infinity .. infinity); } + { template float t_i := (1.0 .. 2.0); } + { template float t_i := (-infinity .. infinity); } + { template charstring t_i := ("a" .. "b"); } + { template universal charstring t_i := ("a" .. "b"); } + + { template integer t_i := (9999999999 .. 9999999999); } + { template integer t_i := ("akarmi".."barmi"); } + { template float t_i := ("akarmi".."barmi"); } + { template charstring t_i := (1 .. 2); } + { template universal charstring t_i := (1 .. 2); } + + { template integer t_i := (1..-2); } + { template integer t_i := (infinity .. -infinity); } + { template float t_i := (1.0 .. -2.0); } + { template float t_i := (infinity .. -infinity); } + { template charstring t_i := ("b" .. "a"); } + { template universal charstring t_i := ("b" .. "a"); } + { template charstring t_i := ("aa" .. "bb"); } + { template universal charstring t_i := ("aa" .. "bb"); } + { template charstring t_i := (-infinity .. infinity); } + { template universal charstring t_i := (-infinity .. infinity); } +} + +function f_lengthrestrictionTemplateTest() +{ +{ template bitstring t_i := ''B length(4 .. 5); } +{ template bitstring t_i := '0011'B length(1 .. 2); } +{ template hexstring t_i := ''H length(4 .. 5); } +{ template hexstring t_i := '0011'H length(1 .. 2); } +{ template octetstring t_i := ''O length(4 .. 5); } +{ template octetstring t_i := '001122'O length(1 .. 2); } +{ template charstring t_i := "" length(4 .. 5); } +{ template charstring t_i := "akarmi" length(1 .. 2); } + +{ template boolean t_i := true length(4 .. 5); } +{ template integer t_i := 5 length(4 .. 5); } +{ template float t_i := 5.0 length(4 .. 5); } +{ template t_function t_i := null length(4 .. 5); } +{ template t_altstep t_i := null length(4 .. 5); } +{ template t_testcase t_i := null length(4 .. 5); } +{ template mycomponent t_i := null length(4 .. 5); } +{ template default t_i := null length(4 .. 5); } +{ template myObjID t_i := objid { 0 1 2} length(4 .. 5); } +{ template testPort t_i := * length(4 .. 5); } +{ template S_ProvedureSignatureID t_i := * length(4 .. 5); } +{ template verdicttype t_i := pass length(4 .. 5); } +} + +function f_stringpatternTests(){ + { template bitstring t_i := '0*'B;} + { template hexstring t_i := '00'H;} + { template octetstring t_i := '00'O;} + { template charstring t_i := "akarmi";} +} + +function f_template_indexing_test( ) +{ +template charstring t_charstring_good := "temp"; +template charstring t_charstring_bad := t_charstring_good[1]; + +template mysetofType t_setof_good := subset(1, 2); +template mysetofType t_setof_good2 := {1, 2}; +template integer t_setof_good3 := t_setof_good2[1]; +template integer t_setof_bad := t_setof_good[""]; +template integer t_setof_bad2 := t_setof_good[1]; +template integer t_setof_bad3 := t_setof_good2[-1]; +template integer t_setof_bad4 := t_setof_good2[10]; + +template myrecordofType t_recordof_good := {1, 2, permutation(3,4)}; +template myrecordofType t_recordof_good2 := {1, 2}; +template integer t_recordof_good3 := t_recordof_good2[1]; +template integer t_recordof_bad := t_recordof_good2[""]; +template integer t_recordof_bad2 := t_recordof_good2[-1]; +template integer t_recordof_bad3 := t_recordof_good2[10]; + +template Array t_array_good := {{3,4,5}, {3,4,5}, {3,4,5}}; +template integer t_array_bad := t_array_good[""][""]; +template integer t_array_bad2 := t_array_good[0][0]; +template integer t_array_bad3 := t_array_good[10][10]; +} + +function f_template_fieldreference_test( ) +{ +template charstring t_charstring_good := "temp"; +template charstring t_charstring_bad2 := t_charstring_good.field1; + +template myrecordType t_record_good := {1, 2}; +template integer t_record_good2 := t_record_good.field1; +template integer t_record_bad := t_record_good.field3; + +template mysetType t_set_good := { field1 := 1, field2 := 2}; +template integer t_set_good2 := t_set_good.field1; +template integer t_set_bad := t_set_good.field3; + +template myunionType t_union_good := { field1 := 1}; +template integer t_union_good2 := t_union_good.field1; +template integer t_union_bad := t_union_good.field3; +template charstring t_union_bad2 := t_union_good.field2; +} + +type record LValueTestHelper +{ + integer field1, + integer field2 +}; + + +template LValueTestHelper t_LValueTest ( +in integer pl_parameter1, +in template integer pl_parameter2) := +{ + field1 := f_templateParameterTestHelper(pl_parameter1, pl_parameter1, pl_parameter1), + field2 := f_templateParameterTestHelper(pl_parameter2, pl_parameter2, pl_parameter2) +} + +function f_templateParameterTestHelper (in template integer pl_par1, out template integer pl_par2, inout template integer pl_par3) return integer { + return 5; +} + +// test for TR HL65533 +function f_HL65533( ) +return template myrecordType +{ + template myrecordType t_i := f_HL65533(); + template myrecordType t_i2 := {t_i.field1, t_i.field2}; + return t_i; +} + +type record rec_HM93170 { +integer f1, +float f2, +charstring f3, +integer f4, +integer f5 +} + +template rec_HM93170 temp_HM93170_1:= { f1:= temp_HM93170_2.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= temp_HM93170_1.f1 }; +template rec_HM93170 temp_HM93170_2:= { f1:= temp_HM93170_2.f4, f2:= 1.1, f3:= "ERIXON", f4:= temp_HM93170_1.f5, f5:= 2 }; + +template charstring tcs := "doggee" +template bitstring tbs := '11001100'B +template hexstring ths := 'AABBCCDDEEFF'H +template octetstring tos := 'AABBCCDD'O +template universal charstring tus := char(0, 0, 0, 75) & char(0, 0, 0, 65) + +function fsi_charstrings(in template charstring vtc) {} +function fsi_bitstrings(in template bitstring vtb) {} +function fsi_hexstrings(in template hexstring vth) {} +function fsi_octetstrings(in template octetstring vto) {} +function fsi_universal_charstrings(in template universal charstring vtu) {} + +function f_CR_TR00018474() +{ + { + // charstrings + var template charstring vtc := "fisherman" + vtc[0] := vtc[1] + vtc[0] := tcs[1] + tcs[0] := "D" + vtc[0] := * + vtc[0] := ? + fsi_charstrings(vtc[0]) + } + + { + // bitstrings + var template bitstring vtb := '0011110000'B + vtb[0] := vtb[1] + vtb[0] := tbs[1] + tbs[0] := '1'B + vtb[0] := * + vtb[0] := ? + vtb[0] := '*'B + vtb[1] := '?'B + fsi_bitstrings(vtb[0]) + } + + { + // hexstrings + var template hexstring vth := 'AABBCCDDEE'H + vth[0] := vth[1] + vth[0] := ths[1] + ths[0] := 'B'H + vth[0] := * + vth[0] := ? + vth[0] := '*'H + vth[1] := '?'H + fsi_hexstrings(vth[0]) + } + + { + // octetstrings + var template octetstring vto := 'ABBAABBA'O + vto[0] := vto[1] + vto[0] := tos[1] + tos[0] := 'BB'O + vto[0] := * + vto[0] := ? + vto[0] := '*'O + vto[1] := '?'O + fsi_octetstrings(vto[0]) + } + + { + // universal charstrings + var template universal charstring vtu := "fisherman" + vtu[0] := vtu[1] + vtu[0] := tus[1] + tus[0] := "F" + vtu[0] := * + vtu[0] := ? + fsi_universal_charstrings(vtu[0]) + } +} + +} // end of module diff --git a/Semantic_Analizer_Tests/src/Basic_tests/templates/all_from/positive/all_from.ttcn b/Semantic_Analizer_Tests/src/Basic_tests/templates/all_from/positive/all_from.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8c1a48533277331fa96c23f9e914248605413d48 --- /dev/null +++ b/Semantic_Analizer_Tests/src/Basic_tests/templates/all_from/positive/all_from.ttcn @@ -0,0 +1,1344 @@ +/****************************************************************************** + * Copyright (c) 2000-2014 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************/ +module all_from { // ETSI CR 6088 +import from types all; +import from functions all; +import from imported_templates all; + +//just to test these types as well: +modulepar RoI tsp_RoI3 := {20,21,22}; +modulepar RoI tsp_SoI3 := {20,21,22}; + +const RoI c_RoI3 := {20,21,22}; +const SoI c_SoI3 := {20,21,22}; + +// Test Target: +// ETSI ES 201 873-1 v?.? +// B 1.2.1 Template List +//"It can be used on values of all types" + +//============Record of Integer============================ +template RoI t_RoI1 := {1, 2, (6..9)}; +template RoI t_RoI2 := {1, *, 3}; +template RoI t_RoI3 := {20,21,22}; +template RoI t_RoI4 := {1, ?, 3}; + +template integer t_i0 := (all from t_RoI1); // TODO here we had a problem +template integer t_i0_eq := (1, 2, (6..9)); + +template integer t_i1 := (all from t_RoI1, 100); +template integer t_i1_eq := (1, 2, (6..9), 100); + +template integer t_i2 := (-1,0,all from t_RoI1, 100); +template integer t_i2_eq:=(-1,0,1, 2, (6..9),100); + +template integer t_i3 := (-1,0,all from t_RoI1, all from t_RoI3, 100); +template integer t_i3_eq := (-1,0,1, 2, (6..9), 20,21,22, 100); + +template integer t_i4 := (-1,0,all from t_RoI1, 100, all from t_RoI3); +template integer t_i4_eq := (-1,0,1, 2, (6..9),100,20,21,22); + +template integer t_i5 := (-1,0,all from t_RoI1, 100,all from t_RoI3,all from t_RoI3 ); //repetition +template integer t_i5_eq := (-1,0,1, 2, (6..9),100,20,21,22,20,21,22); + +template integer t_i6 := (-1,0,all from t_RoI1, 100, all from t_RoI3,all from t_RoI3,all from t_RoI3); //repetition +template integer t_i6_eq := (-1,0,1, 2, (6..9),100,20,21,22,20,21,22,20,21,22); + +template integer t_i7 := (all from t_RoI4,100); +template integer t_i7_eq := (1,?,3,100); + +template integer t_i8 := (100,all from t_RoI4); +template integer t_i8_eq := (100,1,?,3); + +template integer t_i9 := (100,all from t_RoI4,-1); +template integer t_i9_eq := (100,1,?,3,-1); +//NEG TEST: template integer t_i10 := ((all from t_RoI2),100); //<== WHY not if the previous three accepted? +//NEG TEST: template integer t_i11 := (100,all from t_RoI2); +//NEG TEST: template integer t_i12 := (100,all from t_RoI2,-1); + +//from modulepar: +template integer t_i13roi := (all from tsp_RoI3); +template integer t_i13_eq := (20,21,22); +template integer t_i13soi := (all from tsp_SoI3); + +//from const: +template integer t_i13roi_c := (all from c_RoI3); +template integer t_i13soi_c := (all from c_SoI3); + + +//=== All from referring remote templates (imported templates) +template integer t_importing_i0 := (all from t_imported_RoI1); +template integer t_importing_i1 := (all from t_imported_RoI1, 100); +template integer t_importing_i2 := (-1,0,all from t_imported_RoI1, 100); +template integer t_importing_i3 := (-1,0,all from t_imported_RoI1, all from t_imported_RoI3, 100); +template integer t_importing_i4 := (-1,0,all from t_imported_RoI1, 100, all from t_imported_RoI3); +template integer t_importing_i5 := (-1,0,all from t_imported_RoI1, 100,all from t_imported_RoI3,all from t_imported_RoI3 ); //repetition +template integer t_importing_i6 := (-1,0,all from t_imported_RoI1, 100, all from t_imported_RoI3,all from t_imported_RoI3,all from t_imported_RoI3); //repetition +template integer t_importing_i7 := (all from t_imported_RoI4,100); +template integer t_importing_i8 := (100,all from t_imported_RoI4); +template integer t_importing_i9 := (100,all from t_imported_RoI4,-1); + + +//===========Set of Integer================================ +template SoI t_SoI1 := {1,2,(6..9)}; +template SoI t_SoI2 := {1, *, 3}; +template SoI t_SoI3 := {20,21,22}; + +template integer t_i0s := (all from t_SoI1); +template integer t_i0s_eq := ( 1,2,(6..9)); + +template integer t_i1s := (all from t_SoI1, 100); +template integer t_i1s_eq := ( 1,2,(6..9),100); +// equivalent to (1, 2, (6..9) , 100); + +template integer t_i2s := (-1,0,all from t_SoI1, 100); +template integer t_i2s_eq:=(-1,0,1,2,(6..9), 100); + +template integer t_i3s := (-1,0,all from t_SoI1, all from t_SoI3, 100); +template integer t_i3s_eq := (-1,0,1,2,(6..9),20,21,22, 100); + +template integer t_i4s := (-1,0,all from t_SoI1, 100, all from t_SoI3); +template integer t_i4s_eq := (-1,0,1,2,(6..9),100,20,21,22); + +template integer t_i5s := (-1,0,all from t_imported_SoI1, 100, all from t_imported_SoI3,all from t_imported_SoI3 ); //repetition +template integer t_i5s_eq := (-1,0,1,2,(6..9),100,20,21,22,20,21,22); + +template integer t_i6s := (-1,0,all from t_imported_SoI1, 100, all from t_imported_SoI3,all from t_imported_SoI3,all from t_imported_SoI3); //repetition +template integer t_i6s_eq := (-1,0,1,2,(6..9),100,20,21,22,20,21,22,20,21,22); + +template integer t_importing_i0s := (all from t_imported_SoI1); +template integer t_importing_i1s := (all from t_imported_SoI1, 100); +template integer t_importing_i2s := (-1,0,all from t_imported_SoI1, 100); +template integer t_importing_i3s := (-1,0,all from t_imported_SoI1, all from t_imported_SoI3, 100); +template integer t_importing_i4s := (-1,0,all from t_imported_SoI1, 100, all from t_imported_SoI3); +template integer t_importing_i5s := (-1,0,all from t_imported_SoI1, 100, all from t_imported_SoI3,all from t_imported_SoI3 ); //repetition +template integer t_importing_i6s := (-1,0,all from t_SoI1, 100, all from t_SoI3,all from t_SoI3,all from t_SoI3); //repetition + +//===========Record of of charstring================================ +template RoCS t_RoCS1 := { "apple","banana","","pear"}; +template RoCS t_RoCS2 := { "apples","bananas","","pears"}; +template charstring t_cs1 := ( all from t_RoCS1, "dog" ); +template charstring t_cs1_eq := ( "apple","banana","","pear", "dog" ); +template charstring t_cs2 := ( "treeeeeeeeeeeeee",all from t_RoCS1, "dog", all from t_RoCS2); +template charstring t_cs2_eq := ( "treeeeeeeeeeeeee","apple","banana","","pear", "dog","apples","bananas","","pears"); + +//===========Record of octetstring================================ +template RoOS t_RoOS1 := {'ABBA'O,'BABA'O,'FFFF'O,'00'O,'0B'O} +template octetstring t_os1 := ( all from t_RoOS1 ); +template octetstring t_os1_eq := ('ABBA'O,'BABA'O,'FFFF'O,'00'O,'0B'O) +template octetstring t_os2 := ( 'AA'O,all from t_RoOS1,all from t_RoOS1); + +//====== Embedded templates ==== +//Record +template MyRecord t_myrec1 := { i:= t_i1, roi:=t_RoI1, soi:=t_SoI1 } +template MyRecord t_myrec1_eq := { i:= t_i1_eq, roi:=t_RoI1, soi:={1,2,(6..9)} } + +template MyRecord t_myrec2 := { i:= t_i2, roi:=t_RoI1, soi:=t_SoI1 } +template MyRecord t_myrec2_eq := { i:= t_i2_eq, roi:=t_RoI1, soi:= {1,2,(6..9)}} + +template MyRecord t_myrec3 := { i:= t_i2, roi:={t_i0s,t_i1}, soi:=t_SoI1 } +template MyRecord t_myrec3_eq := { i:= t_i2_eq, roi:={( 1,2,(6..9)),(1, 2, (6..9), 100)}, soi:={1,2,(6..9)} } + +//Union +template MyUnion t_myunion1i := { i:= t_i1} +template MyUnion t_myunion1roi := { roi:={t_i1,t_i1}} +template MyUnion t_myunion1soi := { soi:={t_i1,t_i1}} + +template MyUnion t_myunion1i_eq := { i:= t_i1_eq} +template MyUnion t_myunion1roi_eq := { roi:= {(1, 2, (6..9)),(1, 2, (6..9))}} +template MyUnion t_myunion1soi_eq := { soi:= {(1, 2, (6..9)),(1, 2, (6..9))}} + +template MyUnion t_myunion2i := { i:= t_i2 } +template MyUnion t_myunion2roi := { roi:=t_RoI1 } +template MyUnion t_myunion2soi := { soi:=t_SoI1 } + +template MyUnion t_myunion2i_eq := { i:= t_i2_eq } +template MyUnion t_myunion2roi_eq := { roi:={1, 2,(6..9)} }; +template MyUnion t_myunion2soi_eq := { soi:= {1,2,(6..9)} }; + +template MyUnion t_myunion3 := { roi:={t_i0s,t_i1}} +template MyUnion t_myunion3_eq := {roi:={ ( 1,2,(6..9)),(1, 2, (6..9), 100)}} + +//Complex +template RoI t_roiComplex1 := { t_i0s, (all from t_SoI3) }; +template RoI t_roiComplex1_eq := { ( 1,2,(6..9)), (20,21,22)}; +template integer t_complex1 := (all from t_roiComplex1); +template integer t_complex1_eq := ( ( 1,2,(6..9)), (20,21,22)); + +//==== function reference ===== +template RoF_int2int t_rofref_int2int := { refers(f_int2int_1),refers(f_int2int_2) } +template F_int2int t_fref_int2int := ( all from t_rofref_int2int ); +template F_int2int t_fref_int2int_eq := ( refers(f_int2int_1),refers(f_int2int_2) ); + +//============== Test for Integer List ================================ + + +//----- Tests for static templates ------ + +//real static template, without any manipulation +testcase tc_checkIntegerValueListTemplate() runs on A +{ + var RoI vl_goodValues := { 1,2,6,7,8,9,100}; + action("t_i1=", t_i1, " will be checked against ",vl_goodValues); + var integer N:=sizeof(vl_goodValues); + for(var integer i:=0;i