mirror of
https://github.com/github/semantic.git
synced 2024-12-13 11:33:47 +03:00
21 lines
606 B
Haskell
21 lines
606 B
Haskell
{-# LANGUAGE OverloadedStrings, TypeApplications #-}
|
|
module Main (main) where
|
|
|
|
import qualified System.Path as Path
|
|
import Test.Tasty
|
|
import TreeSitter.Java
|
|
import qualified TreeSitter.Java.AST as Java
|
|
import AST.TestHelpers
|
|
import AST.Unmarshal
|
|
|
|
main :: IO ()
|
|
main
|
|
= readCorpusFiles (Path.relDir "tree-sitter-java/vendor/tree-sitter-java/corpus")
|
|
>>= traverse (testCorpus parse)
|
|
>>= defaultMain . tests
|
|
where
|
|
parse = parseByteString @Java.Program @() tree_sitter_java
|
|
|
|
tests :: [TestTree] -> TestTree
|
|
tests = testGroup "tree-sitter-java corpus tests"
|