Commit 4a87064c authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add timer test

parent 89e525cf
include ../shared.mk
ROOT_MODEL=test.pr
all: test-ada test-llvm
edit:
$(OPENGEODE) test.pr
test-parse:
$(OPENGEODE) test.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:
$(OPENGEODE) test.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview.asn
$(GNATMAKE) -O$(O) -c *.adb
$(GNATBIND) -n test.ali
gnat make test_ada.ada
simu:
$(OPENGEODE) test.pr --shared
./test_simu.sh
test-c:
$(OPENGEODE) test.pr --toC
mono $(ASN1SCC) -c -typePrefix asn1Scc -equal dataview.asn
$(CC) -O$(O) -c *.c
test-llvm:
$(OPENGEODE) test.pr --llvm -O$(O)
$(LLC) *.ll
$(CC) -O$(O) -c *.s
coverage:
coverage run -p $(OPENGEODE) test.pr --toAda
.PHONY: all edit test-parse test-ada test-llvm coverage simu
TASTE-Dataview DEFINITIONS ::=
BEGIN
Signed-Int ::= INTEGER (-1000..1000)
Unsigned-Int ::= INTEGER (0..100)
END
system test;
/* CIF TEXT (164, 303), (356, 219) */
-- Text area for declarations and comments
use datamodel comment 'dataview.asn';
signal blah;
/* CIF ENDTEXT */
channel c
from env to test with blah;
endchannel;
block test;
signalroute r
from env to test with blah;
connect c and r;
/* CIF PROCESS (202, 142), (150, 75) */
process test;
/* CIF TEXT (766, 271), (287, 140) */
timer toto;
dcl s Signed_Int := 10;
dcl us Unsigned_Int := 100;
/* CIF ENDTEXT */
/* CIF START (524, 139), (70, 35) */
START;
/* CIF NEXTSTATE (524, 194), (70, 35) */
NEXTSTATE wait;
/* CIF state (524, 194), (70, 35) */
state wait;
/* CIF input (524, 249), (70, 35) */
input blah;
/* CIF PROCEDURECALL (482, 304), (153, 35) */
call set_timer (100, toto);
/* CIF PROCEDURECALL (480, 359), (158, 35) */
call set_timer (-100, toto);
/* CIF PROCEDURECALL (484, 414), (150, 35) */
call set_timer (s, toto);
/* CIF PROCEDURECALL (488, 469), (142, 35) */
call set_timer(us, toto);
/* CIF NEXTSTATE (518, 524), (82, 35) */
NEXTSTATE timer_run;
endstate;
/* CIF state (642, 470), (81, 35) */
state timer_run;
/* CIF input (648, 525), (70, 35) */
input toto;
/* CIF NEXTSTATE (648, 580), (70, 35) */
NEXTSTATE wait;
endstate;
endprocess test;
endblock;
endsystem;
\ No newline at end of file
with text_io, test;
use text_io, test;
procedure test_ada is
begin
put_line ("hello");
test.blah;
end;
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