InfoSpec.hs 432 B

123456789101112131415
  1. module InfoSpec where
  2. import Test.Hspec
  3. import Expectation
  4. import Info
  5. import Types
  6. spec :: Spec
  7. spec = do
  8. describe "typeExpr" $ do
  9. it "shows types of the expression and its outers" $ do
  10. withDirectory "test/data/ghc-mod-check" $ do
  11. res <- typeExpr defaultOptions "Data.Foo" 9 5 "Data/Foo.hs"
  12. res `shouldBe` "9 5 11 40 \"Int -> a -> a -> a\"\n7 1 11 40 \"Int -> Integer\"\n"