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
ca6ccd36
Commit
ca6ccd36
authored
Mar 26, 2018
by
Maxime Perrotin
Browse files
Update test cases
the Ada backend now exports C symbols with _PI_ to be compatible with TASTE
parent
aa4c17e9
Changes
21
Hide whitespace changes
Inline
Side-by-side
tests/regression/test-aggregation1/test_ada.c
View file @
ca6ccd36
...
...
@@ -2,8 +2,8 @@
#include
<stdio.h>
/* Ada code external interface */
extern
void
challenge_run
();
extern
void
challenge_any_one
();
extern
void
challenge_
PI_
run
();
extern
void
challenge_
PI_
any_one
();
extern
int
adainit
();
//extern long long l_result;
...
...
@@ -17,11 +17,11 @@ void challenge_RI_pow(long long *a, long long *b, long long *res)
int
main
()
{
adainit
();
challenge_run
();
challenge_run
();
challenge_
PI_
run
();
challenge_
PI_
run
();
//printf("Internal state: %lld\n", l_result);
challenge_any_one
();
challenge_run
();
challenge_
PI_
any_one
();
challenge_
PI_
run
();
return
0
;
}
...
...
tests/regression/test-aggregation3/test_ada.c
View file @
ca6ccd36
...
...
@@ -2,8 +2,8 @@
#include
<stdio.h>
/* Ada code external interface */
extern
void
challenge_run
();
extern
void
challenge_any_one
();
extern
void
challenge_
PI_
run
();
extern
void
challenge_
PI_
any_one
();
extern
int
adainit
();
//extern long long l_result;
...
...
@@ -17,11 +17,11 @@ void challenge_RI_pow(long long *a, long long *b, long long *res)
int
main
()
{
adainit
();
challenge_run
();
challenge_run
();
challenge_
PI_
run
();
challenge_
PI_
run
();
//printf("Internal state: %lld\n", l_result);
challenge_any_one
();
challenge_run
();
challenge_
PI_
any_one
();
challenge_
PI_
run
();
return
0
;
}
...
...
tests/regression/test-battery/dataview-uniq.asn
View file @
ca6ccd36
...
...
@@ -28,7 +28,7 @@ Type2 ::= BOOLEAN
Toto ::= SEQUENCE { elem-1 Type1, elem-2 Type2 }
SeqBool ::= SEQUENCE(SIZE(1..5)) OF BOOLEAN
Enum ::= ENUMERATED {enum1}
Enum
-T
::= ENUMERATED {enum1}
default-seqof SeqOf ::= {4,7,9}
default-str My-OctStr ::= 'DEADBEEF'H
...
...
tests/regression/test-controlflow/test_ada.c
View file @
ca6ccd36
...
...
@@ -3,7 +3,7 @@
#include
"dataview-uniq.h"
extern
void
adainit
();
extern
void
controlflow_run
();
extern
void
controlflow_
PI_
run
();
void
controlflow_RI_assert
(
asn1SccBoolean
*
res
,
asn1SccCharString
*
msg
)
{
if
(
!*
res
)
{
...
...
@@ -19,6 +19,6 @@ void controlflow_RI_fail(asn1SccCharString *msg) {
int
main
()
{
adainit
();
controlflow_run
();
controlflow_
PI_
run
();
return
0
;
}
tests/regression/test-equal/test_ada.c
View file @
ca6ccd36
...
...
@@ -3,7 +3,7 @@
extern
void
adainit
();
extern
void
og_go
(
asn1SccMy_OctStr
*
);
extern
void
og_
PI_
go
(
asn1SccMy_OctStr
*
);
void
og_RI_rezult
(
asn1SccMy_OctStr
*
val
)
{
...
...
@@ -13,7 +13,7 @@ void og_RI_rezult (asn1SccMy_OctStr *val)
int
main
()
{
asn1SccMy_OctStr
toto
;
adainit
();
og_go
(
&
toto
);
og_
PI_
go
(
&
toto
);
return
0
;
}
tests/regression/test-exitnested/test_ada.c
View file @
ca6ccd36
...
...
@@ -2,8 +2,8 @@
#include
<stdio.h>
/* Ada code external interface */
extern
void
challenge_run
();
extern
void
challenge_go_off
();
extern
void
challenge_
PI_
run
();
extern
void
challenge_
PI_
go_off
();
extern
int
adainit
();
//extern long long l_result;
...
...
@@ -17,8 +17,8 @@ void challenge_RI_pow(long long *a, long long *b, long long *res)
int
main
()
{
adainit
();
challenge_run
();
challenge_go_off
();
challenge_
PI_
run
();
challenge_
PI_
go_off
();
return
0
;
}
...
...
tests/regression/test-expressions/test_ada.c
View file @
ca6ccd36
...
...
@@ -3,7 +3,7 @@
#include
"dataview-uniq.h"
extern
void
adainit
();
extern
void
expressions_run
();
extern
void
expressions_
PI_
run
();
void
expressions_RI_assert
(
asn1SccBoolean
*
res
,
asn1SccCharString
*
msg
)
{
if
(
!*
res
)
{
...
...
@@ -14,6 +14,6 @@ void expressions_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
int
main
()
{
adainit
();
expressions_run
();
expressions_
PI_
run
();
return
0
;
}
tests/regression/test-instance/test_ada.c
View file @
ca6ccd36
...
...
@@ -3,7 +3,7 @@
extern
void
adainit
();
extern
void
og_go
(
asn1SccMy_OctStr
*
);
extern
void
og_
PI_
go
(
asn1SccMy_OctStr
*
);
void
og_RI_rezult
(
asn1SccMy_OctStr
*
val
)
{
...
...
@@ -13,9 +13,9 @@ void og_RI_rezult (asn1SccMy_OctStr *val)
int
main
()
{
asn1SccMy_OctStr
toto
=
test_string
;
// send "hello"
adainit
();
og_go
(
&
toto
);
// will move state to Running
og_go
(
&
toto
);
// will display ay
og_go
(
&
toto
);
// will display ay
og_
PI_
go
(
&
toto
);
// will move state to Running
og_
PI_
go
(
&
toto
);
// will display ay
og_
PI_
go
(
&
toto
);
// will display ay
return
0
;
}
tests/regression/test-llvm/dataview-uniq.asn
View file @
ca6ccd36
...
...
@@ -13,7 +13,7 @@ SeqBoolFix ::= SEQUENCE (SIZE(2)) OF BOOLEAN
SeqEnum ::= SEQUENCE (SIZE(1..5)) OF ENUMERATED { hello, world }
SeqEnumFix ::= SEQUENCE (SIZE(2)) OF ENUMERATED { hello, world }
Enum ::= ENUMERATED {a, b, c, d, eE}
Enum
-T
::= ENUMERATED {a, b, c, d, eE}
Choice ::= CHOICE {c1 BOOLEAN, cDe2 BOOLEAN}
END
...
...
tests/regression/test-math/test_ada.c
View file @
ca6ccd36
...
...
@@ -3,7 +3,7 @@
#include
"dataview-uniq.h"
extern
void
adainit
();
extern
void
expressions_run
();
extern
void
expressions_
PI_
run
();
void
expressions_RI_assert
(
asn1SccBoolean
*
res
,
asn1SccCharString
*
msg
)
{
if
(
!*
res
)
{
...
...
@@ -14,6 +14,6 @@ void expressions_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
int
main
()
{
adainit
();
expressions_run
();
expressions_
PI_
run
();
return
0
;
}
tests/regression/test-operators/dataview-uniq.asn
View file @
ca6ccd36
...
...
@@ -9,7 +9,7 @@ CharString ::= OCTET STRING (SIZE(0..100))
FixSeqof ::= SEQUENCE (SIZE(3)) OF Integer
VarSeqof ::= SEQUENCE (SIZE(0..100)) OF Integer
Enum ::= ENUMERATED { one(12), two(13), three(111) }
Enum
-T
::= ENUMERATED { one(12), two(13), three(111) }
Choice ::= CHOICE {
b BOOLEAN,
...
...
tests/regression/test-operators/operators.pr
View file @
ca6ccd36
...
...
@@ -5,7 +5,7 @@ PROCESS operators;
DCL f Real := 2.0;
DCL b Boolean := true;
DCL s CharString := 'HELLO';
DCL e Enum := one;
DCL e Enum
_T
:= one;
DCL fixSeqOf FixSeqof := {1, 2, 3};
DCL varSeqOf varSeqOf := {1, 2, 3};
DCL c Choice := i:2;
...
...
@@ -53,4 +53,4 @@ DCL c Choice := i:2;
/* CIF NEXTSTATE (164, 1048), (100, 50) */
NEXTSTATE Wait;
ENDSTATE;
ENDPROCESS operators;
\ No newline at end of file
ENDPROCESS operators;
tests/regression/test-operators/test_ada.c
View file @
ca6ccd36
...
...
@@ -3,7 +3,7 @@
#include
"dataview-uniq.h"
extern
void
adainit
();
extern
void
operators_run
();
extern
void
operators_
PI_
run
();
void
operators_RI_assert
(
asn1SccBoolean
*
res
,
asn1SccCharString
*
msg
)
{
if
(
!*
res
)
{
...
...
@@ -14,6 +14,6 @@ void operators_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
int
main
()
{
adainit
();
operators_run
();
operators_
PI_
run
();
return
0
;
}
tests/regression/test-processfpar1/dataview-uniq.asn
View file @
ca6ccd36
...
...
@@ -28,7 +28,7 @@ Type2 ::= BOOLEAN
Toto ::= SEQUENCE { elem-1 Type1, elem-2 Type2 }
SeqBool ::= SEQUENCE(SIZE(1..5)) OF BOOLEAN
Enum ::= ENUMERATED {enum1}
Enum
-T
::= ENUMERATED {enum1}
default-seqof SeqOf ::= {4,7,9}
default-str My-OctStr ::= 'DEADBEEF'H
...
...
tests/regression/test-processfpar2/dataview-uniq.asn
View file @
ca6ccd36
...
...
@@ -28,7 +28,7 @@ Type2 ::= BOOLEAN
Toto ::= SEQUENCE { elem-1 Type1, elem-2 Type2 }
SeqBool ::= SEQUENCE(SIZE(1..5)) OF BOOLEAN
Enum ::= ENUMERATED {enum1}
Enum
-T
::= ENUMERATED {enum1}
default-seqof SeqOf ::= {4,7,9}
default-str My-OctStr ::= 'DEADBEEF'H
...
...
tests/regression/test-shadowing/og.pr
View file @
ca6ccd36
...
...
@@ -18,35 +18,40 @@ system og;
state NestedState;
substructure
out (getOut);
/* CIF TEXT (80, 232), (36
6
,
8
3) */
/* CIF TEXT (80, 232), (36
8
,
11
3) */
-- Declare a variable with the same name as the level above
dcl toto MySeq := { a FALSE, b 2 };
-- Declare a non-shadowing variable
dcl tutu MySeq := { a TRUE, b 8 };
dcl ghost MyInt := 3;
/* CIF ENDTEXT */
/* CIF START (747, 207), (70, 35) */
START;
/* CIF PROCEDURECALL (565, 262), (433, 35) */
call writeln ('Entering state with ', toto.a, toto.b, ' (should be FALSE 2)' );
/* CIF task (733, 317), (98, 3
8
) */
/* CIF task (733, 317), (98,
5
3) */
task toto := toto,
tutu := tutu;
/* CIF PROCEDURECALL (577, 375), (410, 35) */
tutu := tutu,
ghost := 4;
/* CIF PROCEDURECALL (577, 400), (410, 35) */
call writeln ('Value should be the same: ', toto.a, toto.b);
/* CIF task (705, 4
30
), (153, 53) */
/* CIF task (705, 4
55
), (153, 53) */
task toto.a := TRUE,
toto.b := 3,
toto := { a FALSE, b 4 };
/* CIF task (705, 5
03
), (153, 53) */
/* CIF task (705, 5
28
), (153, 53) */
task tutu.a := TRUE;
/* CIF PROCEDURECALL (577, 5
71
), (410, 35) */
/* CIF PROCEDURECALL (577, 5
96
), (410, 35) */
call writeln ('Value should be (FALSE 4) : ', toto.a, toto.b);
/* CIF return (764, 6
26
), (35, 35) */
/* CIF return (764, 6
51
), (35, 35) */
return getOut;
endsubstructure;
/* CIF TEXT (57, 58), (287, 140) */
dcl toto MySeq;
dcl ghost MySeq;
/* CIF ENDTEXT */
/* CIF START (475, 177), (70, 35) */
START;
...
...
tests/regression/test-standalone/dataview-uniq.asn
View file @
ca6ccd36
...
...
@@ -28,7 +28,7 @@ Type2 ::= BOOLEAN
Toto ::= SEQUENCE { elem-1 Type1, elem-2 Type2 }
SeqBool ::= SEQUENCE(SIZE(1..5)) OF BOOLEAN
Enum ::= ENUMERATED {enum1}
Enum
-T
::= ENUMERATED {enum1}
default-seqof SeqOf ::= {4,7,9}
default-str My-OctStr ::= 'DEADBEEF'H
...
...
tests/regression/test-substrings/test_ada.c
View file @
ca6ccd36
...
...
@@ -6,8 +6,8 @@
#include
"dataview-uniq.h"
extern
void
adainit
();
extern
void
myfunction_start_something
(
asn1SccT_Int32
*
);
extern
void
myfunction_mytimer
();
extern
void
myfunction_
PI_
start_something
(
asn1SccT_Int32
*
);
extern
void
myfunction_
PI_
mytimer
();
void
myfunction_RI_result_data
(
long
long
*
val
)
...
...
@@ -22,7 +22,7 @@ int main()
printf
(
"[C Code] Running test
\n
"
);
adainit
();
myfunction_start_something
(
&
test
);
myfunction_
PI_
start_something
(
&
test
);
return
0
;
}
tests/regression/test1/test_ada.c
View file @
ca6ccd36
...
...
@@ -3,7 +3,7 @@
extern
void
adainit
();
extern
void
og_go
(
asn1SccMy_OctStr
*
);
extern
void
og_
PI_
go
(
asn1SccMy_OctStr
*
);
void
og_RI_rezult
(
asn1SccMy_OctStr
*
val
)
{
...
...
@@ -13,9 +13,9 @@ void og_RI_rezult (asn1SccMy_OctStr *val)
int
main
()
{
asn1SccMy_OctStr
toto
=
test_string
;
// send "hello"
adainit
();
og_go
(
&
toto
);
// will move state to Running
og_go
(
&
toto
);
// will display ay
og_go
(
&
toto
);
// will display ay
og_
PI_
go
(
&
toto
);
// will move state to Running
og_
PI_
go
(
&
toto
);
// will display ay
og_
PI_
go
(
&
toto
);
// will display ay
return
0
;
}
tests/regression/test10/test_ada.c
View file @
ca6ccd36
...
...
@@ -2,8 +2,8 @@
#include
<stdio.h>
/* Ada code external interface */
extern
void
challenge_run
();
extern
void
challenge_any_one
();
extern
void
challenge_
PI_
run
();
extern
void
challenge_
PI_
any_one
();
extern
int
adainit
();
//extern long long l_result;
...
...
@@ -17,11 +17,11 @@ void challenge_RI_pow(long long *a, long long *b, long long *res)
int
main
()
{
adainit
();
challenge_run
();
challenge_run
();
challenge_
PI_
run
();
challenge_
PI_
run
();
//printf("Internal state: %lld\n", l_result);
challenge_any_one
();
challenge_run
();
challenge_
PI_
any_one
();
challenge_
PI_
run
();
return
0
;
}
...
...
Prev
1
2
Next
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