]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/ModuleRegressionTests.java
(refs #7365) Fixed the bug in the test CHR11.scl
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / ModuleRegressionTests.java
index 44d05ac08c0d12fd067bf567125747776f72e56b..d8f703afc344d209cd18f4a7373a8a9b3caef69f 100644 (file)
@@ -1,14 +1,7 @@
 package org.simantics.scl.compiler.tests;
 
-import org.junit.AfterClass;
-import org.junit.Ignore;
 import org.junit.Test;
-import org.simantics.scl.compiler.errors.Failable;
-import org.simantics.scl.compiler.module.Module;
-import org.simantics.scl.compiler.module.coverage.CoverageUtils;
-import org.simantics.scl.compiler.module.coverage.ModuleCoverage;
 import org.simantics.scl.compiler.top.ValueNotFound;
-import org.simantics.scl.runtime.profiling.BranchPoint;
 
 public class ModuleRegressionTests extends TestBase {
 
@@ -28,6 +21,19 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void ClashingData() { test(); }
     @Test public void ClashingInstance() { test(); }
     @Test public void ClashingValueType() { test(); }
+    @Test public void ClosingBrace() { test(); }
+    @Test public void CHR1() { test(); }
+    @Test public void CHR2() { test(); }
+    @Test public void CHR3() { test(); }
+    @Test public void CHR4() { test(); }
+    @Test public void CHR5() { test(); }
+    @Test public void CHR6() { test(); }
+    @Test public void CHR7() { test(); }
+    @Test public void CHR8() { test(); }
+    @Test public void CHR9() { test(); }
+    @Test public void CHR10() { test(); }
+    @Test public void CHR11() { test(); }
+    @Test public void ClosureRecursion() { test(); }
     @Test public void Collaz() { test(); }
     @Test public void Compose() { test(); }
     @Test public void Composition() { test(); }
@@ -47,10 +53,13 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void Effects4() { test(); }
     @Test public void Effects5() { test(); }
     @Test public void Effects6() { test(); }
+    @Test public void EmptyDo() { test(); }
+    @Test public void EmptyLet() { test(); }
     @Test(expected=ValueNotFound.class) 
     public void EmptyModule() throws ValueNotFound {
         test(new String[]{"EmptyModule"}, new String[]{""});
     }
+    
     @Test public void Equality() { test(); }
     @Test public void ExistentialData() { test(); }
     @Test public void ExistentialData2() { test(); }
@@ -60,14 +69,12 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void Fibonacci2() { test(); }
     @Test public void Fibonacci3() { test(); }
     @Test public void FingerTree() { test(); }
-    @Ignore
-    @Test public void FoldMissingInitialValue() { test(); }
     @Test public void FoldlBuild1() { test(); }
     @Test public void FoldlBuild2() { test(); }
+    @Test public void FoldMissingInitialValue() { test(); }
     @Test public void Forall1() { test(); }
     @Test public void Forall2() { test(); }
     @Test public void Forall3() { test(); }
-    @Ignore
     @Test public void Formula() { test(); }
     @Test public void FromDynamic() { test(); }
     @Test public void FromDynamic2() { test(); }
@@ -75,6 +82,7 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void FromDynamic4() { test(); }
     @Test public void FromDynamic5() { test(); }
     @Test public void FunctionFunctor() { test(); }
+    @Test public void FunctionIdentity() { test(); }
     @Test public void Functor() { test(); }
     @Test public void FunctorM1() { test(); }
     @Test public void Generalization() { test(); }
@@ -83,7 +91,8 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void GuardedExpressionBug() { test(); }
     @Test public void Guards1() { test(); }
     @Test public void Guards2() { test(); }
-    @Test public void IdAsOperator() { test(); }    
+    @Test public void IdAsOperator() { test(); }
+    //@Test public void IfWithoutElse() { test(); }
     @Test public void IllegalChar() { test(); }
     @Test public void ImportJavaConstructor() { test(); }
     @Test public void ImportRef() { test(); }
@@ -107,6 +116,7 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void InvalidPattern2() { test(); }
     @Test public void InvalidPattern3() { test(); }
     @Test public void InvalidPattern4() { test(); }
+    @Test public void InvalidRunProc() { test(); }
     @Test public void InvalidTypeClassInstance1() { test(); }
     @Test public void JavaAccess1() { test(); }
     @Test public void JavaConstructors() { test(); }
@@ -114,10 +124,11 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void JavaTypes() { test(); }
     @Test public void Kinds1() { test(); }
     @Test public void Lambda() { test(); }
+    @Test public void LambdaMatch() { test(); }
     @Test public void Layout1() { test(); }
     @Test public void List() { test(); }
-    @Test public void ListError1() { test(); }
-    @Test public void ListError2() { test(); }    
+    @Test public void ListError1() { test(); }    
+    @Test public void ListError2() { test(); }
     @Test public void ListSyntax() { test(); }
     @Test public void ListSyntax10() { test(); }
     @Test public void ListSyntax11() { test(); }
@@ -136,48 +147,51 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void LocalDefinitions3() { test(); }
     @Test public void LocalDefinitions4() { test(); }
     @Test public void LocalDefinitions5() { test(); }
+    @Test public void Logger() { test(); }
+    @Test public void LP() { test(); }
     @Test public void Macros1() { test(); }
     @Test public void Macros2() { test(); }
     @Test public void Macros4() { test(); }
-    @Test public void Map1() { test(); }
-    @Test public void MarketModel() { test(); }    
+    @Test public void Map1() { test(); }    
+    @Test public void MarketModel() { test(); }
     @Test public void Matching() { test(); }
     @Test public void Matching2() { test(); }
     @Test public void Matching4() { test(); }
     @Test public void Matching5() { test(); }
+    @Test public void Matching6() { test(); }
     @Test public void MatchingWithMissingParameter() { test(); }
     @Test public void MatchingWithoutTypeAnnotations() { test(); }
     @Test public void MaximumBy() { test(); }
     @Test public void Maybe1() { test(); }
-    @Test public void Maybe2() { test(); }
-    @Test public void Maybe3() { test(); }    
+    @Test public void Maybe2() { test(); }    
+    @Test public void Maybe3() { test(); }
     @Test public void Maybe4() { test(); }
     @Test public void MissingEffect() { test(); }
     @Test public void MissingMethod() { test(); }
+    @Test public void ModuleExport() { test(); }
     @Test public void ModuleInitialization() { test(); }
     @Test public void MonadBug1() { test(); }
-    @Test public void MonadSyntax1() { test(); }
     @Test public void Monads1() { test(); }
-    @Test public void NoDefinitionErrorMessage() { test(); }    
+    @Test public void MonadSyntax1() { test(); }    
+    @Test public void NoDefinitionErrorMessage() { test(); }
     @Test public void NoInstance() { test(); }
     @Test public void NoInstance2() { test(); }
     @Test public void NonassociativeOperator() { test(); }
     @Test public void NonexistentTypeClassInAnnotation() { test(); }
-    @Test public void NonexistingEffect() { test(); }
-    @Test public void OneLineMatch() { test(); }    
+    @Test public void NonexistingEffect() { test(); }    
+    @Test public void OneLineMatch() { test(); }
     @Test public void OpenString1() { test(); }
     @Test public void OpenString2() { test(); }
     @Test public void OverloadedArithmetic1() { test(); }
     @Test public void OverloadedArithmetic2() { test(); }
     @Test public void OverloadedArithmetic3() { test(); }
     @Test public void OverloadedLiterals2() { test(); }
-    @Ignore
-    @Test public void Overloading1() { test(); }
-    @Test public void Parsing() { test(); }    
+    @Test public void Overloading1() { test(); }    
+    @Test public void Parsing() { test(); }
     @Test public void PolymorphicRecursion() { test(); }
     @Test public void PolymorphicRecursion2() { test(); }
-    @Test public void Polynomials() { test(); }
-    @Test public void PrecedenceOfNonoperators() { test(); }    
+    @Test public void Polynomials() { test(); }    
+    @Test public void PrecedenceOfNonoperators() { test(); }
     @Test public void Primes() { test(); }
     @Test public void Proc1() { test(); }
     @Test public void Proc2() { test(); }
@@ -186,6 +200,7 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void Random1() { test(); }
     @Test public void RangeSyntax() { test(); }
     @Test public void Record1() { test(); }
+    @Test public void Record2() { test(); }
     @Test public void RecordShorthand() { test(); }
     @Test public void RecursiveContext() { test(); }
     @Test public void RecursiveValues2() { test(); }
@@ -193,15 +208,13 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void RecursiveValues4() { test(); }
     @Test public void RedBlackTrees() { test(); }
     @Test public void Relations1() { test(); }
-    @Test public void Relations2() { test(); }
-    @Test public void RepeatedVariableInPattern() { test(); }    
-    @Test public void SSATypingBug() { test(); }
+    @Test public void Relations2() { test(); }    
+    @Test public void RepeatedVariableInPattern() { test(); }
     @Test public void Scanl() { test(); }
     @Test public void Search() { test(); }
     @Test public void Sections() { test(); }
     @Test public void Select1() { test(); }
     @Test public void Select2() { test(); }
-    @Test public void Select3() { test(); }
     @Test public void Select4() { test(); }
     @Test public void Select5() { test(); }
     @Test public void Select6() { test(); }
@@ -211,17 +224,24 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void SelfReferringContextInTypeClass() { test(); }
     @Test public void Serialization2() { test(); }
     @Test public void Serialization3() { test(); }
+    @Test public void Serialization4() { test(); }
     @Test public void SharedTypeVariable() { test(); }
     @Test public void ShortcutFusion() { test(); }
     @Test public void Show1() { test(); }
+    @Test public void SkipEqAndHashable() { test(); }
     @Test public void SinConst1() { test(); }
     @Test public void Sort() { test(); }
     @Test public void Sort2() { test(); }
+    @Test public void SpecConstr1() { test(); }  
+    @Test public void SSATypingBug() { test(); }
     @Test public void StreamFusion() { test(); }
     @Test public void StringEscape() { test(); }
     @Test public void StringInterpolation1() { test(); }
-    @Test public void StringMatching1() { test(); }    
+    @Test public void StringInterpolation2() { test(); }
+    @Test public void StringInterpolation3() { test(); }
+    @Test public void StringMatching1() { test(); }
     @Test public void SumOfInverses2() { test(); }
+    @Test public void SwitchSimplification() { test(); }
     @Test public void TooManyParametersToSin() { test(); }
     @Test public void Transformation1() { test(); }
     @Test public void Transformation2() { test(); }
@@ -239,8 +259,8 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void TypeAliasRefsToTypeAlias() { test(); }
     @Test public void TypeAnnotation1() { test(); }
     @Test public void TypeAnnotation2() { test(); }
-    @Test public void TypeClass() { test(); }
-    @Test public void TypeClassBug1() { test(); }    
+    @Test public void TypeClass() { test(); }    
+    @Test public void TypeClassBug1() { test(); }
     @Test(timeout=1000L) public void TypeInferenceBug2() { test(); }
     @Test public void TypeOf1() { test(); }
     @Test public void TypingBug1() { test(); }
@@ -252,23 +272,25 @@ public class ModuleRegressionTests extends TestBase {
     @Test public void Unification1() { test(); }
     @Test public void UnknownAnnotation() { test(); }
     @Test public void UnresolvedClass() { test(); }
-    @Test public void UnresolvedTypeInAnnotation() { test(); }
-    @Test public void UnresolvedTypeInInstance() { test(); }    
-    @Test public void UnresolvedVariable() { test(); }
-    @Test public void UnresolvedVariable2() { test(); }   
+    @Test public void UnresolvedTypeInAnnotation() { test(); }    
+    @Test public void UnresolvedTypeInInstance() { test(); }
+    @Test public void UnresolvedVariable() { test(); }   
+    @Test public void UnresolvedVariable2() { test(); }
     @Test public void ValueAsOperator() { test(); }
     @Test public void ValueConversion() { test(); }
     @Test public void Vector1() { test(); }
     @Test public void Vector2() { test(); }
+    @Test public void ViewPatterns1() { test(); }
     @Test public void Void1() { test(); }
     @Test public void Void2() { test(); }
     @Test public void Void3() { test(); }
-    @Test public void While() { test(); }
+    @Test public void While() { test(); }    
     @Test public void While2() { test(); }
-    @Test public void While3() { test(); }    
+    @Test public void While3() { test(); }
     @Test public void WrongDefaultMethod() { test(); }
     @Test public void WrongInstanceMethod() { test(); }
 
+    /*
     @AfterClass
     public static void checkCoverage() {
         Failable<Module> maybeModule = PRELUDE_MODULE_REPOSITORY.getModule("Prelude");
@@ -289,6 +311,6 @@ public class ModuleRegressionTests extends TestBase {
             System.out.println(bp.getCodeSize());
             printCoverageTree(bp.getChildren(), ind+1);
         }
-    }
+    }*/
 
 }