1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00
semantic/semantic-codeql/test/PreciseTest.hs
2020-03-27 15:27:07 -07:00

21 lines
607 B
Haskell

{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
module Main (main) where
import qualified System.Path as Path
import Test.Tasty
import qualified Language.CodeQL.AST as CodeQL
import Language.CodeQL.Grammar
import AST.Test
import AST.Unmarshal
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"