;; lib/minikanren/tests/removeo-allo.sx — remove every occurrence of x.

(mk-test
  "removeo-allo-multi"
  (run*
    q
    (removeo-allo
      2
      (list 1 2 3 2 4 2)
      q))
  (list (list 1 3 4)))

(mk-test
  "removeo-allo-single"
  (run*
    q
    (removeo-allo 2 (list 1 2 3) q))
  (list (list 1 3)))

(mk-test
  "removeo-allo-no-match"
  (run*
    q
    (removeo-allo 99 (list 1 2 3) q))
  (list (list 1 2 3)))

(mk-test
  "removeo-allo-everything"
  (run*
    q
    (removeo-allo 1 (list 1 1 1) q))
  (list (list)))

(mk-test
  "removeo-allo-empty"
  (run* q (removeo-allo 1 (list) q))
  (list (list)))

(mk-tests-run!)
