]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/PatternError.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / PatternError.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/PatternError.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/PatternError.scl
new file mode 100644 (file)
index 0000000..ce417af
--- /dev/null
@@ -0,0 +1,22 @@
+import "Prelude"\r
+\r
+data CP = CP Integer String\r
+\r
+//cpName :: CP -> String\r
+cpName CP cp name = name\r
+\r
+connectionPoints :: Integer -> [(CP, CP)]\r
+connectionPoints n = []\r
+\r
+hasTerminalProblems :: Integer -> Boolean\r
+hasTerminalProblems uc =\r
+    let cps = connectionPoints uc\r
+        cpCount = length cps\r
+        dcps = map snd cps\r
+        dnames = map cpName dcps\r
+        dcpNameCount = length $ unique $ sort dnames\r
+    in cpCount != dcpNameCount\r
+\r
+main = "Not OK"\r
+--\r
+6:8-6:10: ???
\ No newline at end of file