---
cases:
  - note: partialiter/sets unique
    query: data.test.p = x
    modules:
      - |
        package test

        p := count([x | q[x]])

        q contains 1

        q contains 1

        q contains 2
    want_result:
      - x: 2
  - note: partialiter/objects unique
    query: data.test.p = x
    modules:
      - |
        package test

        p := count([x | q[x]])

        q[1] := 1

        q[1] := 1

        q[2] := 1
    want_result:
      - x: 2
  - note: partialiter/objects conflict
    query: data.test.p = x
    modules:
      - |
        package test

        p := count([x | q[x]])

        q[1] := 1

        q[1] := 2

        q[2] := 1
    want_error_code: eval_conflict_error
