---
cases:
  - data:
    modules:
      - |
        package test
        p {
            units.parse_bytes("8kb") > units.parse_bytes("7kb")
        }
    note: units_parse_bytes/comparison
    query: data.test.p = x
    want_result:
      - x: true
  - data:
    modules:
      - |
        package test
        p {
            units.parse_bytes("8gb") > units.parse_bytes("8mb")
        }
    note: units_parse_bytes/comparison
    query: data.test.p = x
    want_result:
      - x: true
  - data:
    modules:
      - |
        package test
        p {
            units.parse_bytes("1234kb") < units.parse_bytes("1gb")
        }
    note: units_parse_bytes/comparison
    query: data.test.p = x
    want_result:
      - x: true
  - data:
    modules:
      - |
        package test
        p {
            units.parse_bytes("1024") == units.parse_bytes("1KiB")
        }
    note: units_parse_bytes/comparison
    query: data.test.p = x
    want_result:
      - x: true
  - data:
    modules:
      - |
        package test
        p {
            units.parse_bytes("2MiB") == units.parse_bytes("2097152")
        }
    note: units_parse_bytes/comparison
    query: data.test.p = x
    want_result:
      - x: true
  - data:
    modules:
      - |
        package test
        p {
            units.parse_bytes("3MiB") > units.parse_bytes("3MB")
        }
    note: units_parse_bytes/comparison
    query: data.test.p = x
    want_result:
      - x: true
  - data:
    modules:
      - |
        package test
        p {
            units.parse_bytes("2MiB") == units.parse_bytes("2Mi")
        }
    note: units_parse_bytes/comparison
    query: data.test.p = x
    want_result:
      - x: true
  - data:
    modules:
      - |
        package test
        p {
            units.parse_bytes("4Mi") > units.parse_bytes("4M")
        }
    note: units_parse_bytes/comparison
    query: data.test.p = x
    want_result:
      - x: true
  - data:
    modules:
      - |
        package test
        p {
            units.parse_bytes("4.1Mi") > units.parse_bytes("4Mi")
        }
    note: units_parse_bytes/comparison
    query: data.test.p = x
    want_result:
      - x: true
  - data:
    modules:
      - |
        package test
        p {
            units.parse_bytes("128Gi") == units.parse_bytes("137438953472")
        }
    note: units_parse_bytes/comparison
    query: data.test.p = x
    want_result:
      - x: true
