Commit 5e2621cc authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update testcase

parent 506c8d08
......@@ -28,9 +28,10 @@ test-qgen-gt-c:
test-ada:
$(OPENGEODE) test.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal *.asn
cp toto_timer.adasource toto_timer.ads
cp toto_timer.adabody toto_timer.adb
gnat make test_ada.ada
cp toto_timer.adasource test_ri.ads
cp toto_timer.adabody test_ri.adb
gnat make test_ada.ada -Iboards/x86 -Isrc -Iasn1rtl
./test_ada
simu:
$(OPENGEODE) test.pr --shared
......
......@@ -25,26 +25,28 @@ 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) */
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 (488, 414), (142, 35) */
/* CIF PROCEDURECALL (488, 359), (142, 35) */
call set_timer(us, toto);
/* CIF NEXTSTATE (518, 469), (82, 35) */
/* CIF PROCEDURECALL (488, 414), (142, 35) */
call writeln ('set timer');
/* CIF NEXTSTATE (518, 464), (82, 35) */
NEXTSTATE timer_run;
endstate;
/* CIF state (641, 470), (81, 35) */
state timer_run;
/* CIF input (648, 525), (70, 35) */
input toto;
/* CIF PROCEDURECALL (602, 580), (161, 35) */
call writeln('timer expired');
/* CIF NEXTSTATE (648, 635), (70, 35) */
NEXTSTATE wait;
endstate;
endprocess test;
endblock;
endsystem;
\ No newline at end of file
with text_io, test, taste_dataview, ada.real_time, toto_timer;
with text_io, test, taste_dataview, ada.real_time;
use text_io, test, taste_dataview, ada.real_time;
procedure test_ada is
......
-- This file is a stub for the implementation of the required interfaces
-- It is normally overwritten by TASTE with the actual connection to the
-- middleware. If you use Opengeode independently from TASTE you may
-- add a .adb with your own implementation of these functions.
with TASTE_Dataview;
use TASTE_Dataview;
with adaasn1rtl;
use adaasn1rtl;
with Ada.Real_Time;
use Ada.Real_Time;
package body Toto_Timer is
procedure Set_Toto (Dur : asn1SccT_UInt32) is
package body test_RI is
procedure SET_toto (Val : in out asn1SccT_UInt32) is
begin
delay To_Duration (Milliseconds (Integer(Dur)));
end Set_Toto;
end Toto_Timer;
delay To_Duration (Milliseconds (Integer (Val)));
end Set_toto;
procedure RESET_toto is null;
end test_RI;
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;
-- This file is a stub for the implementation of the required interfaces
-- It is normally overwritten by TASTE with the actual connection to the
-- middleware. If you use Opengeode independently from TASTE you may
-- add a .adb with your own implementation of these functions.
with TASTE_Dataview;
use TASTE_Dataview;
with adaasn1rtl;
use adaasn1rtl;
package test_RI is
procedure SET_toto (Val : in out asn1SccT_UInt32);
procedure RESET_toto;
end test_RI;
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