Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clean-test-properties
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-test-properties
Commits
d70d9ead
Commit
d70d9ead
authored
Dec 02, 2019
by
Steffen Michels
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'add-without_default_imports-support' into 'master'
Add "without default imports" support See merge request
!4
parents
cda8a53e
c016272f
Pipeline
#34199
failed with stage
in 4 minutes and 27 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
doc/specifying-properties.tex
doc/specifying-properties.tex
+3
-0
src/testproperties.icl
src/testproperties.icl
+16
-8
No files found.
doc/specifying-properties.tex
View file @
d70d9ead
...
@@ -54,6 +54,9 @@ Some imports are included automatically and do not need to be added here:
...
@@ -54,6 +54,9 @@ Some imports are included automatically and do not need to be added here:
\item
The tested module itself.
\item
The tested module itself.
\end{itemize}
\end{itemize}
To prevent these modules from being imported, add
\clean
{
without default imports
}
on the same line as
\clean
{
@property-bootstrap
}
.
With this option, no modules are imported by default whatsoever.
\subsection
{
Advanced properties
}
\subsection
{
Advanced properties
}
\subsubsection
{
\clean
{
@invariant
}}
\subsubsection
{
\clean
{
@invariant
}}
...
...
src/testproperties.icl
View file @
d70d9ead
...
@@ -322,13 +322,15 @@ where
...
@@ -322,13 +322,15 @@ where
coverage
=
toReal
(
length
(
filter
(
not
o
isEmpty
)
propsets
))
/
toReal
(
length
fes
+
length
ies
)
coverage
=
toReal
(
length
(
filter
(
not
o
isEmpty
)
propsets
))
/
toReal
(
length
fes
+
length
ies
)
tests
=
join
"
\n\n
"
tests
=
join
"
\n\n
"
[
"module "
+++
testmodname
[
"module "
+++
testmodname
,
join
"
\n
"
,
join
"
\n
"
$
[
"import Gast, Gast.CommandLine"
if
default_imports
,
"from Testing.TestEvents import :: TestLocation{..}"
[
"import Gast, Gast.CommandLine"
,
"from StdString import instance toString {#Char}"
,
"from Testing.TestEvents import :: TestLocation{..}"
,
"import Control.GenBimap"
,
"from StdString import instance toString {#Char}"
,
"import "
+++
modname
,
"import Control.GenBimap"
]
,
"import "
+++
modname
]
[]
,
bootstrap
,
bootstrap
,
generators_string
,
generators_string
,
invariants
,
invariants
...
@@ -343,7 +345,13 @@ where
...
@@ -343,7 +345,13 @@ where
pvis
=
fromMaybe
[]
$
docPropertyTestWith
<$>
mod_doc
pvis
=
fromMaybe
[]
$
docPropertyTestWith
<$>
mod_doc
props
=
flatten
propsets
props
=
flatten
propsets
bootstrap
=
fromMaybe
""
(
docPropertyBootstrap
=<<
mod_doc
)
(
bootstrap
,
default_imports
)
=
case
docPropertyBootstrap
=<<
mod_doc
of
Nothing
->
(
""
,
True
)
Just
bs
=:{
bootstrap_content
=
MultiLine
content
}
->
(
content
,
not
bs
.
bootstrap_without_default_imports
)
invariants
=
join
"
\n\n
"
$
concatMap
(\(_,
td
)
->
map
invariant
td
.
TypeDoc
.
invariants
)
tes
invariants
=
join
"
\n\n
"
$
concatMap
(\(_,
td
)
->
map
invariant
td
.
TypeDoc
.
invariants
)
tes
where
where
...
...
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