aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/language-semantics/src/test
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2024-01-31 02:00:09 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2024-01-31 18:45:13 +0100
commitc63126d2f1ce5f571c316b37e00fb43d2da7c7d3 (patch)
tree16e9dd04624565f7c9ccedd17749a9f264e89cb0 /subprojects/language-semantics/src/test
parentfix(build): avoid cyclic dependency (diff)
downloadrefinery-c63126d2f1ce5f571c316b37e00fb43d2da7c7d3.tar.gz
refinery-c63126d2f1ce5f571c316b37e00fb43d2da7c7d3.tar.zst
refinery-c63126d2f1ce5f571c316b37e00fb43d2da7c7d3.zip
refactor(language): module and node declarations
* New default file extension: .refinery (.problem is also supported). * Add module keyword for self-contained modules. * Rename indiv declarations to atom declaration. * Add node and multi declarations for explicitly declared nodes and multi-objects, respectively.
Diffstat (limited to 'subprojects/language-semantics/src/test')
-rw-r--r--subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/SolutionSerializerTest.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/SolutionSerializerTest.java b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/SolutionSerializerTest.java
index 8ef449b0..b682a7d6 100644
--- a/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/SolutionSerializerTest.java
+++ b/subprojects/language-semantics/src/test/java/tools/refinery/language/semantics/SolutionSerializerTest.java
@@ -183,6 +183,49 @@ class SolutionSerializerTest {
183 !exists(Foo::new). 183 !exists(Foo::new).
184 Foo(a). 184 Foo(a).
185 default !ref(*, *). 185 default !ref(*, *).
186 """), Arguments.of("""
187 atom a.
188 class Foo.
189 """, """
190 Foo(a).
191 scope Foo += 0.
192 """, """
193 !exists(Foo::new).
194 Foo(a).
195 """), Arguments.of("""
196 multi a.
197 class Foo.
198 """, """
199 Foo(a).
200 !exists(Foo::new).
201 scope Foo = 2.
202 """, """
203 !exists(a).
204 !exists(Foo::new).
205 Foo(foo1).
206 Foo(foo2).
207 """), Arguments.of("""
208 node a.
209 class Foo.
210 """, """
211 Foo(a).
212 ?exists(a).
213 scope Foo = 2, Foo += 1.
214 """, """
215 !exists(Foo::new).
216 Foo(a).
217 Foo(foo1).
218 """), Arguments.of("""
219 node a.
220 class Foo.
221 """, """
222 Foo(a).
223 ?exists(a).
224 scope Foo = 1, Foo += 1.
225 """, """
226 !exists(a).
227 !exists(Foo::new).
228 Foo(foo1).
186 """)); 229 """));
187 } 230 }
188} 231}