Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sequencer-2-2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
epics-modules
sequencer-2-2
Commits
61b11484
Commit
61b11484
authored
11 years ago
by
benjamin.franksen
Browse files
Options
Downloads
Patches
Plain Diff
test: added void.st and indirectCall.st, expanded sizeof.st
parent
9a3c4b7a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
test/validate/Makefile
+2
-0
2 additions, 0 deletions
test/validate/Makefile
test/validate/indirectCall.st
+82
-0
82 additions, 0 deletions
test/validate/indirectCall.st
test/validate/sizeof.st
+8
-1
8 additions, 1 deletion
test/validate/sizeof.st
test/validate/void.st
+28
-0
28 additions, 0 deletions
test/validate/void.st
with
120 additions
and
1 deletion
test/validate/Makefile
+
2
−
0
View file @
61b11484
...
...
@@ -45,6 +45,7 @@ REGRESSION_TESTS_WITHOUT_DB += assign
REGRESSION_TESTS_WITHOUT_DB
+=
change
REGRESSION_TESTS_WITHOUT_DB
+=
commaOperator
REGRESSION_TESTS_WITHOUT_DB
+=
foreignTypes
REGRESSION_TESTS_WITHOUT_DB
+=
indirectCall
REGRESSION_TESTS_WITHOUT_DB
+=
local
REGRESSION_TESTS_WITHOUT_DB
+=
opttVar
REGRESSION_TESTS_WITHOUT_DB
+=
pvSync
...
...
@@ -53,6 +54,7 @@ REGRESSION_TESTS_WITHOUT_DB += safeMonitor
REGRESSION_TESTS_WITHOUT_DB
+=
sizeof
REGRESSION_TESTS_WITHOUT_DB
+=
userfunc
REGRESSION_TESTS_WITHOUT_DB
+=
userfuncEf
REGRESSION_TESTS_WITHOUT_DB
+=
void
REGRESSION_TESTS_REMOTE_ONLY
+=
pvGetSync
REGRESSION_TESTS_REMOTE_ONLY
+=
pvGetComplete
...
...
This diff is collapsed.
Click to expand it.
test/validate/indirectCall.st
0 → 100644
+
82
−
0
View file @
61b11484
/*************************************************************************\
Copyright
(
c
)
2013
Helmholtz-
Zentrum
Berlin
f
.
Materialien
und
Energie
GmbH,
Germany
(
HZB
)
This
file
is
distributed
subject
to
a
Software
License
Agreement
found
in
the
file
LICENSE
that
is
included
with
this
distribution
.
\*************************************************************************/
program
indirectCallTest
option
+
r
;
%%
#include
"../testSupport.h"
%
{
typedef
int
fun_t
(
int
);
struct
s
{
fun_t
*
f
;
};
int
id
(
int
x
)
{
return
x
;
}
int
inc
(
int
x
)
{
return
x
+
1
;
}
}
%
struct
s
gx
;
struct
s
*
p
;
entry
{
seq_test_init
(
3
*
8
);
}
ss
test
{
struct
s
ssx
;
state
test
{
struct
s
stx
;
when
()
{
p
=
&
gx
;
gx
.
f
=
id
;
testOk1
(
42
==
p
->
f
(
42
));
testOk1
(
42
==
(
*
p
->
f
)(
42
));
testOk1
(
42
==
gx
.
f
(
42
));
testOk1
(
42
==
(
*
gx
.
f
)(
42
));
gx
.
f
=
inc
;
testOk1
(
1
==
p
->
f
(
0
));
testOk1
(
1
==
(
*
p
->
f
)(
0
));
testOk1
(
1
==
gx
.
f
(
0
));
testOk1
(
1
==
(
*
gx
.
f
)(
0
));
p
=
&
ssx
;
ssx
.
f
=
id
;
testOk1
(
42
==
p
->
f
(
42
));
testOk1
(
42
==
(
*
p
->
f
)(
42
));
testOk1
(
42
==
ssx
.
f
(
42
));
testOk1
(
42
==
(
*
ssx
.
f
)(
42
));
ssx
.
f
=
inc
;
testOk1
(
1
==
p
->
f
(
0
));
testOk1
(
1
==
(
*
p
->
f
)(
0
));
testOk1
(
1
==
ssx
.
f
(
0
));
testOk1
(
1
==
(
*
ssx
.
f
)(
0
));
p
=
&
stx
;
stx
.
f
=
id
;
testOk1
(
42
==
p
->
f
(
42
));
testOk1
(
42
==
(
*
p
->
f
)(
42
));
testOk1
(
42
==
stx
.
f
(
42
));
testOk1
(
42
==
(
*
stx
.
f
)(
42
));
stx
.
f
=
inc
;
testOk1
(
1
==
p
->
f
(
0
));
testOk1
(
1
==
(
*
p
->
f
)(
0
));
testOk1
(
1
==
stx
.
f
(
0
));
testOk1
(
1
==
(
*
stx
.
f
)(
0
));
}
exit
}
}
exit
{
seq_test_done
();
}
This diff is collapsed.
Click to expand it.
test/validate/sizeof.st
+
8
−
1
View file @
61b11484
...
...
@@ -9,7 +9,7 @@ program sizeofTest
%%
#include
"../testSupport.h"
entry
{
seq_test_init
(
2
);
seq_test_init
(
9
);
}
ss
test
{
...
...
@@ -19,6 +19,13 @@ ss test {
char
*
p
=
&
c
;
testOk1
(
sizeof
(
char
)
==
1
);
testOk1
(
sizeof
(
*
p
)
==
1
);
testOk1
(
sizeof
(
string
)
>=
40
);
testOk1
(
sizeof
(
int8_t
)
==
1
);
testOk1
(
sizeof
(
uint8_t
)
==
1
);
testOk1
(
sizeof
(
int16_t
)
==
2
);
testOk1
(
sizeof
(
uint16_t
)
==
2
);
testOk1
(
sizeof
(
int32_t
)
==
4
);
testOk1
(
sizeof
(
uint32_t
)
==
4
);
c
=
*
p
;
}
exit
}
...
...
This diff is collapsed.
Click to expand it.
test/validate/void.st
0 → 100644
+
28
−
0
View file @
61b11484
/*************************************************************************\
Copyright
(
c
)
2013
Helmholtz-
Zentrum
Berlin
f
.
Materialien
und
Energie
GmbH,
Germany
(
HZB
)
This
file
is
distributed
subject
to
a
Software
License
Agreement
found
in
the
file
LICENSE
that
is
included
with
this
distribution
.
\*************************************************************************/
program
voidTest
%%
#include
"../testSupport.h"
int
x
=
42
;
void
*
p
=
&
x
;
entry
{
seq_test_init
(
1
);
}
ss
test
{
state
sizes
{
when
()
{
testOk1
(
*
(
int
*
)
p
==
x
);
}
exit
}
}
exit
{
seq_test_done
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment