1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

move Java corpus tests from tree-sitter-java to semantic-java

This commit is contained in:
Ayman Nadeem 2020-02-04 12:32:14 -05:00
parent fd912530b6
commit 96547877cd

View File

@ -0,0 +1,20 @@
{-# 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 TreeSitter.Test.Helpers
import TreeSitter.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"