Commit 927a5b69 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Complement test case

parent 4a87064c
......@@ -28,8 +28,8 @@ test-qgen-gt-c:
test-ada:
$(OPENGEODE) test.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal dataview.asn
$(GNATMAKE) -O$(O) -c *.adb
$(GNATBIND) -n test.ali
cp toto_timer.adasource toto_timer.ads
cp toto_timer.adabody toto_timer.adb
gnat make test_ada.ada
simu:
......
TASTE-Dataview DEFINITIONS ::=
BEGIN
T-UInt32 ::= INTEGER (0..65535)
Signed-Int ::= INTEGER (-1000..1000)
Unsigned-Int ::= INTEGER (0..100)
......
......@@ -25,6 +25,13 @@ system test;
START;
/* CIF NEXTSTATE (524, 194), (70, 35) */
NEXTSTATE wait;
/* 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;
/* CIF state (524, 194), (70, 35) */
state wait;
/* CIF input (524, 249), (70, 35) */
......@@ -33,20 +40,11 @@ system test;
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) */
/* CIF PROCEDURECALL (488, 414), (142, 35) */
call set_timer(us, toto);
/* CIF NEXTSTATE (518, 524), (82, 35) */
/* CIF NEXTSTATE (518, 469), (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;
with text_io, test, taste_dataview, ada.real_time, toto_timer;
use text_io, test, taste_dataview, ada.real_time;
procedure test_ada is
begin
......
with Ada.Real_Time;
use Ada.Real_Time;
package body Toto_Timer is
procedure Set_Toto (Dur : asn1SccT_UInt32) is
begin
delay To_Duration (Milliseconds (Integer(Dur)));
end Set_Toto;
end Toto_Timer;
with Taste_Dataview;
use Taste_Dataview;
package Toto_Timer is
procedure Set_Toto (Dur : asn1SccT_UInt32)
with Export, Convention => C, Link_Name => "test_RI_set_toto";
end Toto_Timer;
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