1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 02:44:36 +03:00
semantic/semantic-java/test/Test.hs
2020-02-06 16:29:22 -05:00

21 lines
599 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.Test
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"