@@ -4,11 +4,11 @@ import LambdaBuffers.Compiler.KindCheck (check_)
44import LambdaBuffers.Compiler.ProtoCompat.Types (CompilerError (CompKindCheckError ), KindCheckError (UnboundTyRefError , UnboundTyVarError ))
55import Test.Tasty (TestTree , testGroup )
66import Test.Tasty.HUnit (testCase , (@?=) )
7- import Test.Utils.CompilerInput (compilerInput'undefinedForeignTyRef , compilerInput'undefinedVariable )
8- import Test.Utils.TyDef (tyDef'undefinedForeignTyRef , tyDef'undefinedForeignTyRef'TyRef , tyDef'undefinedVar , tyDef'undefinedVar'var )
7+ import Test.Utils.CompilerInput (compilerInput'undefinedForeignTyRef , compilerInput'undefinedLocalTyRef , compilerInput' undefinedVariable )
8+ import Test.Utils.TyDef (tyDef'undefinedForeignTyRef , tyDef'undefinedForeignTyRef'TyRef , tyDef'undefinedLocalTyRef , tyDef'undefinedLocalTyRef'TyRef , tyDef' undefinedVar , tyDef'undefinedVar'var )
99
1010testGKindCheckErrors :: TestTree
11- testGKindCheckErrors = testGroup " Kind Check Error Tests" [undefinedVariable, undefinedLocalTyRef]
11+ testGKindCheckErrors = testGroup " Kind Check Error Tests" [undefinedVariable, undefinedLocalTyRef, undefinedForeignTyRef ]
1212
1313undefinedVariable :: TestTree
1414undefinedVariable =
@@ -17,5 +17,10 @@ undefinedVariable =
1717
1818undefinedLocalTyRef :: TestTree
1919undefinedLocalTyRef =
20+ testCase " Catch undefined Local TyRef in Type Definition." $
21+ check_ compilerInput'undefinedLocalTyRef @?= Left (CompKindCheckError $ UnboundTyRefError tyDef'undefinedLocalTyRef tyDef'undefinedLocalTyRef'TyRef)
22+
23+ undefinedForeignTyRef :: TestTree
24+ undefinedForeignTyRef =
2025 testCase " Catch undefined Foreign TyRef in Type Definition." $
2126 check_ compilerInput'undefinedForeignTyRef @?= Left (CompKindCheckError $ UnboundTyRefError tyDef'undefinedForeignTyRef tyDef'undefinedForeignTyRef'TyRef)
0 commit comments