mirror of
https://github.com/github/semantic.git
synced 2024-12-18 20:31:55 +03:00
20 lines
622 B
Haskell
20 lines
622 B
Haskell
{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
|
|
module Main (main) where
|
|
|
|
import qualified System.Path as Path
|
|
import Test.Tasty
|
|
import TreeSitter.TSX
|
|
import qualified TreeSitter.TSX.AST as Ts
|
|
import AST.Test
|
|
import AST.Unmarshal
|
|
|
|
main :: IO ()
|
|
main
|
|
= readCorpusFiles (Path.relDir "tree-sitter-tsx/vendor/tree-sitter-typescript/tsx/corpus")
|
|
>>= traverse (testCorpus parse)
|
|
>>= defaultMain . tests
|
|
where parse = parseByteString @Ts.Program @() tree_sitter_tsx
|
|
|
|
tests :: [TestTree] -> TestTree
|
|
tests = testGroup "tree-sitter-tsx corpus tests"
|