Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
cb9c88cd
Commit
cb9c88cd
authored
May 30, 2015
by
Maxime Perrotin
Browse files
Add test case
Test processes with FPAR section in the PR file
parent
bbf198a8
Changes
4
Hide whitespace changes
Inline
Side-by-side
tests/regression/test-processfpar1/Makefile
0 → 100644
View file @
cb9c88cd
include
../shared.mk
all
:
test-ada test-llvm
edit
:
$(OPENGEODE)
og.pr
test-parse
:
$(OPENGEODE)
og.pr
--check
test-ada
:
$(OPENGEODE)
og.pr
--toAda
$(ASN1SCC)
-Ada
dataview-uniq.asn
-typePrefix
asn1Scc
-equal
$(GNATMAKE)
-O
$(O)
-c
*
.adb
$(GNATBIND)
-n
og.ali
test-llvm
:
$(OPENGEODE)
og.pr
--llvm
-O
$(O)
$(LLC)
*
.ll
$(CC)
-O
$(O)
-c
*
.s
coverage
:
coverage run
-p
$(OPENGEODE)
og.pr
--toAda
.PHONY
:
all edit test-parse test-ada test-llvm coverage
tests/regression/test-processfpar1/README
0 → 100644
View file @
cb9c88cd
Test the proper parsing of a process with formal parameters, in the case where
the FPAR section is specified manually in the pr file. In that case the tool
renders a textbox with the FPAR section. Don't edit/save this model otherwise
the FPAR section will be saved as part of the rendered text box
tests/regression/test-processfpar1/dataview-uniq.asn
0 → 100644
View file @
cb9c88cd
TASTE-Dataview DEFINITIONS ::=
BEGIN
MyChoice ::= CHOICE {
a CHOICE {
b CHOICE {
c BOOLEAN,
d BOOLEAN
},
e BOOLEAN
},
f BOOLEAN
}
Some-Thing ::= MyInteger
MyInteger ::= INTEGER (0..255)
My-OctStr ::= OCTET STRING (SIZE (0..20))
SeqOf ::= SEQUENCE (SIZE(0..100)) OF MyInteger
Type1 ::= INTEGER(0..1)
Type2 ::= BOOLEAN
Toto ::= SEQUENCE { elem-1 Type1, elem-2 Type2 }
SeqBool ::= SEQUENCE(SIZE(1..5)) OF BOOLEAN
Enum ::= ENUMERATED {enum1}
default-seqof SeqOf ::= {4,7,9}
default-str My-OctStr ::= 'DEADBEEF'H
END
tests/regression/test-processfpar1/og.pr
0 → 100644
View file @
cb9c88cd
SYSTEM og;
/* CIF TEXT (159, 221), (287, 188) */
-- Text area for declarations and comments
use dv comment 'dataview-uniq.asn';
--use dv2 comment 'dataview2.asn';
signal dd(Type2);
signal we(Some_Thing);
procedure hehe;
fpar in/out a_param Type2;
external;
/* CIF ENDTEXT */
CHANNEL c
FROM ENV TO og WITH dd;
FROM og TO ENV WITH we;
ENDCHANNEL;
BLOCK og;
SIGNALROUTE r
FROM ENV TO og WITH dd;
FROM og TO ENV WITH we;
CONNECT c AND r;
/* CIF PROCESS (225, 49), (150, 75) */
PROCESS og;
fpar toto, titi Type2, tutu Some_Thing;
/* CIF TEXT (57, 58), (287, 140) */
-- Text area for declarations and comments
dcl haha SeqOf;
dcl hihi type2;
dcl test Some_Thing := 4;
/* CIF ENDTEXT */
/* CIF PROCEDURE (404, 228), (73, 35) */
PROCEDURE aProc;
/* CIF TEXT (542, 127), (287, 140) */
dcl tmp Some_Thing := 1;
/* CIF ENDTEXT */
/* CIF START (164, 113), (70, 35) */
START;
/* CIF OUTPUT (154, 163), (89, 35) */
OUTPUT we(test);
/* CIF OUTPUT (155, 213), (88, 35) */
OUTPUT we(tmp)
/* CIF COMMENT (263, 213), (269, 35) */
COMMENT 'check that local variables can be sent';
/* CIF RETURN (181, 263), (35, 35) */
RETURN ;
ENDPROCEDURE;
/* CIF PROCEDURE (439, 309), (70, 35) */
PROCEDURE haha
/* CIF COMMENT (529, 309), (184, 35) */
COMMENT 'same name as a variable';
ENDPROCEDURE;
/* CIF PROCEDURE (414, 353), (124, 35) */
PROCEDURE default_seqof
/* CIF COMMENT (558, 353), (189, 35) */
COMMENT 'same name as a constant';
ENDPROCEDURE;
/* CIF PROCEDURE (430, 404), (78, 35) */
PROCEDURE enum1
/* CIF COMMENT (528, 404), (206, 35) */
COMMENT 'same name as an enum item';
ENDPROCEDURE;
/* CIF START (155, 216), (70, 35) */
START;
/* CIF NEXTSTATE (155, 266), (70, 35) */
NEXTSTATE wait;
/* CIF STATE (296, 231), (70, 35) */
STATE wait;
/* CIF INPUT (289, 286), (84, 35) */
INPUT dd(hihi);
/* CIF PROCEDURECALL (281, 336), (100, 35) */
CALL hehe(hihi);
/* CIF OUTPUT (286, 386), (89, 35) */
OUTPUT we(test);
/* CIF PROCEDURECALL (296, 436), (70, 35) */
CALL haha;
/* CIF PROCEDURECALL (269, 486), (124, 35) */
CALL default_seqof;
/* CIF PROCEDURECALL (292, 536), (78, 35) */
CALL enum1;
/* CIF NEXTSTATE (296, 586), (70, 35) */
NEXTSTATE wait;
ENDSTATE;
ENDPROCESS og;
ENDBLOCK;
ENDSYSTEM;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment