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