mirror of
https://github.com/github/semantic.git
synced 2024-11-28 18:23:44 +03:00
Fix the test suite.
This commit is contained in:
parent
b7364f6df7
commit
5e52bede0a
@ -8,11 +8,12 @@ import Data.Foldable
|
|||||||
import Data.Functor.Foldable (cata, embed)
|
import Data.Functor.Foldable (cata, embed)
|
||||||
import qualified Data.Machine as Machine
|
import qualified Data.Machine as Machine
|
||||||
|
|
||||||
|
import Control.Rewriting hiding (context)
|
||||||
import Data.Algebra
|
import Data.Algebra
|
||||||
import Data.Blob
|
import Data.Blob
|
||||||
import qualified Data.Language as Language
|
import qualified Data.Language as Language
|
||||||
import Data.Reprinting.Token
|
|
||||||
import Data.Reprinting.Scope
|
import Data.Reprinting.Scope
|
||||||
|
import Data.Reprinting.Token
|
||||||
import Data.Sum
|
import Data.Sum
|
||||||
import qualified Data.Syntax.Literal as Literal
|
import qualified Data.Syntax.Literal as Literal
|
||||||
import Language.JSON.PrettyPrint
|
import Language.JSON.PrettyPrint
|
||||||
@ -60,7 +61,7 @@ spec = describe "reprinting" $ do
|
|||||||
printed `shouldBe` Right src
|
printed `shouldBe` Right src
|
||||||
|
|
||||||
it "should be able to parse the output of a refactor" $ do
|
it "should be able to parse the output of a refactor" $ do
|
||||||
let tagged = increaseNumbers (mark Refactored tree)
|
let (Right tagged) = rewrite (somewhere increaseNumbers markRefactored) () (mark Unmodified tree)
|
||||||
let (Right printed) = runReprinter src defaultJSONPipeline tagged
|
let (Right printed) = runReprinter src defaultJSONPipeline tagged
|
||||||
tree' <- runTask (parse jsonParser (Blob printed path Language.JSON))
|
tree' <- runTask (parse jsonParser (Blob printed path Language.JSON))
|
||||||
length tree' `shouldSatisfy` (/= 0)
|
length tree' `shouldSatisfy` (/= 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user