1
1
mirror of https://github.com/github/semantic.git synced 2024-12-12 04:58:02 +03:00
semantic/semantic-codeql/test/PreciseTest.hs
2020-05-20 14:39:47 -04:00

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"