Commit b0ba14df authored by Maxime Perrotin's avatar Maxime Perrotin

Add test case for the append operator

parent 1cb2e1e4
include ../shared.mk
ROOT_MODEL=og.pr
all: test-ada test-llvm
edit:
$(OPENGEODE) og.pr
test-parse:
$(OPENGEODE) og.pr --check
test-qgen-parse:
$(TESTQGEN_PARSE) $(ROOT_MODEL)
test-qgen-ada:
$(TESTQGEN_ADA) $(ROOT_MODEL)
test-qgen-c:
$(TESTQGEN_C) $(ROOT_MODEL)
test-qgen-gt-ada:
$(TESTQGEN_GT_ADA) $(ROOT_MODEL)
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada:
make -f Makefile.og
test-c:
$(OPENGEODE) og.pr --toC
mono $(ASN1SCC) -c -typePrefix asn1Scc -equal dataview-uniq.asn
$(CC) -O$(O) -c *.c
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
all:
gprbuild -p -P og.gpr # generate Ada code from the SDL model
gprbuild -p -P dataview_ada.gpr # generate Ada code from the ASN.1 model
gprbuild -p -P code/og_ada.gpr # build the Ada code
clean:
rm -rf obj code
\ No newline at end of file
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-T ::= ENUMERATED {enum1, enum2, enum3}
ForTheSakeOfIt ::= SEQUENCE (SIZE (2)) OF Enum-T
default-seqof SeqOf ::= {4,7,9}
default-str My-OctStr ::= 'DEADBEEF'H
END
system og;
/* CIF TEXT (159, 221), (290, 200) */
-- 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;
/* CIF TEXT (74, 125), (321, 173) */
dcl foo, bar SeqBool;
dcl idx myinteger := 3;
/* CIF ENDTEXT */
/* CIF START (556, 221), (70, 35) */
START;
/* CIF task (470, 276), (242, 38) */
task foo := { true, false},
bar := {false, true, true, false, false};
/* CIF task (503, 334), (176, 35) */
task foo := foo // bar (0, idx - 1);
/* CIF NEXTSTATE (556, 384), (70, 35) */
NEXTSTATE wait;
/* CIF state (826, 332), (70, 35) */
state wait;
endstate;
endprocess og;
endblock;
endsystem;
\ No newline at end of file
[General]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\x1\x10\0\0\0@\0\0\a2\0\0\x3\xd8\0\0\x1\x13\0\0\0]\0\0\a/\0\0\x3\xd5\0\0\0\0\0\0)
windowState="@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x2\0\0\0\x1\0\0\x2,\0\0\x2\x99\xfc\x2\0\0\0\x1\xfc\0\0\0\x35\0\0\x2\x99\0\0\0y\x1\0\0\x15\xfa\0\0\0\0\x2\0\0\0\x2\xfb\0\0\0\x1c\0\x64\0\x61\0t\0\x61\0t\0y\0p\0\x65\0s\0_\0\x64\0o\0\x63\0k\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\x63\0\xff\xff\xff\xfb\0\0\0\x1a\0\x64\0\x61\0t\0\x61\0\x64\0i\0\x63\0t\0_\0\x64\0o\0\x63\0k\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\x63\0\xff\xff\xff\0\0\0\x3\0\0\x5\xef\0\0\0\x8c\xfc\x1\0\0\0\x1\xfb\0\0\0\xe\0m\0s\0g\0\x44\0o\0\x63\0k\x1\0\0\0.\0\0\x5\xef\0\0\0\x46\0\a\xff\xff\0\0\x3\xbd\0\0\x2\x99\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x2\0\0\0\0\0\0\0\x1\0\0\0\x16\0S\0\x44\0L\0 \0T\0o\0o\0l\0\x62\0\x61\0r\x3\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x2\0\0\0\x1\0\0\0\x18\0\x46\0i\0l\0\x65\0 \0T\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0)"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment