chore(sap): more test for compileBlocks
This commit is contained in:
parent
fde97b048a
commit
41cb7d2abc
@ -96,7 +96,7 @@ spec = do
|
|||||||
compileBlocks wA wE [(w0,True),(w1,True),(w1,False),(w1,True),(w1,False),(w2,True),(w3,True)] `shouldBe` [(wA,w1),(w2,wE)]
|
compileBlocks wA wE [(w0,True),(w1,True),(w1,False),(w1,True),(w1,False),(w2,True),(w3,True)] `shouldBe` [(wA,w1),(w2,wE)]
|
||||||
compileBlocks wA wE [(w0,False),(w1,False),(w2,True),(w3,False),(w4,True)] `shouldBe` [(wA,w1),(w2,w3),(w4,wE)]
|
compileBlocks wA wE [(w0,False),(w1,False),(w2,True),(w3,False),(w4,True)] `shouldBe` [(wA,w1),(w2,w3),(w4,wE)]
|
||||||
compileBlocks wA wE [(w1,False),(w2,True),(wF,True ),(w3,False)] `shouldBe` [(wA,w1),(w2,w3)]
|
compileBlocks wA wE [(w1,False),(w2,True),(wF,True ),(w3,False)] `shouldBe` [(wA,w1),(w2,w3)]
|
||||||
compileBlocks wA wE [(w1,True),(w2,False),(wF,False),(w3,True)] `shouldBe` [(wA,w2),(w3,wE)]
|
compileBlocks wA wE [(w1,True),(w2,False),(wF,False),(w3,True)] `shouldBe` [(wA,w2),(w3,wE)]
|
||||||
compileBlocks wA wE [(w2,False),(wF,False),(w3,True)] `shouldBe` [(wA,w2),(w3,wE)]
|
compileBlocks wA wE [(w2,False),(wF,False),(w3,True)] `shouldBe` [(wA,w2),(w3,wE)]
|
||||||
compileBlocks wA wE [(w2,False),(wF,False)] `shouldBe` [(wA,w2) ]
|
compileBlocks wA wE [(w2,False),(wF,False)] `shouldBe` [(wA,w2) ]
|
||||||
|
|
||||||
@ -117,9 +117,11 @@ spec = do
|
|||||||
d3 <- arbitrary `suchThat` (d1 <)
|
d3 <- arbitrary `suchThat` (d1 <)
|
||||||
d4 <- arbitrary `suchThat` (d3 <)
|
d4 <- arbitrary `suchThat` (d3 <)
|
||||||
return (d1,d2,d3,d4)
|
return (d1,d2,d3,d4)
|
||||||
b <- generate arbitrary
|
b3 <- generate arbitrary
|
||||||
let test = compileBlocks d1 d2 [(d3,b),(d4,not b)]
|
b4 <- generate arbitrary
|
||||||
result | b = [(d1, min d2 d4)]
|
let test = compileBlocks d1 d2 [(d3,b3),(d4,b4)]
|
||||||
| d2 > d4 = [(d1,d3),(d4,d2)]
|
result | b3, b4 = [(d1, d2)]
|
||||||
| otherwise = [(d1, min d2 d3)]
|
| b3 = [(d1, min d2 d4)]
|
||||||
|
| b4, d2 > d4 = [(d1,d3),(d4,d2)]
|
||||||
|
| otherwise = [(d1, min d2 d3)]
|
||||||
test `shouldBe` result
|
test `shouldBe` result
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user