mirror of
https://github.com/github/semantic.git
synced 2024-11-29 11:02:26 +03:00
Fix up tests
This commit is contained in:
parent
23920a04cd
commit
8b9bc575b6
@ -568,7 +568,7 @@ instance Listable Span where
|
|||||||
tiers = cons2 Span
|
tiers = cons2 Span
|
||||||
|
|
||||||
instance Listable Blob where
|
instance Listable Blob where
|
||||||
tiers = cons3 Blob
|
tiers = cons4 Blob
|
||||||
|
|
||||||
instance Listable BlobPair where
|
instance Listable BlobPair where
|
||||||
tiers = liftTiers tiers
|
tiers = liftTiers tiers
|
||||||
|
@ -67,5 +67,5 @@ spec = describe "reprinting" $ do
|
|||||||
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 (Just tagged) = rewrite (mark Unmodified tree) (topDownAny increaseNumbers)
|
let (Just tagged) = rewrite (mark Unmodified tree) (topDownAny increaseNumbers)
|
||||||
let (Right printed) = runReprinter src defaultJSONPipeline tagged
|
let (Right printed) = runReprinter src defaultJSONPipeline tagged
|
||||||
tree' <- runTaskOrDie (parse jsonParser (Blob printed path Language.JSON))
|
tree' <- runTaskOrDie (parse jsonParser (Blob printed path Language.JSON mempty))
|
||||||
length tree' `shouldSatisfy` (/= 0)
|
length tree' `shouldSatisfy` (/= 0)
|
||||||
|
@ -22,4 +22,4 @@ spec = parallel $ do
|
|||||||
output <- fmap runBuilder . runTaskOrDie $ parseTermBuilder TermSExpression [methodsBlob]
|
output <- fmap runBuilder . runTaskOrDie $ parseTermBuilder TermSExpression [methodsBlob]
|
||||||
output `shouldBe` "(Statements\n (Method\n (Empty)\n (Identifier)\n (Statements)))\n"
|
output `shouldBe` "(Statements\n (Method\n (Empty)\n (Identifier)\n (Statements)))\n"
|
||||||
where
|
where
|
||||||
methodsBlob = Blob "def foo\nend\n" "methods.rb" Ruby
|
methodsBlob = Blob "def foo\nend\n" "methods.rb" Ruby mempty
|
||||||
|
Loading…
Reference in New Issue
Block a user