Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
5e2621cc
Commit
5e2621cc
authored
Aug 28, 2020
by
Maxime Perrotin
Browse files
Update testcase
parent
506c8d08
Changes
5
Hide whitespace changes
Inline
Side-by-side
tests/testsuite/test-timers/Makefile
View file @
5e2621cc
...
...
@@ -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
...
...
tests/testsuite/test-timers/test.pr
View file @
5e2621cc
...
...
@@ -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
tests/testsuite/test-timers/test_ada.ada
View file @
5e2621cc
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
...
...
tests/testsuite/test-timers/toto_timer.adabody
View file @
5e2621cc
--
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
S
et_T
oto
(
Dur
:
asn1SccT_UInt32
)
is
package
body
test_RI
is
procedure
S
ET_t
oto
(
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
;
tests/testsuite/test-timers/toto_timer.adasource
View file @
5e2621cc
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
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment