Skip to content

Commit 323fd92

Browse files
committed
Add missing INSTANCE FiniteSets
[Bug]
1 parent 2e196e7 commit 323fd92

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

modules/Graphs.tla

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
LOCAL INSTANCE Naturals
33
LOCAL INSTANCE Sequences
44
LOCAL INSTANCE SequencesExt
5+
LOCAL INSTANCE FiniteSets
56

67
IsDirectedGraph(G) ==
78
/\ G = [node |-> G.node, edge |-> G.edge]

tests/AllTests.tla

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ EXTENDS SequencesExtTests,
1313
FunctionsTests,
1414
CSVTests,
1515
CombinatoricsTests,
16-
FoldsTests
16+
FoldsTests,
17+
GraphsTests
1718

1819
===========================================

tests/GraphsTests.tla

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
------------------------- MODULE GraphsTests -------------------------
2+
EXTENDS Graphs, TLCExt
3+
4+
ASSUME LET T == INSTANCE TLC IN T!PrintT("GraphsTests")
5+
6+
ASSUME AssertEq(SimplePath([edge|-> {}, node |-> {}]), {})
7+
ASSUME AssertEq(SimplePath([edge|-> {}, node |-> {1,2,3}]), {<<1>>, <<2>>, <<3>>})
8+
ASSUME AssertEq(SimplePath([edge|-> {<<1,2>>, <<2,3>>}, node |-> {1,2,3}]),
9+
{ <<1>>, <<2>>, <<3>>, <<1,2>>, <<2,3>>, <<1,2,3>> } )
10+
11+
=====================================================================

0 commit comments

Comments
 (0)