Commit d6b776ab authored by Maxime Perrotin's avatar Maxime Perrotin

Update test case

parent e35906f8
......@@ -25,9 +25,12 @@ test-qgen-gt-ada:
test-qgen-gt-c:
$(TESTQGEN_GT_C) $(ROOT_MODEL)
test-ada: orchestrator.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n orchestrator.ali
$(GNATLINK) -o test_ada test_ada.o orchestrator.ali
test-ada: dataview-uniq.o | test_ada.o
cp orchestrator_ri.ada orchestrator_ri.adb
cp test_ada.ada test_ada.adb
$(OPENGEODE) orchestrator.pr system_structure.pr --toAda
mono $(ASN1SCC) -Ada -typePrefix asn1Scc -equal *.asn
gnat make -g test_ada
./test_ada | diff expected -
test-c: orchestrator.c test_c.o dataview-uniq.o
......
[C Code] Running test
[SDL] Startup
Hello 2.00000000000000E+00
1 2.00000000000000E+00
1.00000000000000E+00
[C Code] Received T_GNC_LV_SIM_INPUTS
VESAT One Step called
2.00000000000000E+00
[C Code] Received T_GNC_LV_SIM_INPUTS
VESAT One Step called
3.00000000000000E+00
[C Code] Received T_GNC_LV_SIM_INPUTS
VESAT One Step called
4.00000000000000E+00
[C Code] Received T_GNC_LV_SIM_INPUTS
VESAT One Step called
1.00000000000000E+00
2.00000000000000E+00
3.00000000000000E+00
4.00000000000000E+00
2.00000000000000E+00
3.00000000000000E+00
End of test
-- Stub generated by OpenGEODE.
-- You can edit this file, it will not be overwritten
with Text_IO; use Text_IO;
package body orchestrator_RI is
procedure VESAT_one_step (vesat_input : in out asn1SccT_GNC_LV_SIM_INPUTS)
is
-- procedure VESAT_one_step (vesat_input : in out asn1SccT_GNC_LV_SIM_INPUTS)
-- with Import;
begin
Put_Line ("VESAT One Step called");
end VESAT_One_Step;
procedure plot (gnc_data : in out asn1SccT_Plot) is null;
procedure jump_to_next_major_cycle is null;
procedure gnc_onestep (gnc_inputs : in out asn1SccT_GNC_LV_SIM_CONTEXT; gnc_outputs : out asn1SccT_GNC_LV_SIM_INPUTS) is null;
procedure gnc_init is null;
end orchestrator_RI;
with orchestrator;
with Text_IO;
procedure test_ada is
begin
Text_IO.Put_Line("End of test");
end test_ada;
......@@ -4,7 +4,7 @@
extern void adainit();
void orchestrator_RI_VESAT_one_step(asn1SccT_GNC_LV_SIM_INPUTS *inp)
void vesat_one_step(asn1SccT_GNC_LV_SIM_INPUTS *inp)
{
printf("[C Code] Received T_GNC_LV_SIM_INPUTS\n");
}
......
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