mirror of
https://github.com/github/semantic.git
synced 2025-01-01 19:55:34 +03:00
move Java corpus tests from tree-sitter-java to semantic-java
This commit is contained in:
parent
fd912530b6
commit
96547877cd
20
semantic-java/test/Test.hs
Normal file
20
semantic-java/test/Test.hs
Normal 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"
|
Loading…
Reference in New Issue
Block a user