]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Select4.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Select4.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Select4.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Select4.scl
new file mode 100644 (file)
index 0000000..3199e95
--- /dev/null
@@ -0,0 +1,18 @@
+import "StandardLibrary"
+import "Minigraph"
+
+main = withGraph do
+    a = resource "a"
+    b = map resource ["b0", "b1", "b2"]
+    r = map resource ["r0", "r1"]
+    
+    enforce
+        Statement a (r!0) (b!0)
+        Statement a (r!0) (b!1)
+        Statement a (r!1) (b!1)
+        Statement a (r!1) (b!2)
+    sort $ map uriOf $ select ?x where 
+        <|> Statement a (r!0) ?x
+            Statement a (r!1) ?x
+--
+[b0, b1, b1, b2]