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
b309d247
Commit
b309d247
authored
9 years ago
by
Marco Antognini
Committed by
Etienne Kneuss
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add verification mechanism to GenC regression tests
parent
a6ab44ad
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
src/test/scala/leon/genc/GenCSuite.scala
+15
-0
15 additions, 0 deletions
src/test/scala/leon/genc/GenCSuite.scala
with
15 additions
and
0 deletions
src/test/scala/leon/genc/GenCSuite.scala
+
15
−
0
View file @
b309d247
...
@@ -6,6 +6,7 @@ package genc
...
@@ -6,6 +6,7 @@ package genc
import
leon.test.LeonRegressionSuite
import
leon.test.LeonRegressionSuite
import
leon.frontends.scalac.ExtractionPhase
import
leon.frontends.scalac.ExtractionPhase
import
leon.regression.verification.XLangVerificationSuite
import
leon.purescala.Definitions.Program
import
leon.purescala.Definitions.Program
import
leon.utils.
{
PreprocessingPhase
,
UniqueCounter
}
import
leon.utils.
{
PreprocessingPhase
,
UniqueCounter
}
...
@@ -31,6 +32,7 @@ class GenCSuite extends LeonRegressionSuite {
...
@@ -31,6 +32,7 @@ class GenCSuite extends LeonRegressionSuite {
private
case
class
ExtendedContext
(
leon
:
LeonContext
,
tmpDir
:
Path
,
progName
:
String
)
private
case
class
ExtendedContext
(
leon
:
LeonContext
,
tmpDir
:
Path
,
progName
:
String
)
// Tests are run as follows:
// Tests are run as follows:
// - before mkTest is run, all valid test are verified using XLangVerificationSuite
// - The classic ExtractionPhase & PreprocessingPhase are run on all input files
// - The classic ExtractionPhase & PreprocessingPhase are run on all input files
// (this way the libraries are evaluated only once)
// (this way the libraries are evaluated only once)
// - A Program is constructed for each input file
// - A Program is constructed for each input file
...
@@ -178,7 +180,20 @@ class GenCSuite extends LeonRegressionSuite {
...
@@ -178,7 +180,20 @@ class GenCSuite extends LeonRegressionSuite {
}
}
}
}
protected
def
verifyValidTests
()
=
{
class
AltVerificationSuite
(
override
val
testDir
:
String
)
extends
XLangVerificationSuite
{
def
run
()
=
testValid
()
// Test only the valid ones
}
// Use our test dir and not the one from XLangVerificationSuite
val
verifier
=
new
AltVerificationSuite
(
testDir
)
test
(
"verifying test cases"
)
{
verifier
.
run
()
}
}
protected
def
testAll
()
=
{
protected
def
testAll
()
=
{
verifyValidTests
()
// Set C compiler according to the platform we're currently running on
// Set C compiler according to the platform we're currently running on
detectCompiler
match
{
detectCompiler
match
{
case
Some
(
cc
)
=>
testValid
(
cc
)
case
Some
(
cc
)
=>
testValid
(
cc
)
...
...
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