Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LARA
inox
Commits
651ee9f8
Commit
651ee9f8
authored
15 years ago
by
Mirco Dotta
Browse files
Options
Downloads
Patches
Plain Diff
Added instruction for forAll transformation usage
parent
f2098a97
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README
+28
-0
28 additions, 0 deletions
README
with
28 additions
and
0 deletions
README
+
28
−
0
View file @
651ee9f8
...
...
@@ -45,3 +45,31 @@ Try:
./scalac-funcheck -Ybrowse:funcheck Test.scala
...to print a Swing-based GUI for browsing the program's AST
ForAll Transformation: How does it work
-----------------------------
First, look at Test4.scala to get an idea of how we can declare properties using "our" Spec library (which has a forAll combinator)
Second, compile the whole project if you didn't yet (simply type: ant)
Third, compile the Test4.scala using scalac extended with the funcheck plugin. You can do this by typing:
./scalac-funcheck -cp bin:lib/ScalaCheck-1.5.jar Test4.scala
Now run the compiled program using standard the scala environment as follow:
scala -cp lib/ScalaCheck-1.5.jar:. HeapTest
And you should see a similar output:
+ OK, passed 100 tests. //Nice!! This means the property was ok!
! Falsified after 1 passed tests. //Good, The property was indeed wrong
> ARG_0: "1"
java.lang.ExceptionInInitializerError
[...]
Note: The ScalaCheck-1.5.jar library needs to be in the classpath for both compilation and execution because the FunCheck
plugin rely on it for transforming every Spec.forAll (internal to our library) call to a scalacheck Prop.forAll call.
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