anweiss/cddl

Tweak did test to make it easier to write validation tests

itamarst opened this issue · 0 comments

It would be nice to have a test that generalizes and simplifies the did test, where given a particular directory structure of CDDL/valid CBOR/invalid CBOR it does validations and ensures they succeed/fail respectively.

Hardcoding bad file names, in particular, doesn't scale.

E.g. one could have files to validate that start with either "good-" or "bad-":

tests/fixtures/did/
    example1/
        schema.cddl
        good-empty.cbor
        good-multiple-items.cbor
        bad-not-a-list.cbor

(Also it's unclear to me what did stands for?)