1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00
semantic/semantic-python/test/PreciseTest.hs

20 lines
633 B
Haskell
Raw Normal View History

{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
module Main (main) where
import qualified System.Path as Path
import Test.Tasty
import TreeSitter.Python
import qualified TreeSitter.Python.AST as Py
2020-02-07 00:30:17 +03:00
import AST.Test
import AST.Unmarshal
main :: IO ()
main
= readCorpusFiles (Path.relDir "tree-sitter-python/vendor/tree-sitter-python/test/corpus")
>>= traverse (testCorpus parse)
>>= defaultMain . tests
where parse = parseByteString @Py.Module @() tree_sitter_python
tests :: [TestTree] -> TestTree
tests = testGroup "tree-sitter-python corpus tests"