1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00
semantic/semantic-go/test/Test.hs

20 lines
612 B
Haskell
Raw Normal View History

2020-02-04 00:58:24 +03:00
{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
module Main (main) where
import AST.Test
2020-02-04 00:58:24 +03:00
import AST.Unmarshal
import qualified Language.Go.AST as Go
import Language.Go.Grammar
import qualified System.Path as Path
import Test.Tasty
2020-02-04 00:58:24 +03:00
main :: IO ()
main
= readCorpusFiles (Path.relDir "tree-sitter-go/vendor/tree-sitter-go/corpus")
>>= traverse (testCorpus parse)
>>= defaultMain . tests
where parse = parseByteString @Go.SourceFile @() tree_sitter_go
tests :: [TestTree] -> TestTree
tests = testGroup "tree-sitter-go corpus tests"