1
1
mirror of https://github.com/github/semantic.git synced 2024-11-23 08:27:56 +03:00
semantic/semantic-go/test/PreciseTest.hs
2020-04-20 11:45:26 -04:00

21 lines
595 B
Haskell

{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
module Main (main) where
import AST.Test
import AST.Unmarshal
import qualified Language.Go.AST as Go
import Language.Go.Grammar
import qualified System.Path as Path
import Test.Tasty
main :: IO ()
main
= Path.absDir <$> Go.getTestCorpusDir
>>= readCorpusFiles'
>>= traverse (testCorpus parse)
>>= defaultMain . tests
where parse = parseByteString @Go.SourceFile @() tree_sitter_go
tests :: [TestTree] -> TestTree
tests = testGroup "tree-sitter-go corpus tests"