Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
clean-and-itasks
clean-test-properties
Commits
57d19298
Verified
Commit
57d19298
authored
Jun 12, 2018
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename to test-properties
parent
d0e36fd7
Pipeline
#12116
passed with stage
in 1 minute and 3 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
46 deletions
+19
-46
.gitignore
.gitignore
+1
-2
.gitlab-ci.yml
.gitlab-ci.yml
+10
-0
Makefile
Makefile
+1
-1
README.md
README.md
+6
-42
testproperties.icl
testproperties.icl
+1
-1
No files found.
.gitignore
View file @
57d19298
Clean System Files/
cleantest
makecleantest
testproperties
.gitlab-ci.yml
0 → 100644
View file @
57d19298
build
:
image
:
"
camilstaps/clean:nightly"
before_script
:
-
install_clean_nightly.sh base lib-platform lib-gast lib-tcpip lib-argenv
-
apt-get update -qq
-
apt-get install -y -qq build-essential subversion
script
:
-
make
variables
:
GIT_SUBMODULE_STRATEGY
:
recursive
Makefile
View file @
57d19298
BIN
:=
cleantest makecleant
es
t
BIN
:=
testproperti
es
CLM
:=
clm
CLMFLAGS
:=
-nr
-nt
-h
100m
-nortsopts
\
-IL
ArgEnv
\
...
...
README.md
View file @
57d19298
# clean-test [](https://gitlab.science.ru.nl/clean-and-itasks/clean-test/commits/master)
# clean-test
-properties
[](https://gitlab.science.ru.nl/clean-and-itasks/clean-test
-properties
/commits/master)
This projects hosts tools that can be used to test Clean programs.
The available tools are:
-
`cleantest`
which can run test programs
-
`makecleantest`
which can generate test programs from dcl modules
## cleantest
This tool can run other test programs and combine the results.
The tool was conceived in
This tool can generate test programs using
[
Gast
][]
's
`exposeProperties`
(see
above) from dcl modules. The tool was conceived in
[
clean-platform#17
](
https://gitlab.science.ru.nl/clean-and-itasks/clean-platform/issues/19
)
.
It is assumed that the other programs adhere to the interface described in
`Testing.TestEvents`
. For
[
Gast
][]
tests, this can be done easily with the
`exposeProperties`
function. For example:
```
clean
Start
w
=
exposeProperties
[
OutputTestEvents
]
[
Tests
500000
]
[
EP
prop_one
,
EP
prop_two
,
EP
prop_three
]
w
```
Here,
`prop_one`
,
`prop_two`
and
`prop_three`
are Gast properties (not
necessarily of the same type).
`exposeProperties`
generates a command-line
interface.
`cleantest`
can run this kind of test programs (and others) by
adding their executables with the
`-r`
flag, e.g.:
```
bash
cleantest
-r
testModuleA
-r
testModuleB
```
The tool has several command-line options; check
`cleantest --help`
for
up-to-date details.
## makecleantest
This tool can generate test programs using
[
Gast
][]
's
`exposeProperties`
(see
above) from dcl modules. The properties to test are described in
[
CleanDoc
][]
blocks: comments above function types. This works as follows:
The properties to test are described in
[
CleanDoc
][]
blocks: comments above
function types. This works as follows:
-
On the module documentation block, add a
`@property-bootstrap`
field. This
field should contain the 'header' of the generated test program: required
...
...
@@ -67,7 +31,7 @@ blocks: comments above function types. This works as follows:
requires
`import StdList`
in the
`@property-bootstrap`
of the module.
It is possible to use multiple lines for the implementation of the property.
`
makecleant
es
t
`
will guess the right indentation level.
`
testproperti
es`
will guess the right indentation level.
-
When parameters in
`@property`
fields contain type variables, the programmer
is required to suggest types to instantiate these variables with when
...
...
makecleant
es
t
.icl
→
testproperti
es.icl
View file @
57d19298
module
makecleant
es
t
module
testproperti
es
import
_SystemArray
import
StdBool
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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