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

21 lines
607 B
Haskell
Raw Normal View History

{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
module Main (main) where
import qualified System.Path as Path
import Test.Tasty
2020-03-19 23:33:36 +03:00
import qualified Language.CodeQL.AST as CodeQL
import Language.CodeQL.Grammar
import AST.Test
import AST.Unmarshal
main :: IO ()
main
2020-03-19 23:33:36 +03:00
= Path.absDir <$> CodeQL.getTestCorpusDir
>>= readCorpusFiles'
>>= traverse (testCorpus parse)
>>= defaultMain . tests
2020-03-28 01:27:07 +03:00
where parse = parseByteString @CodeQL.Ql @() tree_sitter_ql
tests :: [TestTree] -> TestTree
2020-03-05 04:07:48 +03:00
tests = testGroup "tree-sitter-ql corpus tests"