Skip to content

Commit 6765aa7

Browse files
committed
match: fix test cases
1 parent c83380f commit 6765aa7

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

prover/t/unit/match-assoc-comm.k

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,20 +229,24 @@ module TEST-MATCH-ASSOC-COMM
229229
)
230230
.Declarations
231231

232-
rule test("match-assoc-comm", 13)
233-
=> assert( #error( "???" ), .MatchResults
232+
rule test("match-assoc-comm", 12)
233+
=> assert( #matchResult( subst: W0 { Loc } |-> Y0 { Loc }
234+
, rest: .Patterns
235+
)
236+
, .MatchResults
234237
== #match( terms: \and(sep( pto ( Y0 { Loc } , c ( Z { Loc }))
235238
, pto ( X0 { Loc } , c ( Y0 { Loc }))
236239
) )
237-
, pattern: pto ( X0 { Loc } , c ( W0 { Loc }))
238-
, pto ( W0 { Loc } , c ( Z { Loc }))
240+
, pattern: sep ( pto ( X0 { Loc } , c ( W0 { Loc }))
241+
, pto ( W0 { Loc } , c ( Z { Loc }))
242+
)
239243
, variables: W0 { Loc }
240244
)
241245
)
242246
.Declarations
243247

244248
// matching on mu terms with different binders
245-
rule test("match-assoc-comm", 14)
249+
rule test("match-assoc-comm", 13)
246250
=> assert( #matchResult( subst: .Map , rest: .Patterns )
247251
, .MatchResults
248252
== #matchAssocComm( terms: \mu #X0 . \and(#X0, #PHI1)

prover/t/unit/match-assoc.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ module TEST-MATCH-ASSOC
124124
// Match multiple occurances of a variable
125125
rule test("match-assoc", 10)
126126
=> symbol c ( Data ) : Data
127-
assert( #matchResult( subst: X0 |-> c( #hole )
127+
assert( #matchResult( subst: X0 { Data } |-> c( #hole )
128128
, rest: .Patterns
129129
)
130130
, .MatchResults

0 commit comments

Comments
 (0)