Skip to content

Commit

Permalink
Add one smallest FQTest
Browse files Browse the repository at this point in the history
  • Loading branch information
shingarov committed Oct 18, 2024
1 parent ed39785 commit e882b8f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Refinements-Tests/FQNegTest.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Class {
#name : #FQNegTest,
#superclass : #FQTest,
#category : #'Refinements-Tests'
}

{ #category : #tests }
FQNegTest >> testConjRhs [
self proveNeg: '
constraint:
env []
lhs {v:int | Bool true }
rhs {v:int | ((0 toInt < 1) & (1 toInt < 0)) }
id 1
tag [1]
'
]
17 changes: 17 additions & 0 deletions src/Refinements-Tests/FQPosTest.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Class {
#name : #FQPosTest,
#superclass : #FQTest,
#category : #'Refinements-Tests'
}

{ #category : #tests }
FQPosTest >> testConjRhs [
self provePos: '
constraint:
env []
lhs {v:int | Bool true }
rhs {v:int | ((0 toInt < 1) & (1 toInt > 0)) }
id 1
tag [1]
'
]
21 changes: 21 additions & 0 deletions src/Refinements-Tests/FQTest.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Class {
#name : #FQTest,
#superclass : #TestCase,
#category : #'Refinements-Tests'
}

{ #category : #proving }
FQTest >> proveNeg: txt [
| q |
q := FQParser parse: txt.
self deny: q isPetitFailure.
self deny: q solve isSafe
]

{ #category : #proving }
FQTest >> provePos: txt [
| q |
q := FQParser parse: txt.
self deny: q isPetitFailure.
self assert: q solve isSafe
]

0 comments on commit e882b8f

Please sign in to comment.