Skip to content

Commit

Permalink
Update/fix ops.repl tests for namespaced keysets
Browse files Browse the repository at this point in the history
  • Loading branch information
0xd34df00d committed Nov 27, 2023
1 parent 419cab4 commit 4db6f64
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions pact-core-tests/pact-tests/ops.repl
Original file line number Diff line number Diff line change
Expand Up @@ -449,15 +449,16 @@
(expect "!= keyset keyset" true (!= (read-keyset "k1") (read-keyset "k2")))

"===== keyset ref equality"
; (env-exec-config ["DisablePact44"])
(env-data { "k1": ["k1"], "k2": ["k2"] })
(env-keys ["k1" "k2"])
(define-keyset 'k1 (read-keyset "k1"))
(define-keyset 'k2 (read-keyset "k2"))
(expect "= keysetRef keysetRef" true (= (keyset-ref-guard "k1") (keyset-ref-guard "k1")))
(expect "not = keysetRef keysetRef" false (= (keyset-ref-guard "k1") (keyset-ref-guard "k2")))
(expect "not != keysetRef keysetRef" false (!= (keyset-ref-guard "k1") (keyset-ref-guard "k1")))
(expect "!= keysetRef keysetRef" true (!= (keyset-ref-guard "k1") (keyset-ref-guard "k2")))
(define-namespace 'alice (read-keyset 'k1) (read-keyset 'k1))
(namespace 'alice)
(define-keyset "alice.k1" (read-keyset "k1"))
(define-keyset "alice.k2" (read-keyset "k2"))
(expect "= keysetRef keysetRef" true (= (keyset-ref-guard "alice.k1") (keyset-ref-guard "alice.k1")))
(expect "not = keysetRef keysetRef" false (= (keyset-ref-guard "alice.k1") (keyset-ref-guard "alice.k2")))
(expect "not != keysetRef keysetRef" false (!= (keyset-ref-guard "alice.k1") (keyset-ref-guard "alice.k1")))
(expect "!= keysetRef keysetRef" true (!= (keyset-ref-guard "alice.k1") (keyset-ref-guard "alice.k2")))

(module tm G
(defcap G () true)
Expand Down

0 comments on commit 4db6f64

Please sign in to comment.