mirror of
https://github.com/github/semantic.git
synced 2024-12-18 12:21:57 +03:00
25 lines
784 B
Haskell
25 lines
784 B
Haskell
{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
|
|
module Main (main) where
|
|
|
|
import qualified System.Path as Path
|
|
import Test.Tasty
|
|
import TreeSitter.TypeScript
|
|
import qualified TreeSitter.TypeScript.AST as Ts
|
|
import AST.TestHelpers
|
|
import AST.Unmarshal
|
|
import qualified Language.TypeScript.AST as Ts
|
|
import Language.TypeScript.Grammar
|
|
import qualified System.Path as Path
|
|
import Test.Tasty
|
|
|
|
main :: IO ()
|
|
main
|
|
= Path.absDir <$> Ts.getTestCorpusDir
|
|
>>= readCorpusFiles'
|
|
>>= traverse (testCorpus parse)
|
|
>>= defaultMain . tests
|
|
where parse = parseByteString @Ts.Program @() tree_sitter_typescript
|
|
|
|
tests :: [TestTree] -> TestTree
|
|
tests = testGroup "tree-sitter-typescript corpus tests"
|