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
6931e452
Commit
6931e452
authored
15 years ago
by
Viktor Kuncak
Browse files
Options
Downloads
Patches
Plain Diff
a test script
parent
5b6d4529
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test-leftist
+105
-0
105 additions, 0 deletions
test-leftist
test-splay
+105
-0
105 additions, 0 deletions
test-splay
with
210 additions
and
0 deletions
test-leftist
0 → 100755
+
105
−
0
View file @
6931e452
#!/bin/bash
echo
echo
"********************************************************************************"
echo
"** COMPILE AND RUN EXAMPLES **"
echo
"********************************************************************************"
echo
echo
echo
"********************************************************************************"
echo
"Compile and Build the distribution using ANT"
echo
"********************************************************************************"
echo
# first clean
#ant clean
# and build the distribution
ant dist
# Note:
# When the distribution is builded the script scalac-funcheck should be created.
# This will be used to compile the examples since the Funcheck compiler plugin
# will take care of transforming the Specs.forAll calls into ScalaCheck forAll
# ones.
echo
echo
"********************************************************************************"
echo
"Check that needed scripts and libraries are available."
echo
"********************************************************************************"
echo
export
SCALAC_SCRIPT
=
"scalac-funcheck"
export
SCALACHECK_JAR
=
"lib/ScalaCheck-1.5.jar"
if
[
-e
"
$SCALAC_SCRIPT
"
]
then
echo
"[OK]
${
SCALAC_SCRIPT
}
script found."
if
[
-e
"
${
SCALACHECK_JAR
}
"
]
then
echo
"[OK]
${
SCALACHECK_JAR
}
found."
else
echo
"[ERROR]
${
SCALACHECK_JAR
}
NOT found."
echo
"Please correct this and try again."
return
-1
fi
else
echo
"[ERROR]
${
SCALAC_SCRIPT
}
script NOT found."
echo
"Please correct this and try again."
return
-1
fi
echo
echo
"********************************************************************************"
echo
"Compile tests that have declared forAll properties."
echo
"********************************************************************************"
echo
#This is needed for aliases to work correctly
shopt
-s
expand_aliases
;
alias
scalac
=
".././scalac-funcheck -cp ../bin:../lib/ScalaCheck-1.5.jar -d ../bin/tests"
mkdir
bin/tests
cd
tests
scalac plugin/LeftistHeap.scala
cd
..
# Scala compiler with the Funcheck plugin integrated
#alias scalac="./scalac-funcheck"
# compile examples using the compiler with the Funcheck plugin
#ant compile-funcheck-tests
echo
echo
"********************************************************************************"
echo
"Running tests with forAll properties."
echo
"********************************************************************************"
echo
alias
scala
=
"scala -cp bin/:
${
SCALACHECK_JAR
}
:bin/tests/"
# examples
export
BST
=
"plugin.BST"
export
LeftistHeap
=
"plugin.LeftistHeap"
export
ListSet
=
"plugin.ListSet"
export
LambdaEvaluator
=
"plugin.LambdaEvaluator"
export
PropositionalLogic
=
"plugin.PropositionalLogic"
export
SetRedBlackTree
=
"plugin.SetRedBlackTree"
export
ConsSnoc
=
"plugin.ConsSnoc"
export
InsertSort
=
"plugin.kawaguchi.InsertSort"
export
MergeSort
=
"plugin.kawaguchi.MergeSort"
export
MergeSortBug
=
"plugin.kawaguchi.MergeSortBug"
export
QuickSort
=
"plugin.kawaguchi.QuickSort"
export
MapReduce
=
"plugin.kawaguchi.MapReduce"
export
SplayHeap
=
"plugin.kawaguchi.SplayHeap"
echo
" - Testing
${
LeftistHeap
}
"
scala
${
LeftistHeap
}
This diff is collapsed.
Click to expand it.
test-splay
0 → 100755
+
105
−
0
View file @
6931e452
#!/bin/bash
echo
echo
"********************************************************************************"
echo
"** COMPILE AND RUN EXAMPLES **"
echo
"********************************************************************************"
echo
echo
echo
"********************************************************************************"
echo
"Compile and Build the distribution using ANT"
echo
"********************************************************************************"
echo
# first clean
#ant clean
# and build the distribution
ant dist
# Note:
# When the distribution is builded the script scalac-funcheck should be created.
# This will be used to compile the examples since the Funcheck compiler plugin
# will take care of transforming the Specs.forAll calls into ScalaCheck forAll
# ones.
echo
echo
"********************************************************************************"
echo
"Check that needed scripts and libraries are available."
echo
"********************************************************************************"
echo
export
SCALAC_SCRIPT
=
"scalac-funcheck"
export
SCALACHECK_JAR
=
"lib/ScalaCheck-1.5.jar"
if
[
-e
"
$SCALAC_SCRIPT
"
]
then
echo
"[OK]
${
SCALAC_SCRIPT
}
script found."
if
[
-e
"
${
SCALACHECK_JAR
}
"
]
then
echo
"[OK]
${
SCALACHECK_JAR
}
found."
else
echo
"[ERROR]
${
SCALACHECK_JAR
}
NOT found."
echo
"Please correct this and try again."
return
-1
fi
else
echo
"[ERROR]
${
SCALAC_SCRIPT
}
script NOT found."
echo
"Please correct this and try again."
return
-1
fi
echo
echo
"********************************************************************************"
echo
"Compile tests that have declared forAll properties."
echo
"********************************************************************************"
echo
#This is needed for aliases to work correctly
shopt
-s
expand_aliases
;
alias
scalac
=
".././scalac-funcheck -cp ../bin:../lib/ScalaCheck-1.5.jar -d ../bin/tests"
mkdir
bin/tests
cd
tests
scalac plugin/kawaguchi/SplayHeap.scala
cd
..
# Scala compiler with the Funcheck plugin integrated
#alias scalac="./scalac-funcheck"
# compile examples using the compiler with the Funcheck plugin
#ant compile-funcheck-tests
echo
echo
"********************************************************************************"
echo
"Running tests with forAll properties."
echo
"********************************************************************************"
echo
alias
scala
=
"scala -cp bin/:
${
SCALACHECK_JAR
}
:bin/tests/"
# examples
export
BST
=
"plugin.BST"
export
LeftistHeap
=
"plugin.LeftistHeap"
export
ListSet
=
"plugin.ListSet"
export
LambdaEvaluator
=
"plugin.LambdaEvaluator"
export
PropositionalLogic
=
"plugin.PropositionalLogic"
export
SetRedBlackTree
=
"plugin.SetRedBlackTree"
export
ConsSnoc
=
"plugin.ConsSnoc"
export
InsertSort
=
"plugin.kawaguchi.InsertSort"
export
MergeSort
=
"plugin.kawaguchi.MergeSort"
export
MergeSortBug
=
"plugin.kawaguchi.MergeSortBug"
export
QuickSort
=
"plugin.kawaguchi.QuickSort"
export
MapReduce
=
"plugin.kawaguchi.MapReduce"
export
SplayHeap
=
"plugin.kawaguchi.SplayHeap"
echo
" - Testing
${
SplayHeap
}
"
scala
${
SplayHeap
}
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