Skip to content

Commit

Permalink
Add some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamrhay committed Jan 18, 2024
1 parent 033bb28 commit e0aeaea
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions syn_tests.cfg
@@ -0,0 +1,6 @@
INIT I
NEXT N

CONSTANTS
Nodes = {}
MaxDisconnections = 0
20 changes: 20 additions & 0 deletions syn_tests.tla
@@ -0,0 +1,20 @@
---- MODULE syn_tests ----
EXTENDS syn

VARIABLE x

I == FALSE /\ x = 0
N == FALSE /\ x' = x

\* AllRegisteredForNode

ASSUME LET l == ("n1" :> <<>> @@ "n2" :> [a |-> 0, b |-> 2] @@ "n3" :> [c |-> 1])
res == AllRegisteredForNode(l)
IN res = {"a", "b", "c"}

\* Duplicates

ASSUME LET l == ("n1" :> <<>> @@ "n2" :> [a |-> 0] @@ "n3" :> [a |-> 1])
res == Duplicates(DOMAIN l, l, {})
IN res = {"a"}
====

0 comments on commit e0aeaea

Please sign in to comment.