Commit 70b4452e authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add test to shake the type checker

parent 52396ed5
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-c:
$(OPENGEODE) og.pr --toC
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc -equal
$(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
DataModel DEFINITIONS AUTOMATIC TAGS ::= BEGIN
TotoT3 ::= SEQUENCE { yy BOOLEAN }
TotoT1 ::= SEQUENCE {
a TotoT3
}
TotoT2 ::= CHOICE {
choice-a BOOLEAN,
choice-b CHOICE { one SEQUENCE { xx TotoT1 } }
}
END
SYSTEM NpalDsap;
/* CIF TEXT (57, 262), (445, 263) */
USE DataModel comment 'dataview-uniq.asn';
SIGNAL MyIn(TotoT1);
/* CIF ENDTEXT */
CHANNEL c
FROM ENV TO NpalDsap WITH MyIn;
ENDCHANNEL;
BLOCK NpalDsap;
SIGNALROUTE r
FROM ENV TO NpalDsap WITH MyIn;
CONNECT c AND r;
/* CIF PROCESS (250, 150), (150, 75) */
PROCESS NpalDsap;
/* CIF TEXT (0, 0), (380, 156) */
dcl test1 TotoT1;
dcl test2 TotoT2;
dcl toto TotoT1;
/* CIF ENDTEXT */
/* CIF STATE (414, 17), (83, 35) */
STATE TestState;
/* CIF INPUT (409, 72), (92, 35) */
INPUT MyIn(test1);
/* CIF TASK (391, 127), (127, 35) */
TASK test1 := { a toto };
/* CIF TASK (389, 182), (131, 35) */
TASK test1 := { a test2 };
/* CIF NEXTSTATE (420, 232), (70, 35) */
NEXTSTATE -;
ENDSTATE;
ENDPROCESS NpalDsap;
ENDBLOCK;
ENDSYSTEM;
\ No newline at end of file
Supports Markdown
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