1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Use makeState to tidy up an expectation.

This commit is contained in:
Rob Rix 2017-05-03 09:42:18 -04:00
parent 72de8792c4
commit 7ae74cdacc

View File

@ -34,7 +34,7 @@ spec = do
snd <$> runAssignment red (makeState "hello" [Rose (rec Red 0 5) []]) `shouldBe` Result [] (Just (Out "hello")) snd <$> runAssignment red (makeState "hello" [Rose (rec Red 0 5) []]) `shouldBe` Result [] (Just (Out "hello"))
it "does not advance past the current node" $ it "does not advance past the current node" $
fst <$> runAssignment (symbol Red) (makeState "hi" [ Rose (rec Red 0 2) [] ]) `shouldBe` Result [] (Just (AssignmentState 0 (Info.SourcePos 1 1) "hi" [ Rose (rec Red 0 2) [] ])) fst <$> runAssignment (symbol Red) (makeState "hi" [ Rose (rec Red 0 2) [] ]) `shouldBe` Result [] (Just (makeState "hi" [ Rose (rec Red 0 2) [] ]))
describe "source" $ do describe "source" $ do
it "produces the nodes source" $ it "produces the nodes source" $