Use pytest as the testing system instead of Bats
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 3 Sep 2020 20:50:57 +0000 (16:50 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 3 Sep 2020 21:08:57 +0000 (17:08 -0400)
pytest has several benefits:

* The tests are written in Python, so I can directly import `barectf`
  and use the package to make barectf operations instead of using the
  CLI.

  Therefore I can test the package itself.

  Also, there's a single Python interpreter instance, so you don't pay
  the Python boot up cost for each test.

* With `pytest-xdist` (also a new dev dependency), you can run tests
  in parallel, for example:

      $ poetry run py.test -v -n4 tests

* It's very well known by the Python community, whereas Bats is not that
  popular.

All in all, this makes the testing process really faster (15 seconds on
my machine; used to be 1m45). It's also somewhat more enjoyable to write
Python code than Bash code to create new tests.

This patch only converts current tests using Bats to pytest.

`tests/config/yaml/conftest.py` defines a pytest fixture named
`config_fail_test`. A test receiving this fixture gets a function which
accepts a `request` fixture as well as a relative path to a YAML file
(from the test file's directory), without the `.yaml` extension. The
testing function uses the barectf API directly to try to create a
configuration from the YAML file, ensuring that
`barectf._ConfigurationParseError` is raised in the process.

`tests/config/yaml/2/test_pass_everything.py` does what
`tests/config/2/pass/everything/pass.bats` used to do, using Python's
`subprocess` module to run the C compiler and `nm` (both of which you
can override with the `CC` and `NM` environment variables).

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
425 files changed:
poetry.lock
pyproject.toml
tests/bats/LICENSE [deleted file]
tests/bats/bin/bats [deleted symlink]
tests/bats/libexec/bats [deleted file]
tests/bats/libexec/bats-exec-suite [deleted file]
tests/bats/libexec/bats-exec-test [deleted file]
tests/bats/libexec/bats-format-tap-stream [deleted file]
tests/bats/libexec/bats-preprocess [deleted file]
tests/config/.gitignore [deleted file]
tests/config/2/fail/clock/absolute-invalid-type.yaml [deleted file]
tests/config/2/fail/clock/description-invalid-type.yaml [deleted file]
tests/config/2/fail/clock/ec-invalid-type.yaml [deleted file]
tests/config/2/fail/clock/ec-invalid.yaml [deleted file]
tests/config/2/fail/clock/fail.bats [deleted file]
tests/config/2/fail/clock/freq-0.yaml [deleted file]
tests/config/2/fail/clock/freq-invalid-type.yaml [deleted file]
tests/config/2/fail/clock/freq-neg.yaml [deleted file]
tests/config/2/fail/clock/offset-cycles-invalid-type.yaml [deleted file]
tests/config/2/fail/clock/offset-cycles-neg.yaml [deleted file]
tests/config/2/fail/clock/offset-invalid-type.yaml [deleted file]
tests/config/2/fail/clock/offset-seconds-invalid-type.yaml [deleted file]
tests/config/2/fail/clock/offset-seconds-neg.yaml [deleted file]
tests/config/2/fail/clock/offset-unknown-prop.yaml [deleted file]
tests/config/2/fail/clock/rct-invalid-type.yaml [deleted file]
tests/config/2/fail/clock/unknown-prop.yaml [deleted file]
tests/config/2/fail/clock/uuid-invalid-type.yaml [deleted file]
tests/config/2/fail/clock/uuid-invalid.yaml [deleted file]
tests/config/2/fail/config/fail.bats [deleted file]
tests/config/2/fail/config/metadata-invalid-type.yaml [deleted file]
tests/config/2/fail/config/metadata-no.yaml [deleted file]
tests/config/2/fail/config/options-gen-default-stream-def-invalid-type.yaml [deleted file]
tests/config/2/fail/config/options-gen-prefix-def-invalid-type.yaml [deleted file]
tests/config/2/fail/config/options-invalid-type.yaml [deleted file]
tests/config/2/fail/config/options-unknown-prop.yaml [deleted file]
tests/config/2/fail/config/prefix-invalid-identifier.yaml [deleted file]
tests/config/2/fail/config/prefix-invalid-type.yaml [deleted file]
tests/config/2/fail/config/unknown-prop.yaml [deleted file]
tests/config/2/fail/config/version-invalid-19.yaml [deleted file]
tests/config/2/fail/config/version-invalid-23.yaml [deleted file]
tests/config/2/fail/config/version-invalid-type.yaml [deleted file]
tests/config/2/fail/config/version-no.yaml [deleted file]
tests/config/2/fail/event/ct-invalid-type.yaml [deleted file]
tests/config/2/fail/event/ct-not-struct.yaml [deleted file]
tests/config/2/fail/event/fail.bats [deleted file]
tests/config/2/fail/event/ll-invalid-type.yaml [deleted file]
tests/config/2/fail/event/ll-non-existing.yaml [deleted file]
tests/config/2/fail/event/no-fields-at-all.yaml [deleted file]
tests/config/2/fail/event/pt-invalid-type.yaml [deleted file]
tests/config/2/fail/event/pt-not-struct.yaml [deleted file]
tests/config/2/fail/event/unknown-prop.yaml [deleted file]
tests/config/2/fail/include/cycle-sym.yaml [deleted file]
tests/config/2/fail/include/cycle.yaml [deleted file]
tests/config/2/fail/include/fail.bats [deleted file]
tests/config/2/fail/include/file-not-found-abs.yaml [deleted file]
tests/config/2/fail/include/file-not-found-in-array.yaml [deleted file]
tests/config/2/fail/include/file-not-found-recursive.yaml [deleted file]
tests/config/2/fail/include/file-not-found.yaml [deleted file]
tests/config/2/fail/include/inc-empty.yaml [deleted file]
tests/config/2/fail/include/inc-inc-not-found.yaml [deleted file]
tests/config/2/fail/include/inc-recursive-sym1.yaml [deleted file]
tests/config/2/fail/include/inc-recursive-sym2.yaml [deleted file]
tests/config/2/fail/include/inc-recursive1.yaml [deleted file]
tests/config/2/fail/include/inc-recursive2.yaml [deleted file]
tests/config/2/fail/include/inc-recursive3.yaml [deleted file]
tests/config/2/fail/include/include-include-replace.yaml [deleted file]
tests/config/2/fail/include/invalid-type.yaml [deleted file]
tests/config/2/fail/include/replace-file-not-found-in-array.yaml [deleted file]
tests/config/2/fail/include/replace-file-not-found.yaml [deleted file]
tests/config/2/fail/metadata/clocks-invalid-type.yaml [deleted file]
tests/config/2/fail/metadata/clocks-key-invalid-identifier.yaml [deleted file]
tests/config/2/fail/metadata/default-stream-invalid-type.yaml [deleted file]
tests/config/2/fail/metadata/default-stream-stream-default-duplicate.yaml [deleted file]
tests/config/2/fail/metadata/default-stream-unknown-stream.yaml [deleted file]
tests/config/2/fail/metadata/env-invalid-type.yaml [deleted file]
tests/config/2/fail/metadata/env-key-invalid-identifier.yaml [deleted file]
tests/config/2/fail/metadata/env-value-invalid-type.yaml [deleted file]
tests/config/2/fail/metadata/fail.bats [deleted file]
tests/config/2/fail/metadata/ll-invalid-type.yaml [deleted file]
tests/config/2/fail/metadata/ll-value-invalid-type.yaml [deleted file]
tests/config/2/fail/metadata/multiple-streams-trace-ph-no-stream-id.yaml [deleted file]
tests/config/2/fail/metadata/streams-empty.yaml [deleted file]
tests/config/2/fail/metadata/streams-invalid-type.yaml [deleted file]
tests/config/2/fail/metadata/streams-key-invalid-identifier.yaml [deleted file]
tests/config/2/fail/metadata/streams-no.yaml [deleted file]
tests/config/2/fail/metadata/ta-invalid-type.yaml [deleted file]
tests/config/2/fail/metadata/trace-empty.yaml [deleted file]
tests/config/2/fail/metadata/trace-invalid-type.yaml [deleted file]
tests/config/2/fail/metadata/trace-no.yaml [deleted file]
tests/config/2/fail/metadata/unknown-prop.yaml [deleted file]
tests/config/2/fail/stream/default-invalid-type.yaml [deleted file]
tests/config/2/fail/stream/ect-invalid-type.yaml [deleted file]
tests/config/2/fail/stream/ect-not-struct.yaml [deleted file]
tests/config/2/fail/stream/eht-id-no-multiple-events.yaml [deleted file]
tests/config/2/fail/stream/eht-id-not-int.yaml [deleted file]
tests/config/2/fail/stream/eht-id-too-small.yaml [deleted file]
tests/config/2/fail/stream/eht-id-wrong-signed.yaml [deleted file]
tests/config/2/fail/stream/eht-invalid-type.yaml [deleted file]
tests/config/2/fail/stream/eht-not-struct.yaml [deleted file]
tests/config/2/fail/stream/eht-timestamp-not-int.yaml [deleted file]
tests/config/2/fail/stream/eht-timestamp-wrong-pm.yaml [deleted file]
tests/config/2/fail/stream/eht-timestamp-wrong-signed.yaml [deleted file]
tests/config/2/fail/stream/events-empty.yaml [deleted file]
tests/config/2/fail/stream/events-invalid-type.yaml [deleted file]
tests/config/2/fail/stream/events-key-invalid-identifier.yaml [deleted file]
tests/config/2/fail/stream/events-no.yaml [deleted file]
tests/config/2/fail/stream/fail.bats [deleted file]
tests/config/2/fail/stream/pct-cs-not-int.yaml [deleted file]
tests/config/2/fail/stream/pct-cs-wrong-signed.yaml [deleted file]
tests/config/2/fail/stream/pct-cs-yes-ps-no.yaml [deleted file]
tests/config/2/fail/stream/pct-ed-not-int.yaml [deleted file]
tests/config/2/fail/stream/pct-ed-wrong-signed.yaml [deleted file]
tests/config/2/fail/stream/pct-invalid-type.yaml [deleted file]
tests/config/2/fail/stream/pct-no.yaml [deleted file]
tests/config/2/fail/stream/pct-not-struct.yaml [deleted file]
tests/config/2/fail/stream/pct-ps-not-int.yaml [deleted file]
tests/config/2/fail/stream/pct-ps-wrong-signed.yaml [deleted file]
tests/config/2/fail/stream/pct-ps-yes-cs-no.yaml [deleted file]
tests/config/2/fail/stream/pct-tb-not-int.yaml [deleted file]
tests/config/2/fail/stream/pct-tb-te-different-clocks.yaml [deleted file]
tests/config/2/fail/stream/pct-tb-wrong-pm.yaml [deleted file]
tests/config/2/fail/stream/pct-tb-wrong-signed.yaml [deleted file]
tests/config/2/fail/stream/pct-tb-yes-te-no.yaml [deleted file]
tests/config/2/fail/stream/pct-te-not-int.yaml [deleted file]
tests/config/2/fail/stream/pct-te-wrong-pm.yaml [deleted file]
tests/config/2/fail/stream/pct-te-wrong-signed.yaml [deleted file]
tests/config/2/fail/stream/pct-te-yes-tb-no.yaml [deleted file]
tests/config/2/fail/stream/unknown-prop.yaml [deleted file]
tests/config/2/fail/trace/bo-invalid-type.yaml [deleted file]
tests/config/2/fail/trace/bo-invalid.yaml [deleted file]
tests/config/2/fail/trace/bo-no.yaml [deleted file]
tests/config/2/fail/trace/fail.bats [deleted file]
tests/config/2/fail/trace/ph-magic-not-int.yaml [deleted file]
tests/config/2/fail/trace/ph-magic-wrong-signed.yaml [deleted file]
tests/config/2/fail/trace/ph-magic-wrong-size.yaml [deleted file]
tests/config/2/fail/trace/ph-not-struct.yaml [deleted file]
tests/config/2/fail/trace/ph-streamid-not-int.yaml [deleted file]
tests/config/2/fail/trace/ph-streamid-too-small.yaml [deleted file]
tests/config/2/fail/trace/ph-streamid-wrong-signed.yaml [deleted file]
tests/config/2/fail/trace/ph-uuid-et-not-int.yaml [deleted file]
tests/config/2/fail/trace/ph-uuid-et-wrong-align.yaml [deleted file]
tests/config/2/fail/trace/ph-uuid-et-wrong-signed.yaml [deleted file]
tests/config/2/fail/trace/ph-uuid-et-wrong-size.yaml [deleted file]
tests/config/2/fail/trace/ph-uuid-not-array.yaml [deleted file]
tests/config/2/fail/trace/ph-uuid-wrong-length.yaml [deleted file]
tests/config/2/fail/trace/unknown-prop.yaml [deleted file]
tests/config/2/fail/trace/uuid-invalid-type.yaml [deleted file]
tests/config/2/fail/trace/uuid-invalid-uuid.yaml [deleted file]
tests/config/2/fail/type-enum/fail.bats [deleted file]
tests/config/2/fail/type-enum/members-el-invalid-type.yaml [deleted file]
tests/config/2/fail/type-enum/members-el-member-label-invalid-type.yaml [deleted file]
tests/config/2/fail/type-enum/members-el-member-unknown-prop.yaml [deleted file]
tests/config/2/fail/type-enum/members-el-member-value-invalid-type.yaml [deleted file]
tests/config/2/fail/type-enum/members-el-member-value-outside-range-signed.yaml [deleted file]
tests/config/2/fail/type-enum/members-el-member-value-outside-range-unsigned.yaml [deleted file]
tests/config/2/fail/type-enum/members-empty.yaml [deleted file]
tests/config/2/fail/type-enum/members-invalid-type.yaml [deleted file]
tests/config/2/fail/type-enum/members-no.yaml [deleted file]
tests/config/2/fail/type-enum/members-overlap.yaml [deleted file]
tests/config/2/fail/type-enum/unknown-prop.yaml [deleted file]
tests/config/2/fail/type-enum/vt-invalid-type.yaml [deleted file]
tests/config/2/fail/type-enum/vt-no.yaml [deleted file]
tests/config/2/fail/type-float/align-0.yaml [deleted file]
tests/config/2/fail/type-float/align-3.yaml [deleted file]
tests/config/2/fail/type-float/align-invalid-type.yaml [deleted file]
tests/config/2/fail/type-float/bo-invalid-type.yaml [deleted file]
tests/config/2/fail/type-float/bo-invalid.yaml [deleted file]
tests/config/2/fail/type-float/fail.bats [deleted file]
tests/config/2/fail/type-float/size-exp-mant-wrong-sum.yaml [deleted file]
tests/config/2/fail/type-float/size-exp-no.yaml [deleted file]
tests/config/2/fail/type-float/size-invalid-type.yaml [deleted file]
tests/config/2/fail/type-float/size-mant-no.yaml [deleted file]
tests/config/2/fail/type-float/size-no.yaml [deleted file]
tests/config/2/fail/type-float/size-unknown-prop.yaml [deleted file]
tests/config/2/fail/type-float/unknown-prop.yaml [deleted file]
tests/config/2/fail/type-int/align-0.yaml [deleted file]
tests/config/2/fail/type-int/align-3.yaml [deleted file]
tests/config/2/fail/type-int/align-invalid-type.yaml [deleted file]
tests/config/2/fail/type-int/base-invalid-type.yaml [deleted file]
tests/config/2/fail/type-int/base-invalid.yaml [deleted file]
tests/config/2/fail/type-int/bo-invalid-type.yaml [deleted file]
tests/config/2/fail/type-int/bo-invalid.yaml [deleted file]
tests/config/2/fail/type-int/fail.bats [deleted file]
tests/config/2/fail/type-int/pm-invalid-type.yaml [deleted file]
tests/config/2/fail/type-int/pm-property-invalid.yaml [deleted file]
tests/config/2/fail/type-int/pm-type-invalid.yaml [deleted file]
tests/config/2/fail/type-int/pm-unknown-clock.yaml [deleted file]
tests/config/2/fail/type-int/signed-invalid-type.yaml [deleted file]
tests/config/2/fail/type-int/size-0.yaml [deleted file]
tests/config/2/fail/type-int/size-65.yaml [deleted file]
tests/config/2/fail/type-int/size-invalid-type.yaml [deleted file]
tests/config/2/fail/type-int/size-no.yaml [deleted file]
tests/config/2/fail/type-int/unknown-prop.yaml [deleted file]
tests/config/2/fail/type-string/fail.bats [deleted file]
tests/config/2/fail/type-string/unknown-prop.yaml [deleted file]
tests/config/2/fail/type-struct/fail.bats [deleted file]
tests/config/2/fail/type-struct/fields-field-invalid-identifier.yaml [deleted file]
tests/config/2/fail/type-struct/fields-invalid-type.yaml [deleted file]
tests/config/2/fail/type-struct/ma-0.yaml [deleted file]
tests/config/2/fail/type-struct/ma-3.yaml [deleted file]
tests/config/2/fail/type-struct/ma-invalid-type.yaml [deleted file]
tests/config/2/fail/type-struct/unknown-prop.yaml [deleted file]
tests/config/2/fail/type/fail.bats [deleted file]
tests/config/2/fail/type/inherit-forward.yaml [deleted file]
tests/config/2/fail/type/inherit-unknown.yaml [deleted file]
tests/config/2/fail/type/invalid-type.yaml [deleted file]
tests/config/2/fail/type/no-class.yaml [deleted file]
tests/config/2/fail/yaml/fail.bats [deleted file]
tests/config/2/fail/yaml/invalid.yaml [deleted file]
tests/config/2/pass/everything/config.yaml [deleted file]
tests/config/2/pass/everything/inc-clock.yaml [deleted file]
tests/config/2/pass/everything/inc-event.yaml [deleted file]
tests/config/2/pass/everything/inc-metadata.yaml [deleted file]
tests/config/2/pass/everything/inc-stream.yaml [deleted file]
tests/config/2/pass/everything/inc-trace.yaml [deleted file]
tests/config/2/pass/everything/pass.bats [deleted file]
tests/config/common.bash [deleted file]
tests/config/yaml/2/configs/fail/clock/absolute-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/description-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/ec-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/ec-invalid.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/freq-0.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/freq-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/freq-neg.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/offset-cycles-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/offset-cycles-neg.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/offset-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/offset-seconds-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/offset-seconds-neg.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/offset-unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/rct-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/uuid-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/clock/uuid-invalid.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/metadata-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/metadata-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/options-gen-default-stream-def-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/options-gen-prefix-def-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/options-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/options-unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/prefix-invalid-identifier.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/prefix-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/version-invalid-19.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/version-invalid-23.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/version-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/config/version-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/event/ct-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/event/ct-not-struct.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/event/ll-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/event/ll-non-existing.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/event/no-fields-at-all.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/event/pt-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/event/pt-not-struct.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/event/unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/cycle.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/file-not-found-abs.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/file-not-found-in-array.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/file-not-found-recursive.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/file-not-found.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/inc-empty.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/inc-inc-not-found.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/inc-recursive-sym1.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/inc-recursive-sym2.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/inc-recursive1.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/inc-recursive2.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/inc-recursive3.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/include-include-replace.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/replace-file-not-found-in-array.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/include/replace-file-not-found.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/clocks-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/clocks-key-invalid-identifier.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/default-stream-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/default-stream-stream-default-duplicate.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/default-stream-unknown-stream.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/env-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/env-key-invalid-identifier.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/env-value-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/ll-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/ll-value-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/multiple-streams-trace-ph-no-stream-id.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/streams-empty.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/streams-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/streams-key-invalid-identifier.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/streams-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/ta-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/trace-empty.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/trace-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/trace-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/metadata/unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/default-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/ect-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/ect-not-struct.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/eht-id-no-multiple-events.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/eht-id-not-int.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/eht-id-too-small.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/eht-id-wrong-signed.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/eht-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/eht-not-struct.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/eht-timestamp-not-int.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/eht-timestamp-wrong-pm.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/eht-timestamp-wrong-signed.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/events-empty.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/events-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/events-key-invalid-identifier.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/events-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-cs-not-int.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-cs-wrong-signed.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-cs-yes-ps-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-ed-not-int.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-ed-wrong-signed.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-not-struct.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-ps-not-int.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-ps-wrong-signed.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-ps-yes-cs-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-tb-not-int.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-tb-te-different-clocks.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-tb-wrong-pm.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-tb-wrong-signed.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-tb-yes-te-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-te-not-int.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-te-wrong-pm.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-te-wrong-signed.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/pct-te-yes-tb-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/stream/unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/bo-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/bo-invalid.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/bo-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-magic-not-int.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-magic-wrong-signed.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-magic-wrong-size.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-not-struct.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-streamid-not-int.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-streamid-too-small.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-streamid-wrong-signed.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-uuid-et-not-int.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-uuid-et-wrong-align.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-uuid-et-wrong-signed.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-uuid-et-wrong-size.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-uuid-not-array.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/ph-uuid-wrong-length.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/uuid-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/trace/uuid-invalid-uuid.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/members-el-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/members-el-member-label-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/members-el-member-unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/members-el-member-value-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/members-el-member-value-outside-range-signed.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/members-el-member-value-outside-range-unsigned.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/members-empty.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/members-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/members-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/members-overlap.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/vt-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-enum/vt-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-float/align-0.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-float/align-3.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-float/align-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-float/bo-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-float/bo-invalid.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-float/size-exp-mant-wrong-sum.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-float/size-exp-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-float/size-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-float/size-mant-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-float/size-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-float/size-unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-float/unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/align-0.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/align-3.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/align-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/base-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/base-invalid.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/bo-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/bo-invalid.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/pm-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/pm-property-invalid.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/pm-type-invalid.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/pm-unknown-clock.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/signed-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/size-0.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/size-65.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/size-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/size-no.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-int/unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-string/unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-struct/fields-field-invalid-identifier.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-struct/fields-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-struct/ma-0.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-struct/ma-3.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-struct/ma-invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type-struct/unknown-prop.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type/inherit-forward.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type/inherit-unknown.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type/invalid-type.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/type/no-class.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/fail/yaml/invalid.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/pass/everything/config.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/pass/everything/inc-clock.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/pass/everything/inc-event.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/pass/everything/inc-metadata.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/pass/everything/inc-stream.yaml [new file with mode: 0644]
tests/config/yaml/2/configs/pass/everything/inc-trace.yaml [new file with mode: 0644]
tests/config/yaml/2/test_fail_clock.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_config.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_event.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_include.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_metadata.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_stream.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_trace.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_type.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_type_enum.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_type_float.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_type_int.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_type_string.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_type_struct.py [new file with mode: 0644]
tests/config/yaml/2/test_fail_yaml.py [new file with mode: 0644]
tests/config/yaml/2/test_pass_everything.py [new file with mode: 0644]
tests/config/yaml/conftest.py [new file with mode: 0644]
tests/test.bash [deleted file]
tox.ini

index 40a88d3df63b022b5903daf65a812acfabc9319e..a3da28b68c4a8b635bfdb760af8969d467d5c5bb 100644 (file)
@@ -1,3 +1,11 @@
+[[package]]
+name = "apipkg"
+version = "1.5"
+description = "apipkg: namespace control and lazy-import mechanism"
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+
 [[package]]
 name = "astroid"
 version = "2.4.2"
@@ -15,6 +23,15 @@ wrapt = ">=1.11,<2.0"
 version = ">=1.4.0,<1.5"
 python = "<3.8"
 
+[[package]]
+name = "atomicwrites"
+version = "1.4.0"
+description = "Atomic file writes."
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+marker = "sys_platform == \"win32\""
+
 [[package]]
 name = "attrs"
 version = "20.1.0"
@@ -37,6 +54,20 @@ optional = false
 python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
 marker = "sys_platform == \"win32\""
 
+[[package]]
+name = "execnet"
+version = "1.7.1"
+description = "execnet: rapid multi-Python deployment"
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+
+[package.extras]
+testing = ["pre-commit"]
+
+[package.dependencies]
+apipkg = ">=1.4"
+
 [[package]]
 name = "flake8"
 version = "3.8.3"
@@ -70,6 +101,14 @@ testing = ["packaging", "pep517", "importlib-resources (>=1.3)"]
 [package.dependencies]
 zipp = ">=0.5"
 
+[[package]]
+name = "iniconfig"
+version = "1.0.1"
+description = "iniconfig: brain-dead simple config-ini parsing"
+category = "dev"
+optional = false
+python-versions = "*"
+
 [[package]]
 name = "isort"
 version = "5.5.0"
@@ -143,6 +182,14 @@ category = "dev"
 optional = false
 python-versions = "*"
 
+[[package]]
+name = "more-itertools"
+version = "8.5.0"
+description = "More routines for operating on iterables, beyond itertools"
+category = "dev"
+optional = false
+python-versions = ">=3.5"
+
 [[package]]
 name = "mypy"
 version = "0.782"
@@ -167,6 +214,42 @@ category = "dev"
 optional = false
 python-versions = "*"
 
+[[package]]
+name = "packaging"
+version = "20.4"
+description = "Core utilities for Python packages"
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+
+[package.dependencies]
+pyparsing = ">=2.0.2"
+six = "*"
+
+[[package]]
+name = "pluggy"
+version = "0.13.1"
+description = "plugin and hook calling mechanisms for python"
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+
+[package.extras]
+dev = ["pre-commit", "tox"]
+
+[package.dependencies]
+[package.dependencies.importlib-metadata]
+version = ">=0.12"
+python = "<3.8"
+
+[[package]]
+name = "py"
+version = "1.9.0"
+description = "library with cross-python path, ini-parsing, io, code, log facilities"
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+
 [[package]]
 name = "pycodestyle"
 version = "2.6.0"
@@ -198,6 +281,14 @@ isort = ">=4.2.5,<6"
 mccabe = ">=0.6,<0.7"
 toml = ">=0.7.1"
 
+[[package]]
+name = "pyparsing"
+version = "2.4.7"
+description = "Python parsing module"
+category = "dev"
+optional = false
+python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
+
 [[package]]
 name = "pyrsistent"
 version = "0.16.0"
@@ -209,6 +300,62 @@ python-versions = "*"
 [package.dependencies]
 six = "*"
 
+[[package]]
+name = "pytest"
+version = "6.0.1"
+description = "pytest: simple powerful testing with Python"
+category = "dev"
+optional = false
+python-versions = ">=3.5"
+
+[package.extras]
+checkqa_mypy = ["mypy (0.780)"]
+testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"]
+
+[package.dependencies]
+atomicwrites = ">=1.0"
+attrs = ">=17.4.0"
+colorama = "*"
+iniconfig = "*"
+more-itertools = ">=4.0.0"
+packaging = "*"
+pluggy = ">=0.12,<1.0"
+py = ">=1.8.2"
+toml = "*"
+
+[package.dependencies.importlib-metadata]
+version = ">=0.12"
+python = "<3.8"
+
+[[package]]
+name = "pytest-forked"
+version = "1.3.0"
+description = "run tests in isolated forked subprocesses"
+category = "dev"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+
+[package.dependencies]
+py = "*"
+pytest = ">=3.10"
+
+[[package]]
+name = "pytest-xdist"
+version = "2.1.0"
+description = "pytest xdist plugin for distributed testing and loop-on-failing modes"
+category = "dev"
+optional = false
+python-versions = ">=3.5"
+
+[package.extras]
+psutil = ["psutil (>=3.0)"]
+testing = ["filelock"]
+
+[package.dependencies]
+execnet = ">=1.1"
+pytest = ">=6.0.0"
+pytest-forked = "*"
+
 [[package]]
 name = "pyyaml"
 version = "5.3.1"
@@ -281,13 +428,21 @@ testing = ["jaraco.itertools", "func-timeout"]
 [metadata]
 lock-version = "1.0"
 python-versions = '^3.6'
-content-hash = "306703e487b1e2900cfcf4f881a70d84807ae102fca4f781ba2f6cf1aae83aa4"
+content-hash = "d2f337699ddaae3eb95a0c1ccf2880b6e495d4da7ddf3db88dfc6707c4041b12"
 
 [metadata.files]
+apipkg = [
+    {file = "apipkg-1.5-py2.py3-none-any.whl", hash = "sha256:58587dd4dc3daefad0487f6d9ae32b4542b185e1c36db6993290e7c41ca2b47c"},
+    {file = "apipkg-1.5.tar.gz", hash = "sha256:37228cda29411948b422fae072f57e31d3396d2ee1c9783775980ee9c9990af6"},
+]
 astroid = [
     {file = "astroid-2.4.2-py3-none-any.whl", hash = "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386"},
     {file = "astroid-2.4.2.tar.gz", hash = "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703"},
 ]
+atomicwrites = [
+    {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"},
+    {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"},
+]
 attrs = [
     {file = "attrs-20.1.0-py2.py3-none-any.whl", hash = "sha256:2867b7b9f8326499ab5b0e2d12801fa5c98842d2cbd22b35112ae04bf85b4dff"},
     {file = "attrs-20.1.0.tar.gz", hash = "sha256:0ef97238856430dcf9228e07f316aefc17e8939fc8507e18c6501b761ef1a42a"},
@@ -296,6 +451,10 @@ colorama = [
     {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"},
     {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"},
 ]
+execnet = [
+    {file = "execnet-1.7.1-py2.py3-none-any.whl", hash = "sha256:d4efd397930c46415f62f8a31388d6be4f27a91d7550eb79bc64a756e0056547"},
+    {file = "execnet-1.7.1.tar.gz", hash = "sha256:cacb9df31c9680ec5f95553976c4da484d407e85e41c83cb812aa014f0eddc50"},
+]
 flake8 = [
     {file = "flake8-3.8.3-py2.py3-none-any.whl", hash = "sha256:15e351d19611c887e482fb960eae4d44845013cc142d42896e9862f775d8cf5c"},
     {file = "flake8-3.8.3.tar.gz", hash = "sha256:f04b9fcbac03b0a3e58c0ab3a0ecc462e023a9faf046d57794184028123aa208"},
@@ -304,6 +463,10 @@ importlib-metadata = [
     {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"},
     {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"},
 ]
+iniconfig = [
+    {file = "iniconfig-1.0.1-py3-none-any.whl", hash = "sha256:80cf40c597eb564e86346103f609d74efce0f6b4d4f30ec8ce9e2c26411ba437"},
+    {file = "iniconfig-1.0.1.tar.gz", hash = "sha256:e5f92f89355a67de0595932a6c6c02ab4afddc6fcdc0bfc5becd0d60884d3f69"},
+]
 isort = [
     {file = "isort-5.5.0-py3-none-any.whl", hash = "sha256:8103bc070d9258fe97e82470cb30f0e4b730e94c44ac81ebae32b05d5a6c87ea"},
     {file = "isort-5.5.0.tar.gz", hash = "sha256:0906e0e7092e060c05de709ad172e1ec1b26aa27fdd4e8093f257890cd881d18"},
@@ -378,6 +541,10 @@ mccabe = [
     {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"},
     {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"},
 ]
+more-itertools = [
+    {file = "more-itertools-8.5.0.tar.gz", hash = "sha256:6f83822ae94818eae2612063a5101a7311e68ae8002005b5e05f03fd74a86a20"},
+    {file = "more_itertools-8.5.0-py3-none-any.whl", hash = "sha256:9b30f12df9393f0d28af9210ff8efe48d10c94f73e5daf886f10c4b0b0b4f03c"},
+]
 mypy = [
     {file = "mypy-0.782-cp35-cp35m-macosx_10_6_x86_64.whl", hash = "sha256:2c6cde8aa3426c1682d35190b59b71f661237d74b053822ea3d748e2c9578a7c"},
     {file = "mypy-0.782-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9c7a9a7ceb2871ba4bac1cf7217a7dd9ccd44c27c2950edbc6dc08530f32ad4e"},
@@ -398,6 +565,18 @@ mypy-extensions = [
     {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
     {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
 ]
+packaging = [
+    {file = "packaging-20.4-py2.py3-none-any.whl", hash = "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181"},
+    {file = "packaging-20.4.tar.gz", hash = "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8"},
+]
+pluggy = [
+    {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"},
+    {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"},
+]
+py = [
+    {file = "py-1.9.0-py2.py3-none-any.whl", hash = "sha256:366389d1db726cd2fcfc79732e75410e5fe4d31db13692115529d34069a043c2"},
+    {file = "py-1.9.0.tar.gz", hash = "sha256:9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342"},
+]
 pycodestyle = [
     {file = "pycodestyle-2.6.0-py2.py3-none-any.whl", hash = "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367"},
     {file = "pycodestyle-2.6.0.tar.gz", hash = "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e"},
@@ -410,9 +589,25 @@ pylint = [
     {file = "pylint-2.6.0-py3-none-any.whl", hash = "sha256:bfe68f020f8a0fece830a22dd4d5dddb4ecc6137db04face4c3420a46a52239f"},
     {file = "pylint-2.6.0.tar.gz", hash = "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5693d73be061210"},
 ]
+pyparsing = [
+    {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"},
+    {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"},
+]
 pyrsistent = [
     {file = "pyrsistent-0.16.0.tar.gz", hash = "sha256:28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3"},
 ]
+pytest = [
+    {file = "pytest-6.0.1-py3-none-any.whl", hash = "sha256:8b6007800c53fdacd5a5c192203f4e531eb2a1540ad9c752e052ec0f7143dbad"},
+    {file = "pytest-6.0.1.tar.gz", hash = "sha256:85228d75db9f45e06e57ef9bf4429267f81ac7c0d742cc9ed63d09886a9fe6f4"},
+]
+pytest-forked = [
+    {file = "pytest-forked-1.3.0.tar.gz", hash = "sha256:6aa9ac7e00ad1a539c41bec6d21011332de671e938c7637378ec9710204e37ca"},
+    {file = "pytest_forked-1.3.0-py2.py3-none-any.whl", hash = "sha256:dc4147784048e70ef5d437951728825a131b81714b398d5d52f17c7c144d8815"},
+]
+pytest-xdist = [
+    {file = "pytest-xdist-2.1.0.tar.gz", hash = "sha256:82d938f1a24186520e2d9d3a64ef7d9ac7ecdf1a0659e095d18e596b8cbd0672"},
+    {file = "pytest_xdist-2.1.0-py3-none-any.whl", hash = "sha256:7c629016b3bb006b88ac68e2b31551e7becf173c76b977768848e2bbed594d90"},
+]
 pyyaml = [
     {file = "PyYAML-5.3.1-cp27-cp27m-win32.whl", hash = "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f"},
     {file = "PyYAML-5.3.1-cp27-cp27m-win_amd64.whl", hash = "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76"},
index 0047bf33b092081c8d7563f636fa8cc948a336aa..e09a52f3dba0617d7e8a22ffe60608313bfe0c7c 100644 (file)
@@ -65,6 +65,8 @@ jinja2 = '^2.11'
 flake8 = '*'
 pylint = '*'
 mypy = '*'
+pytest = '^6'
+pytest-xdist = '^2'
 
 [tool.poetry.scripts]
 barectf = 'barectf.cli:_run'
diff --git a/tests/bats/LICENSE b/tests/bats/LICENSE
deleted file mode 100644 (file)
index bac4eb2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Sam Stephenson
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/bats/bin/bats b/tests/bats/bin/bats
deleted file mode 120000 (symlink)
index a50a884..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../libexec/bats
\ No newline at end of file
diff --git a/tests/bats/libexec/bats b/tests/bats/libexec/bats
deleted file mode 100755 (executable)
index 71f392f..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-version() {
-  echo "Bats 0.4.0"
-}
-
-usage() {
-  version
-  echo "Usage: bats [-c] [-p | -t] <test> [<test> ...]"
-}
-
-help() {
-  usage
-  echo
-  echo "  <test> is the path to a Bats test file, or the path to a directory"
-  echo "  containing Bats test files."
-  echo
-  echo "  -c, --count    Count the number of test cases without running any tests"
-  echo "  -h, --help     Display this help message"
-  echo "  -p, --pretty   Show results in pretty format (default for terminals)"
-  echo "  -t, --tap      Show results in TAP format"
-  echo "  -v, --version  Display the version number"
-  echo
-  echo "  For more information, see https://github.com/sstephenson/bats"
-  echo
-}
-
-resolve_link() {
-  $(type -p greadlink readlink | head -1) "$1"
-}
-
-abs_dirname() {
-  local cwd="$(pwd)"
-  local path="$1"
-
-  while [ -n "$path" ]; do
-    cd "${path%/*}"
-    local name="${path##*/}"
-    path="$(resolve_link "$name" || true)"
-  done
-
-  pwd
-  cd "$cwd"
-}
-
-expand_path() {
-  { cd "$(dirname "$1")" 2>/dev/null
-    local dirname="$PWD"
-    cd "$OLDPWD"
-    echo "$dirname/$(basename "$1")"
-  } || echo "$1"
-}
-
-BATS_LIBEXEC="$(abs_dirname "$0")"
-export BATS_PREFIX="$(abs_dirname "$BATS_LIBEXEC")"
-export BATS_CWD="$(abs_dirname .)"
-export PATH="$BATS_LIBEXEC:$PATH"
-
-options=()
-arguments=()
-for arg in "$@"; do
-  if [ "${arg:0:1}" = "-" ]; then
-    if [ "${arg:1:1}" = "-" ]; then
-      options[${#options[*]}]="${arg:2}"
-    else
-      index=1
-      while option="${arg:$index:1}"; do
-        [ -n "$option" ] || break
-        options[${#options[*]}]="$option"
-        let index+=1
-      done
-    fi
-  else
-    arguments[${#arguments[*]}]="$arg"
-  fi
-done
-
-unset count_flag pretty
-[ -t 0 ] && [ -t 1 ] && pretty="1"
-[ -n "$CI" ] && pretty=""
-
-for option in "${options[@]}"; do
-  case "$option" in
-  "h" | "help" )
-    help
-    exit 0
-    ;;
-  "v" | "version" )
-    version
-    exit 0
-    ;;
-  "c" | "count" )
-    count_flag="-c"
-    ;;
-  "t" | "tap" )
-    pretty=""
-    ;;
-  "p" | "pretty" )
-    pretty="1"
-    ;;
-  * )
-    usage >&2
-    exit 1
-    ;;
-  esac
-done
-
-if [ "${#arguments[@]}" -eq 0 ]; then
-  usage >&2
-  exit 1
-fi
-
-filenames=()
-for filename in "${arguments[@]}"; do
-  if [ -d "$filename" ]; then
-    shopt -s nullglob
-    for suite_filename in "$(expand_path "$filename")"/*.bats; do
-      filenames["${#filenames[@]}"]="$suite_filename"
-    done
-    shopt -u nullglob
-  else
-    filenames["${#filenames[@]}"]="$(expand_path "$filename")"
-  fi
-done
-
-if [ "${#filenames[@]}" -eq 1 ]; then
-  command="bats-exec-test"
-else
-  command="bats-exec-suite"
-fi
-
-if [ -n "$pretty" ]; then
-  extended_syntax_flag="-x"
-  formatter="bats-format-tap-stream"
-else
-  extended_syntax_flag=""
-  formatter="cat"
-fi
-
-set -o pipefail execfail
-exec "$command" $count_flag $extended_syntax_flag "${filenames[@]}" | "$formatter"
diff --git a/tests/bats/libexec/bats-exec-suite b/tests/bats/libexec/bats-exec-suite
deleted file mode 100755 (executable)
index 29ab255..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-count_only_flag=""
-if [ "$1" = "-c" ]; then
-  count_only_flag=1
-  shift
-fi
-
-extended_syntax_flag=""
-if [ "$1" = "-x" ]; then
-  extended_syntax_flag="-x"
-  shift
-fi
-
-trap "kill 0; exit 1" int
-
-count=0
-for filename in "$@"; do
-  let count+="$(bats-exec-test -c "$filename")"
-done
-
-if [ -n "$count_only_flag" ]; then
-  echo "$count"
-  exit
-fi
-
-echo "1..$count"
-status=0
-offset=0
-for filename in "$@"; do
-  index=0
-  {
-    IFS= read -r # 1..n
-    while IFS= read -r line; do
-      case "$line" in
-      "begin "* )
-        let index+=1
-        echo "${line/ $index / $(($offset + $index)) }"
-        ;;
-      "ok "* | "not ok "* )
-        [ -n "$extended_syntax_flag" ] || let index+=1
-        echo "${line/ $index / $(($offset + $index)) }"
-        [ "${line:0:6}" != "not ok" ] || status=1
-        ;;
-      * )
-        echo "$line"
-        ;;
-      esac
-    done
-  } < <( bats-exec-test $extended_syntax_flag "$filename" )
-  offset=$(($offset + $index))
-done
-
-exit "$status"
diff --git a/tests/bats/libexec/bats-exec-test b/tests/bats/libexec/bats-exec-test
deleted file mode 100755 (executable)
index 8f3bd51..0000000
+++ /dev/null
@@ -1,346 +0,0 @@
-#!/usr/bin/env bash
-set -e
-set -E
-set -T
-
-BATS_COUNT_ONLY=""
-if [ "$1" = "-c" ]; then
-  BATS_COUNT_ONLY=1
-  shift
-fi
-
-BATS_EXTENDED_SYNTAX=""
-if [ "$1" = "-x" ]; then
-  BATS_EXTENDED_SYNTAX="$1"
-  shift
-fi
-
-BATS_TEST_FILENAME="$1"
-if [ -z "$BATS_TEST_FILENAME" ]; then
-  echo "usage: bats-exec <filename>" >&2
-  exit 1
-elif [ ! -f "$BATS_TEST_FILENAME" ]; then
-  echo "bats: $BATS_TEST_FILENAME does not exist" >&2
-  exit 1
-else
-  shift
-fi
-
-BATS_TEST_DIRNAME="$(dirname "$BATS_TEST_FILENAME")"
-BATS_TEST_NAMES=()
-
-load() {
-  local name="$1"
-  local filename
-
-  if [ "${name:0:1}" = "/" ]; then
-    filename="${name}"
-  else
-    filename="$BATS_TEST_DIRNAME/${name}.bash"
-  fi
-
-  [ -f "$filename" ] || {
-    echo "bats: $filename does not exist" >&2
-    exit 1
-  }
-
-  source "${filename}"
-}
-
-run() {
-  local e E T oldIFS
-  [[ ! "$-" =~ e ]] || e=1
-  [[ ! "$-" =~ E ]] || E=1
-  [[ ! "$-" =~ T ]] || T=1
-  set +e
-  set +E
-  set +T
-  output="$("$@" 2>&1)"
-  status="$?"
-  oldIFS=$IFS
-  IFS=$'\n' lines=($output)
-  [ -z "$e" ] || set -e
-  [ -z "$E" ] || set -E
-  [ -z "$T" ] || set -T
-  IFS=$oldIFS
-}
-
-setup() {
-  true
-}
-
-teardown() {
-  true
-}
-
-skip() {
-  BATS_TEST_SKIPPED=${1:-1}
-  BATS_TEST_COMPLETED=1
-  exit 0
-}
-
-bats_test_begin() {
-  BATS_TEST_DESCRIPTION="$1"
-  if [ -n "$BATS_EXTENDED_SYNTAX" ]; then
-    echo "begin $BATS_TEST_NUMBER $BATS_TEST_DESCRIPTION" >&3
-  fi
-  setup
-}
-
-bats_test_function() {
-  local test_name="$1"
-  BATS_TEST_NAMES["${#BATS_TEST_NAMES[@]}"]="$test_name"
-}
-
-bats_capture_stack_trace() {
-  BATS_PREVIOUS_STACK_TRACE=( "${BATS_CURRENT_STACK_TRACE[@]}" )
-  BATS_CURRENT_STACK_TRACE=()
-
-  local test_pattern=" $BATS_TEST_NAME $BATS_TEST_SOURCE"
-  local setup_pattern=" setup $BATS_TEST_SOURCE"
-  local teardown_pattern=" teardown $BATS_TEST_SOURCE"
-
-  local frame
-  local index=1
-
-  while frame="$(caller "$index")"; do
-    BATS_CURRENT_STACK_TRACE["${#BATS_CURRENT_STACK_TRACE[@]}"]="$frame"
-    if [[ "$frame" = *"$test_pattern"     || \
-          "$frame" = *"$setup_pattern"    || \
-          "$frame" = *"$teardown_pattern" ]]; then
-      break
-    else
-      let index+=1
-    fi
-  done
-
-  BATS_SOURCE="$(bats_frame_filename "${BATS_CURRENT_STACK_TRACE[0]}")"
-  BATS_LINENO="$(bats_frame_lineno "${BATS_CURRENT_STACK_TRACE[0]}")"
-}
-
-bats_print_stack_trace() {
-  local frame
-  local index=1
-  local count="${#@}"
-
-  for frame in "$@"; do
-    local filename="$(bats_trim_filename "$(bats_frame_filename "$frame")")"
-    local lineno="$(bats_frame_lineno "$frame")"
-
-    if [ $index -eq 1 ]; then
-      echo -n "# ("
-    else
-      echo -n "#  "
-    fi
-
-    local fn="$(bats_frame_function "$frame")"
-    if [ "$fn" != "$BATS_TEST_NAME" ]; then
-      echo -n "from function \`$fn' "
-    fi
-
-    if [ $index -eq $count ]; then
-      echo "in test file $filename, line $lineno)"
-    else
-      echo "in file $filename, line $lineno,"
-    fi
-
-    let index+=1
-  done
-}
-
-bats_print_failed_command() {
-  local frame="$1"
-  local status="$2"
-  local filename="$(bats_frame_filename "$frame")"
-  local lineno="$(bats_frame_lineno "$frame")"
-
-  local failed_line="$(bats_extract_line "$filename" "$lineno")"
-  local failed_command="$(bats_strip_string "$failed_line")"
-  echo -n "#   \`${failed_command}' "
-
-  if [ $status -eq 1 ]; then
-    echo "failed"
-  else
-    echo "failed with status $status"
-  fi
-}
-
-bats_frame_lineno() {
-  local frame="$1"
-  local lineno="${frame%% *}"
-  echo "$lineno"
-}
-
-bats_frame_function() {
-  local frame="$1"
-  local rest="${frame#* }"
-  local fn="${rest%% *}"
-  echo "$fn"
-}
-
-bats_frame_filename() {
-  local frame="$1"
-  local rest="${frame#* }"
-  local filename="${rest#* }"
-
-  if [ "$filename" = "$BATS_TEST_SOURCE" ]; then
-    echo "$BATS_TEST_FILENAME"
-  else
-    echo "$filename"
-  fi
-}
-
-bats_extract_line() {
-  local filename="$1"
-  local lineno="$2"
-  sed -n "${lineno}p" "$filename"
-}
-
-bats_strip_string() {
-  local string="$1"
-  printf "%s" "$string" | sed -e "s/^[ "$'\t'"]*//" -e "s/[ "$'\t'"]*$//"
-}
-
-bats_trim_filename() {
-  local filename="$1"
-  local length="${#BATS_CWD}"
-
-  if [ "${filename:0:length+1}" = "${BATS_CWD}/" ]; then
-    echo "${filename:length+1}"
-  else
-    echo "$filename"
-  fi
-}
-
-bats_debug_trap() {
-  if [ "$BASH_SOURCE" != "$1" ]; then
-    bats_capture_stack_trace
-  fi
-}
-
-bats_error_trap() {
-  BATS_ERROR_STATUS="$?"
-  BATS_ERROR_STACK_TRACE=( "${BATS_PREVIOUS_STACK_TRACE[@]}" )
-  trap - debug
-}
-
-bats_teardown_trap() {
-  trap "bats_exit_trap" exit
-  local status=0
-  teardown >>"$BATS_OUT" 2>&1 || status="$?"
-
-  if [ $status -eq 0 ]; then
-    BATS_TEARDOWN_COMPLETED=1
-  elif [ -n "$BATS_TEST_COMPLETED" ]; then
-    BATS_ERROR_STATUS="$status"
-    BATS_ERROR_STACK_TRACE=( "${BATS_CURRENT_STACK_TRACE[@]}" )
-  fi
-
-  bats_exit_trap
-}
-
-bats_exit_trap() {
-  local status
-  local skipped
-  trap - err exit
-
-  skipped=""
-  if [ -n "$BATS_TEST_SKIPPED" ]; then
-    skipped=" # skip"
-    if [ "1" != "$BATS_TEST_SKIPPED" ]; then
-      skipped+=" ($BATS_TEST_SKIPPED)"
-    fi
-  fi
-
-  if [ -z "$BATS_TEST_COMPLETED" ] || [ -z "$BATS_TEARDOWN_COMPLETED" ]; then
-    echo "not ok $BATS_TEST_NUMBER $BATS_TEST_DESCRIPTION" >&3
-    bats_print_stack_trace "${BATS_ERROR_STACK_TRACE[@]}" >&3
-    bats_print_failed_command "${BATS_ERROR_STACK_TRACE[${#BATS_ERROR_STACK_TRACE[@]}-1]}" "$BATS_ERROR_STATUS" >&3
-    sed -e "s/^/# /" < "$BATS_OUT" >&3
-    status=1
-  else
-    echo "ok ${BATS_TEST_NUMBER}${skipped} ${BATS_TEST_DESCRIPTION}" >&3
-    status=0
-  fi
-
-  rm -f "$BATS_OUT"
-  exit "$status"
-}
-
-bats_perform_tests() {
-  echo "1..$#"
-  test_number=1
-  status=0
-  for test_name in "$@"; do
-    "$0" $BATS_EXTENDED_SYNTAX "$BATS_TEST_FILENAME" "$test_name" "$test_number" || status=1
-    let test_number+=1
-  done
-  exit "$status"
-}
-
-bats_perform_test() {
-  BATS_TEST_NAME="$1"
-  if [ "$(type -t "$BATS_TEST_NAME" || true)" = "function" ]; then
-    BATS_TEST_NUMBER="$2"
-    if [ -z "$BATS_TEST_NUMBER" ]; then
-      echo "1..1"
-      BATS_TEST_NUMBER="1"
-    fi
-
-    BATS_TEST_COMPLETED=""
-    BATS_TEARDOWN_COMPLETED=""
-    trap "bats_debug_trap \"\$BASH_SOURCE\"" debug
-    trap "bats_error_trap" err
-    trap "bats_teardown_trap" exit
-    "$BATS_TEST_NAME" >>"$BATS_OUT" 2>&1
-    BATS_TEST_COMPLETED=1
-
-  else
-    echo "bats: unknown test name \`$BATS_TEST_NAME'" >&2
-    exit 1
-  fi
-}
-
-if [ -z "$TMPDIR" ]; then
-  BATS_TMPDIR="/tmp"
-else
-  BATS_TMPDIR="${TMPDIR%/}"
-fi
-
-BATS_TMPNAME="$BATS_TMPDIR/bats.$$"
-BATS_PARENT_TMPNAME="$BATS_TMPDIR/bats.$PPID"
-BATS_OUT="${BATS_TMPNAME}.out"
-
-bats_preprocess_source() {
-  BATS_TEST_SOURCE="${BATS_TMPNAME}.src"
-  { tr -d '\r' < "$BATS_TEST_FILENAME"; echo; } | bats-preprocess > "$BATS_TEST_SOURCE"
-  trap "bats_cleanup_preprocessed_source" err exit
-  trap "bats_cleanup_preprocessed_source; exit 1" int
-}
-
-bats_cleanup_preprocessed_source() {
-  rm -f "$BATS_TEST_SOURCE"
-}
-
-bats_evaluate_preprocessed_source() {
-  if [ -z "$BATS_TEST_SOURCE" ]; then
-    BATS_TEST_SOURCE="${BATS_PARENT_TMPNAME}.src"
-  fi
-  source "$BATS_TEST_SOURCE"
-}
-
-exec 3<&1
-
-if [ "$#" -eq 0 ]; then
-  bats_preprocess_source
-  bats_evaluate_preprocessed_source
-
-  if [ -n "$BATS_COUNT_ONLY" ]; then
-    echo "${#BATS_TEST_NAMES[@]}"
-  else
-    bats_perform_tests "${BATS_TEST_NAMES[@]}"
-  fi
-else
-  bats_evaluate_preprocessed_source
-  bats_perform_test "$@"
-fi
diff --git a/tests/bats/libexec/bats-format-tap-stream b/tests/bats/libexec/bats-format-tap-stream
deleted file mode 100755 (executable)
index 614768f..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-# Just stream the TAP output (sans extended syntax) if tput is missing
-command -v tput >/dev/null || exec grep -v "^begin "
-
-header_pattern='[0-9]+\.\.[0-9]+'
-IFS= read -r header
-
-if [[ "$header" =~ $header_pattern ]]; then
-  count="${header:3}"
-  index=0
-  failures=0
-  skipped=0
-  name=""
-  count_column_width=$(( ${#count} * 2 + 2 ))
-else
-  # If the first line isn't a TAP plan, print it and pass the rest through
-  printf "%s\n" "$header"
-  exec cat
-fi
-
-update_screen_width() {
-  screen_width="$(tput cols)"
-  count_column_left=$(( $screen_width - $count_column_width ))
-}
-
-trap update_screen_width WINCH
-update_screen_width
-
-begin() {
-  go_to_column 0
-  printf_with_truncation $(( $count_column_left - 1 )) "   %s" "$name"
-  clear_to_end_of_line
-  go_to_column $count_column_left
-  printf "%${#count}s/${count}" "$index"
-  go_to_column 1
-}
-
-pass() {
-  go_to_column 0
-  printf " âœ“ %s" "$name"
-  advance
-}
-
-skip() {
-  local reason="$1"
-  [ -z "$reason" ] || reason=": $reason"
-  go_to_column 0
-  printf " - %s (skipped%s)" "$name" "$reason"
-  advance
-}
-
-fail() {
-  go_to_column 0
-  set_color 1 bold
-  printf " âœ— %s" "$name"
-  advance
-}
-
-log() {
-  set_color 1
-  printf "   %s\n" "$1"
-  clear_color
-}
-
-summary() {
-  printf "\n%d test%s" "$count" "$(plural "$count")"
-
-  printf ", %d failure%s" "$failures" "$(plural "$failures")"
-
-  if [ "$skipped" -gt 0 ]; then
-    printf ", %d skipped" "$skipped"
-  fi
-
-  printf "\n"
-}
-
-printf_with_truncation() {
-  local width="$1"
-  shift
-  local string="$(printf "$@")"
-
-  if [ "${#string}" -gt "$width" ]; then
-    printf "%s..." "${string:0:$(( $width - 4 ))}"
-  else
-    printf "%s" "$string"
-  fi
-}
-
-go_to_column() {
-  local column="$1"
-  printf "\x1B[%dG" $(( $column + 1 ))
-}
-
-clear_to_end_of_line() {
-  printf "\x1B[K"
-}
-
-advance() {
-  clear_to_end_of_line
-  echo
-  clear_color
-}
-
-set_color() {
-  local color="$1"
-  local weight="$2"
-  printf "\x1B[%d;%dm" $(( 30 + $color )) "$( [ "$weight" = "bold" ] && echo 1 || echo 22 )"
-}
-
-clear_color() {
-  printf "\x1B[0m"
-}
-
-plural() {
-  [ "$1" -eq 1 ] || echo "s"
-}
-
-_buffer=""
-
-buffer() {
-  _buffer="${_buffer}$("$@")"
-}
-
-flush() {
-  printf "%s" "$_buffer"
-  _buffer=""
-}
-
-finish() {
-  flush
-  printf "\n"
-}
-
-trap finish EXIT
-
-while IFS= read -r line; do
-  case "$line" in
-  "begin "* )
-    let index+=1
-    name="${line#* $index }"
-    buffer begin
-    flush
-    ;;
-  "ok "* )
-    skip_expr="ok $index # skip (\(([^)]*)\))?"
-    if [[ "$line" =~ $skip_expr ]]; then
-      let skipped+=1
-      buffer skip "${BASH_REMATCH[2]}"
-    else
-      buffer pass
-    fi
-    ;;
-  "not ok "* )
-    let failures+=1
-    buffer fail
-    ;;
-  "# "* )
-    buffer log "${line:2}"
-    ;;
-  esac
-done
-
-buffer summary
diff --git a/tests/bats/libexec/bats-preprocess b/tests/bats/libexec/bats-preprocess
deleted file mode 100755 (executable)
index 04297ed..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-encode_name() {
-  local name="$1"
-  local result="test_"
-
-  if [[ ! "$name" =~ [^[:alnum:]\ _-] ]]; then
-    name="${name//_/-5f}"
-    name="${name//-/-2d}"
-    name="${name// /_}"
-    result+="$name"
-  else
-    local length="${#name}"
-    local char i
-
-    for ((i=0; i<length; i++)); do
-      char="${name:$i:1}"
-      if [ "$char" = " " ]; then
-        result+="_"
-      elif [[ "$char" =~ [[:alnum:]] ]]; then
-        result+="$char"
-      else
-        result+="$(printf -- "-%02x" \'"$char")"
-      fi
-    done
-  fi
-
-  echo "$result"
-}
-
-tests=()
-index=0
-pattern='^ *@test  *([^ ].*)  *\{ *(.*)$'
-
-while IFS= read -r line; do
-  let index+=1
-  if [[ "$line" =~ $pattern ]]; then
-    quoted_name="${BASH_REMATCH[1]}"
-    body="${BASH_REMATCH[2]}"
-    name="$(eval echo "$quoted_name")"
-    encoded_name="$(encode_name "$name")"
-    tests["${#tests[@]}"]="$encoded_name"
-    echo "${encoded_name}() { bats_test_begin ${quoted_name} ${index}; ${body}"
-  else
-    printf "%s\n" "$line"
-  fi
-done
-
-for test_name in "${tests[@]}"; do
-  echo "bats_test_function ${test_name}"
-done
diff --git a/tests/config/.gitignore b/tests/config/.gitignore
deleted file mode 100644 (file)
index 556fc71..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-barectf*.*
-metadata
-!2/fail/metadata
-*.c
-*.h
diff --git a/tests/config/2/fail/clock/absolute-invalid-type.yaml b/tests/config/2/fail/clock/absolute-invalid-type.yaml
deleted file mode 100644 (file)
index 50320f8..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      absolute: []
diff --git a/tests/config/2/fail/clock/description-invalid-type.yaml b/tests/config/2/fail/clock/description-invalid-type.yaml
deleted file mode 100644 (file)
index 6fd8990..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      description: 23
diff --git a/tests/config/2/fail/clock/ec-invalid-type.yaml b/tests/config/2/fail/clock/ec-invalid-type.yaml
deleted file mode 100644 (file)
index ac46af9..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      error-cycles: string
diff --git a/tests/config/2/fail/clock/ec-invalid.yaml b/tests/config/2/fail/clock/ec-invalid.yaml
deleted file mode 100644 (file)
index 04bfd08..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      error-cycles: -17
diff --git a/tests/config/2/fail/clock/fail.bats b/tests/config/2/fail/clock/fail.bats
deleted file mode 100644 (file)
index 315fa53..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'unknown property in clock object makes barectf fail' {
-  barectf_config_check_fail unknown-prop.yaml
-}
-
-@test 'wrong "freq" property type in clock object makes barectf fail' {
-  barectf_config_check_fail freq-invalid-type.yaml
-}
-
-@test 'invalid "freq" property (0) in clock object makes barectf fail' {
-  barectf_config_check_fail freq-0.yaml
-}
-
-@test 'invalid "freq" property (negative) in clock object makes barectf fail' {
-  barectf_config_check_fail freq-neg.yaml
-}
-
-@test 'wrong "description" property type in clock object makes barectf fail' {
-  barectf_config_check_fail description-invalid-type.yaml
-}
-
-@test 'wrong "uuid" property type in clock object makes barectf fail' {
-  barectf_config_check_fail uuid-invalid-type.yaml
-}
-
-@test 'invalid "uuid" property in clock object makes barectf fail' {
-  barectf_config_check_fail uuid-invalid.yaml
-}
-
-@test 'wrong "error-cycles" property type in clock object makes barectf fail' {
-  barectf_config_check_fail ec-invalid-type.yaml
-}
-
-@test 'invalid "error-cycles" property in clock object makes barectf fail' {
-  barectf_config_check_fail ec-invalid.yaml
-}
-
-@test 'wrong "offset" property type in clock object makes barectf fail' {
-  barectf_config_check_fail offset-invalid-type.yaml
-}
-
-@test 'wrong "absolute" property type in clock object makes barectf fail' {
-  barectf_config_check_fail absolute-invalid-type.yaml
-}
-
-@test 'unknown property in clock offset object makes barectf fail' {
-  barectf_config_check_fail offset-unknown-prop.yaml
-}
-
-@test 'wrong "seconds" property type in clock offset object makes barectf fail' {
-  barectf_config_check_fail offset-seconds-invalid-type.yaml
-}
-
-@test 'invalid "seconds" property in clock offset object makes barectf fail' {
-  barectf_config_check_fail offset-seconds-neg.yaml
-}
-
-@test 'wrong "cycles" property type in clock offset object makes barectf fail' {
-  barectf_config_check_fail offset-cycles-invalid-type.yaml
-}
-
-@test 'invalid "cycles" property in clock offset object makes barectf fail' {
-  barectf_config_check_fail offset-cycles-neg.yaml
-}
-
-@test 'wrong "$return-ctype" property type in clock object makes barectf fail' {
-  barectf_config_check_fail rct-invalid-type.yaml
-}
diff --git a/tests/config/2/fail/clock/freq-0.yaml b/tests/config/2/fail/clock/freq-0.yaml
deleted file mode 100644 (file)
index 22ff073..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      freq: 0
diff --git a/tests/config/2/fail/clock/freq-invalid-type.yaml b/tests/config/2/fail/clock/freq-invalid-type.yaml
deleted file mode 100644 (file)
index 63255af..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      freq: string
diff --git a/tests/config/2/fail/clock/freq-neg.yaml b/tests/config/2/fail/clock/freq-neg.yaml
deleted file mode 100644 (file)
index f2f0f70..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      freq: -12
diff --git a/tests/config/2/fail/clock/offset-cycles-invalid-type.yaml b/tests/config/2/fail/clock/offset-cycles-invalid-type.yaml
deleted file mode 100644 (file)
index 88fa94f..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      offset:
-        cycles: string
diff --git a/tests/config/2/fail/clock/offset-cycles-neg.yaml b/tests/config/2/fail/clock/offset-cycles-neg.yaml
deleted file mode 100644 (file)
index 7631d69..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      offset:
-        cycles: -17
diff --git a/tests/config/2/fail/clock/offset-invalid-type.yaml b/tests/config/2/fail/clock/offset-invalid-type.yaml
deleted file mode 100644 (file)
index 24dff48..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      offset: 23
diff --git a/tests/config/2/fail/clock/offset-seconds-invalid-type.yaml b/tests/config/2/fail/clock/offset-seconds-invalid-type.yaml
deleted file mode 100644 (file)
index 807ef40..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      offset:
-        seconds: string
diff --git a/tests/config/2/fail/clock/offset-seconds-neg.yaml b/tests/config/2/fail/clock/offset-seconds-neg.yaml
deleted file mode 100644 (file)
index 1a90977..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      offset:
-        seconds: -17
diff --git a/tests/config/2/fail/clock/offset-unknown-prop.yaml b/tests/config/2/fail/clock/offset-unknown-prop.yaml
deleted file mode 100644 (file)
index 34bbc3e..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      offset:
-        unknown: false
diff --git a/tests/config/2/fail/clock/rct-invalid-type.yaml b/tests/config/2/fail/clock/rct-invalid-type.yaml
deleted file mode 100644 (file)
index cc8a909..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      $return-ctype: 23
diff --git a/tests/config/2/fail/clock/unknown-prop.yaml b/tests/config/2/fail/clock/unknown-prop.yaml
deleted file mode 100644 (file)
index d866485..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      freq: 1000
-      unknown: false
diff --git a/tests/config/2/fail/clock/uuid-invalid-type.yaml b/tests/config/2/fail/clock/uuid-invalid-type.yaml
deleted file mode 100644 (file)
index 8eb0e66..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      uuid: -17
diff --git a/tests/config/2/fail/clock/uuid-invalid.yaml b/tests/config/2/fail/clock/uuid-invalid.yaml
deleted file mode 100644 (file)
index 2371ea1..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    my_clock:
-      uuid: zoom
diff --git a/tests/config/2/fail/config/fail.bats b/tests/config/2/fail/config/fail.bats
deleted file mode 100644 (file)
index a0c5bf7..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'unknown property in config object makes barectf fail' {
-  barectf_config_check_fail unknown-prop.yaml
-}
-
-@test 'no "version" property in config object makes barectf fail' {
-  barectf_config_check_fail version-no.yaml
-}
-
-@test 'wrong "version" property type in config object makes barectf fail' {
-  barectf_config_check_fail version-invalid-type.yaml
-}
-
-@test 'invalid "version" property (1.9) in config object makes barectf fail' {
-  barectf_config_check_fail version-invalid-19.yaml
-}
-
-@test 'invalid "version" property (2.3) in config object makes barectf fail' {
-  barectf_config_check_fail version-invalid-23.yaml
-}
-
-@test 'wrong "prefix" property type in config object makes barectf fail' {
-  barectf_config_check_fail prefix-invalid-type.yaml
-}
-
-@test 'no valid C identifier in "prefix" property type in config object makes barectf fail' {
-  barectf_config_check_fail prefix-invalid-identifier.yaml
-}
-
-@test 'no "metadata" property in config object makes barectf fail' {
-  barectf_config_check_fail metadata-no.yaml
-}
-
-@test 'wrong "metadata" property type in config object makes barectf fail' {
-  barectf_config_check_fail metadata-invalid-type.yaml
-}
-
-@test 'wrong "options" property type in config object makes barectf fail' {
-  barectf_config_check_fail options-invalid-type.yaml
-}
-
-@test 'wrong "gen-prefix-def" property type in config options object makes barectf fail' {
-  barectf_config_check_fail options-gen-prefix-def-invalid-type.yaml
-}
-
-@test 'wrong "gen-default-stream-def" property type in config options object makes barectf fail' {
-  barectf_config_check_fail options-gen-default-stream-def-invalid-type.yaml
-}
diff --git a/tests/config/2/fail/config/metadata-invalid-type.yaml b/tests/config/2/fail/config/metadata-invalid-type.yaml
deleted file mode 100644 (file)
index 3291d6f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata: 23
-
diff --git a/tests/config/2/fail/config/metadata-no.yaml b/tests/config/2/fail/config/metadata-no.yaml
deleted file mode 100644 (file)
index aba76ba..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
diff --git a/tests/config/2/fail/config/options-gen-default-stream-def-invalid-type.yaml b/tests/config/2/fail/config/options-gen-default-stream-def-invalid-type.yaml
deleted file mode 100644 (file)
index bfb36d2..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.2'
-options:
-  gen-default-stream-def: 23
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/config/options-gen-prefix-def-invalid-type.yaml b/tests/config/2/fail/config/options-gen-prefix-def-invalid-type.yaml
deleted file mode 100644 (file)
index 74a2bc4..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.2'
-options:
-  gen-prefix-def: do it
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/config/options-invalid-type.yaml b/tests/config/2/fail/config/options-invalid-type.yaml
deleted file mode 100644 (file)
index 921ec49..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.2'
-options: false
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/config/options-unknown-prop.yaml b/tests/config/2/fail/config/options-unknown-prop.yaml
deleted file mode 100644 (file)
index 6327229..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.2'
-options:
-  meow: mix
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/config/prefix-invalid-identifier.yaml b/tests/config/2/fail/config/prefix-invalid-identifier.yaml
deleted file mode 100644 (file)
index 1ae048c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-prefix: 'some prefix'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/config/prefix-invalid-type.yaml b/tests/config/2/fail/config/prefix-invalid-type.yaml
deleted file mode 100644 (file)
index 2960934..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-prefix: -21
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/config/unknown-prop.yaml b/tests/config/2/fail/config/unknown-prop.yaml
deleted file mode 100644 (file)
index b8b6f9e..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-unknown: false
diff --git a/tests/config/2/fail/config/version-invalid-19.yaml b/tests/config/2/fail/config/version-invalid-19.yaml
deleted file mode 100644 (file)
index ceccd5c..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '1.9'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/config/version-invalid-23.yaml b/tests/config/2/fail/config/version-invalid-23.yaml
deleted file mode 100644 (file)
index cf73d04..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.3'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/config/version-invalid-type.yaml b/tests/config/2/fail/config/version-invalid-type.yaml
deleted file mode 100644 (file)
index a28f748..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: 2.1
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/config/version-no.yaml b/tests/config/2/fail/config/version-no.yaml
deleted file mode 100644 (file)
index d8e23a6..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/event/ct-invalid-type.yaml b/tests/config/2/fail/event/ct-invalid-type.yaml
deleted file mode 100644 (file)
index b696056..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          context-type: 23
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/event/ct-not-struct.yaml b/tests/config/2/fail/event/ct-not-struct.yaml
deleted file mode 100644 (file)
index c1991d0..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          context-type:
-            class: int
-            size: 8
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/event/fail.bats b/tests/config/2/fail/event/fail.bats
deleted file mode 100644 (file)
index eb515d5..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'unknown property in event object makes barectf fail' {
-  barectf_config_check_fail unknown-prop.yaml
-}
-
-@test 'wrong "log-level" property type in event object makes barectf fail' {
-  barectf_config_check_fail ll-invalid-type.yaml
-}
-
-@test 'non existing log level name as "log-level" property value in event object makes barectf fail' {
-  barectf_config_check_fail ll-non-existing.yaml
-}
-
-@test 'wrong "context-type" property type in event object makes barectf fail' {
-  barectf_config_check_fail ct-invalid-type.yaml
-}
-
-@test 'invalid "context-type" property field type (not a structure) in event object makes barectf fail' {
-  barectf_config_check_fail ct-not-struct.yaml
-}
-
-@test 'wrong "payload-type" property type in event object makes barectf fail' {
-  barectf_config_check_fail pt-invalid-type.yaml
-}
-
-@test 'invalid "payload-type" property field type (not a structure) in event object makes barectf fail' {
-  barectf_config_check_fail pt-not-struct.yaml
-}
-
-@test 'empty event object makes barectf fail' {
-  barectf_config_check_fail no-fields-at-all.yaml
-}
diff --git a/tests/config/2/fail/event/ll-invalid-type.yaml b/tests/config/2/fail/event/ll-invalid-type.yaml
deleted file mode 100644 (file)
index a9fef25..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          log-level: true
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/event/ll-non-existing.yaml b/tests/config/2/fail/event/ll-non-existing.yaml
deleted file mode 100644 (file)
index b2c23d3..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  $log-levels:
-    EMERG: 0
-    WARNING: 23
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          log-level: EME
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/event/no-fields-at-all.yaml b/tests/config/2/fail/event/no-fields-at-all.yaml
deleted file mode 100644 (file)
index 3a08827..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event: {}
diff --git a/tests/config/2/fail/event/pt-invalid-type.yaml b/tests/config/2/fail/event/pt-invalid-type.yaml
deleted file mode 100644 (file)
index 6cbaba4..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type: -17
diff --git a/tests/config/2/fail/event/pt-not-struct.yaml b/tests/config/2/fail/event/pt-not-struct.yaml
deleted file mode 100644 (file)
index c1afa5a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: int
-            size: 8
-
diff --git a/tests/config/2/fail/event/unknown-prop.yaml b/tests/config/2/fail/event/unknown-prop.yaml
deleted file mode 100644 (file)
index 209f096..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          unknown: false
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/include/cycle-sym.yaml b/tests/config/2/fail/include/cycle-sym.yaml
deleted file mode 100644 (file)
index a389075..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  $include: inc-recursive-sym1.yaml
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/include/cycle.yaml b/tests/config/2/fail/include/cycle.yaml
deleted file mode 100644 (file)
index b6d3f6f..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  $include: inc-recursive1.yaml
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/include/fail.bats b/tests/config/2/fail/include/fail.bats
deleted file mode 100644 (file)
index 7153911..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'wrong "$include" property type makes barectf fail' {
-  barectf_config_check_fail invalid-type.yaml
-}
-
-@test 'non-existing file in "$include" property (string) makes barectf fail' {
-  barectf_config_check_fail file-not-found.yaml
-}
-
-@test 'non-existing absolute file in "$include" property (string) makes barectf fail' {
-  barectf_config_check_fail file-not-found-abs.yaml
-}
-
-@test 'non-existing file in "$include" property (array) makes barectf fail' {
-  barectf_config_check_fail file-not-found-in-array.yaml
-}
-
-@test 'non-existing file in "$include" property (recursive) makes barectf fail' {
-  barectf_config_check_fail file-not-found-recursive.yaml
-}
-
-@test 'cycle in include graph makes barectf fail' {
-  barectf_config_check_fail cycle.yaml
-}
-
-@test 'cycle in include graph (with a symbolic link) makes barectf fail' {
-  local symlink="$BATS_TEST_DIRNAME/inc-recursive-sym3.yaml"
-  ln -fs inc-recursive-sym1.yaml "$symlink"
-  barectf_config_check_fail cycle-sym.yaml
-  rm -f "$symlink"
-}
diff --git a/tests/config/2/fail/include/file-not-found-abs.yaml b/tests/config/2/fail/include/file-not-found-abs.yaml
deleted file mode 100644 (file)
index 691fffa..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  $include: /path/to/not/found
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/include/file-not-found-in-array.yaml b/tests/config/2/fail/include/file-not-found-in-array.yaml
deleted file mode 100644 (file)
index eb91fa9..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  $include:
-    - inc-empty.yaml
-    - yes.yaml
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/include/file-not-found-recursive.yaml b/tests/config/2/fail/include/file-not-found-recursive.yaml
deleted file mode 100644 (file)
index 2ce1212..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  $include: inc-inc-not-found.yaml
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/include/file-not-found.yaml b/tests/config/2/fail/include/file-not-found.yaml
deleted file mode 100644 (file)
index b801533..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  $include: yes.yaml
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/include/inc-empty.yaml b/tests/config/2/fail/include/inc-empty.yaml
deleted file mode 100644 (file)
index 7d717c4..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-{}
diff --git a/tests/config/2/fail/include/inc-inc-not-found.yaml b/tests/config/2/fail/include/inc-inc-not-found.yaml
deleted file mode 100644 (file)
index 1310824..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-$include: yes.yaml
diff --git a/tests/config/2/fail/include/inc-recursive-sym1.yaml b/tests/config/2/fail/include/inc-recursive-sym1.yaml
deleted file mode 100644 (file)
index 31301d2..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-$include: inc-recursive-sym2.yaml
diff --git a/tests/config/2/fail/include/inc-recursive-sym2.yaml b/tests/config/2/fail/include/inc-recursive-sym2.yaml
deleted file mode 100644 (file)
index c024779..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-$include: inc-recursive-sym3.yaml
diff --git a/tests/config/2/fail/include/inc-recursive1.yaml b/tests/config/2/fail/include/inc-recursive1.yaml
deleted file mode 100644 (file)
index f23e504..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-$include: inc-recursive2.yaml
diff --git a/tests/config/2/fail/include/inc-recursive2.yaml b/tests/config/2/fail/include/inc-recursive2.yaml
deleted file mode 100644 (file)
index cd29ed0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-$include: inc-recursive3.yaml
diff --git a/tests/config/2/fail/include/inc-recursive3.yaml b/tests/config/2/fail/include/inc-recursive3.yaml
deleted file mode 100644 (file)
index 1f92c70..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-$include: inc-recursive1.yaml
diff --git a/tests/config/2/fail/include/include-include-replace.yaml b/tests/config/2/fail/include/include-include-replace.yaml
deleted file mode 100644 (file)
index 8acb978..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  $include: inc-empty.yaml
-  $include-replace: inc-empty.yaml
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/include/invalid-type.yaml b/tests/config/2/fail/include/invalid-type.yaml
deleted file mode 100644 (file)
index 155bf7b..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  $include: 23
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/include/replace-file-not-found-in-array.yaml b/tests/config/2/fail/include/replace-file-not-found-in-array.yaml
deleted file mode 100644 (file)
index caefd2b..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  $include-replace:
-    - inc-empty.yaml
-    - yes.yaml
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/include/replace-file-not-found.yaml b/tests/config/2/fail/include/replace-file-not-found.yaml
deleted file mode 100644 (file)
index c6e64eb..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  $include-replace: yes.yaml
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/metadata/clocks-invalid-type.yaml b/tests/config/2/fail/metadata/clocks-invalid-type.yaml
deleted file mode 100644 (file)
index ef897e1..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks: 23
diff --git a/tests/config/2/fail/metadata/clocks-key-invalid-identifier.yaml b/tests/config/2/fail/metadata/clocks-key-invalid-identifier.yaml
deleted file mode 100644 (file)
index 1a33087..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  clocks:
-    'some clock':
-      freq: 1000
diff --git a/tests/config/2/fail/metadata/default-stream-invalid-type.yaml b/tests/config/2/fail/metadata/default-stream-invalid-type.yaml
deleted file mode 100644 (file)
index d009ab9..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.2'
-metadata:
-  $default-stream: 23
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/metadata/default-stream-stream-default-duplicate.yaml b/tests/config/2/fail/metadata/default-stream-stream-default-duplicate.yaml
deleted file mode 100644 (file)
index c992213..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.2'
-metadata:
-  $default-stream: my_stream
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-    other_stream:
-      $default: true
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/metadata/default-stream-unknown-stream.yaml b/tests/config/2/fail/metadata/default-stream-unknown-stream.yaml
deleted file mode 100644 (file)
index 2ccec89..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.2'
-metadata:
-  $default-stream: some_stream
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/metadata/env-invalid-type.yaml b/tests/config/2/fail/metadata/env-invalid-type.yaml
deleted file mode 100644 (file)
index 1886d02..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  env: 17
diff --git a/tests/config/2/fail/metadata/env-key-invalid-identifier.yaml b/tests/config/2/fail/metadata/env-key-invalid-identifier.yaml
deleted file mode 100644 (file)
index 24027df..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  env:
-    'yes sir miller': bug
diff --git a/tests/config/2/fail/metadata/env-value-invalid-type.yaml b/tests/config/2/fail/metadata/env-value-invalid-type.yaml
deleted file mode 100644 (file)
index 1daeade..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  env:
-    yes-sir-miller:
-      - a
-      - b
diff --git a/tests/config/2/fail/metadata/fail.bats b/tests/config/2/fail/metadata/fail.bats
deleted file mode 100644 (file)
index e19a159..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'unknown property in metadata object makes barectf fail' {
-  barectf_config_check_fail unknown-prop.yaml
-}
-
-@test 'wrong "env" property type in metadata object makes barectf fail' {
-  barectf_config_check_fail env-invalid-type.yaml
-}
-
-@test 'invalid "env" key (invalid C identifier) in metadata object makes barectf fail' {
-  barectf_config_check_fail env-key-invalid-identifier.yaml
-}
-
-@test 'invalid "env" value (not an int/string) in metadata object makes barectf fail' {
-  barectf_config_check_fail env-value-invalid-type.yaml
-}
-
-@test 'wrong "clocks" property type in metadata object makes barectf fail' {
-  barectf_config_check_fail clocks-invalid-type.yaml
-}
-
-@test 'invalid "clocks" key (invalid C identifier) in metadata object makes barectf fail' {
-  barectf_config_check_fail clocks-key-invalid-identifier.yaml
-}
-
-@test 'wrong "$log-levels" property type in metadata object makes barectf fail' {
-  barectf_config_check_fail ll-invalid-type.yaml
-}
-
-@test 'wrong "$log-levels" property value type in metadata object makes barectf fail' {
-  barectf_config_check_fail ll-value-invalid-type.yaml
-}
-
-@test 'wrong "type-aliases" property type in metadata object makes barectf fail' {
-  barectf_config_check_fail ta-invalid-type.yaml
-}
-
-@test 'no "trace" property in metadata object makes barectf fail' {
-  barectf_config_check_fail trace-no.yaml
-}
-
-@test 'wrong "trace" property type in metadata object makes barectf fail' {
-  barectf_config_check_fail trace-invalid-type.yaml
-}
-
-@test 'empty "trace" property in metadata object makes barectf fail' {
-  barectf_config_check_fail trace-empty.yaml
-}
-
-@test 'no "streams" property in metadata object makes barectf fail' {
-  barectf_config_check_fail streams-no.yaml
-}
-
-@test 'wrong "streams" property type in metadata object makes barectf fail' {
-  barectf_config_check_fail streams-invalid-type.yaml
-}
-
-@test 'empty "streams" property in metadata object makes barectf fail' {
-  barectf_config_check_fail streams-empty.yaml
-}
-
-@test 'invalid "streams" key (invalid C identifier) in metadata object makes barectf fail' {
-  barectf_config_check_fail streams-key-invalid-identifier.yaml
-}
-
-@test 'multiple streams in metadata object with missing "stream_id" packet header type field makes barectf fail' {
-  barectf_config_check_fail multiple-streams-trace-ph-no-stream-id.yaml
-}
-
-@test 'wrong "$default-stream" property type in metadata object makes barectf fail' {
-  barectf_config_check_fail default-stream-invalid-type.yaml
-}
-
-@test 'non-existing stream name in "$default-stream" property makes barectf fail' {
-  barectf_config_check_fail default-stream-unknown-stream.yaml
-}
-
-@test 'coexisting "$default-stream" property (metadata) and "$default: true" property (stream) with different names make barectf fail' {
-  barectf_config_check_fail default-stream-stream-default-duplicate.yaml
-}
diff --git a/tests/config/2/fail/metadata/ll-invalid-type.yaml b/tests/config/2/fail/metadata/ll-invalid-type.yaml
deleted file mode 100644 (file)
index cda3e9f..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  $log-levels: hello
diff --git a/tests/config/2/fail/metadata/ll-value-invalid-type.yaml b/tests/config/2/fail/metadata/ll-value-invalid-type.yaml
deleted file mode 100644 (file)
index d9dce3c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  $log-levels:
-    'yes sir miller': meow
diff --git a/tests/config/2/fail/metadata/multiple-streams-trace-ph-no-stream-id.yaml b/tests/config/2/fail/metadata/multiple-streams-trace-ph-no-stream-id.yaml
deleted file mode 100644 (file)
index 71d7469..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  $include:
-    - stdint.yaml
-    - stdmisc.yaml
-  type-aliases:
-    pct:
-      class: struct
-      fields:
-        packet_size: uint32
-        content_size: uint32
-    pt:
-      class: struct
-      fields:
-        a: uint32
-  trace:
-    byte-order: le
-    packet-header-type:
-      class: struct
-      fields:
-        magic: ctf-magic
-  streams:
-    s1:
-      packet-context-type: pct
-      events:
-        ev1:
-          payload-type: pt
-    s2:
-      packet-context-type: pct
-      events:
-        ev2:
-          payload-type: pt
diff --git a/tests/config/2/fail/metadata/streams-empty.yaml b/tests/config/2/fail/metadata/streams-empty.yaml
deleted file mode 100644 (file)
index a911f0e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams: {}
diff --git a/tests/config/2/fail/metadata/streams-invalid-type.yaml b/tests/config/2/fail/metadata/streams-invalid-type.yaml
deleted file mode 100644 (file)
index 76391ab..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams: -17
diff --git a/tests/config/2/fail/metadata/streams-key-invalid-identifier.yaml b/tests/config/2/fail/metadata/streams-key-invalid-identifier.yaml
deleted file mode 100644 (file)
index 4ca8111..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    'some stream':
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/metadata/streams-no.yaml b/tests/config/2/fail/metadata/streams-no.yaml
deleted file mode 100644 (file)
index 32894b4..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
diff --git a/tests/config/2/fail/metadata/ta-invalid-type.yaml b/tests/config/2/fail/metadata/ta-invalid-type.yaml
deleted file mode 100644 (file)
index 888210d..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    - uint16:
-        class: int
-        size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/metadata/trace-empty.yaml b/tests/config/2/fail/metadata/trace-empty.yaml
deleted file mode 100644 (file)
index 359c74f..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace: {}
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/metadata/trace-invalid-type.yaml b/tests/config/2/fail/metadata/trace-invalid-type.yaml
deleted file mode 100644 (file)
index 3f39bc5..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace: switch
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/metadata/trace-no.yaml b/tests/config/2/fail/metadata/trace-no.yaml
deleted file mode 100644 (file)
index 060b39b..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/metadata/unknown-prop.yaml b/tests/config/2/fail/metadata/unknown-prop.yaml
deleted file mode 100644 (file)
index 5ad61d3..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-  unknown: false
diff --git a/tests/config/2/fail/stream/default-invalid-type.yaml b/tests/config/2/fail/stream/default-invalid-type.yaml
deleted file mode 100644 (file)
index 908eb79..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.2'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      $default: 23
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/ect-invalid-type.yaml b/tests/config/2/fail/stream/ect-invalid-type.yaml
deleted file mode 100644 (file)
index b56c582..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      event-context-type: 23
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/ect-not-struct.yaml b/tests/config/2/fail/stream/ect-not-struct.yaml
deleted file mode 100644 (file)
index 4a9bbe9..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      event-context-type:
-        class: string
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/eht-id-no-multiple-events.yaml b/tests/config/2/fail/stream/eht-id-no-multiple-events.yaml
deleted file mode 100644 (file)
index cb7ced7..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-        my_other_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/eht-id-not-int.yaml b/tests/config/2/fail/stream/eht-id-not-int.yaml
deleted file mode 100644 (file)
index 1eeb868..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-      event-header-type:
-        class: struct
-        fields:
-          id:
-            class: string
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/eht-id-too-small.yaml b/tests/config/2/fail/stream/eht-id-too-small.yaml
deleted file mode 100644 (file)
index a3a4b11..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-      event-header-type:
-        class: struct
-        min-align: 8
-        fields:
-          id:
-            class: int
-            size: 2
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field: uint16
-        my_event2:
-          payload-type:
-            class: struct
-            fields:
-              my_field: uint16
-        my_event3:
-          payload-type:
-            class: struct
-            fields:
-              my_field: uint16
-        my_event4:
-          payload-type:
-            class: struct
-            fields:
-              my_field: uint16
-        my_event5:
-          payload-type:
-            class: struct
-            fields:
-              my_field: uint16
diff --git a/tests/config/2/fail/stream/eht-id-wrong-signed.yaml b/tests/config/2/fail/stream/eht-id-wrong-signed.yaml
deleted file mode 100644 (file)
index 9485bd2..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-      event-header-type:
-        class: struct
-        fields:
-          id:
-            class: int
-            size: 16
-            signed: true
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/eht-invalid-type.yaml b/tests/config/2/fail/stream/eht-invalid-type.yaml
deleted file mode 100644 (file)
index 765c67e..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      event-header-type: 23
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/eht-not-struct.yaml b/tests/config/2/fail/stream/eht-not-struct.yaml
deleted file mode 100644 (file)
index 048f62e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      event-header-type:
-        class: string
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/eht-timestamp-not-int.yaml b/tests/config/2/fail/stream/eht-timestamp-not-int.yaml
deleted file mode 100644 (file)
index 39a07ac..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-      event-header-type:
-        class: struct
-        fields:
-          timestamp:
-            class: string
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/eht-timestamp-wrong-pm.yaml b/tests/config/2/fail/stream/eht-timestamp-wrong-pm.yaml
deleted file mode 100644 (file)
index 064eafe..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-      event-header-type:
-        class: struct
-        fields:
-          timestamp:
-            class: int
-            size: 16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/eht-timestamp-wrong-signed.yaml b/tests/config/2/fail/stream/eht-timestamp-wrong-signed.yaml
deleted file mode 100644 (file)
index 2e65575..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-      event-header-type:
-        class: struct
-        fields:
-          timestamp:
-            class: int
-            size: 16
-            signed: true
-            property-mappings:
-              - type: clock
-                name: my_clock
-                property: value
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/events-empty.yaml b/tests/config/2/fail/stream/events-empty.yaml
deleted file mode 100644 (file)
index b100d92..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events: {}
diff --git a/tests/config/2/fail/stream/events-invalid-type.yaml b/tests/config/2/fail/stream/events-invalid-type.yaml
deleted file mode 100644 (file)
index 557d1b0..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events: 23.5
diff --git a/tests/config/2/fail/stream/events-key-invalid-identifier.yaml b/tests/config/2/fail/stream/events-key-invalid-identifier.yaml
deleted file mode 100644 (file)
index 6c17ee1..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    a_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        'my event':
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/events-no.yaml b/tests/config/2/fail/stream/events-no.yaml
deleted file mode 100644 (file)
index eae4fbe..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size:
-            class: int
-            size: 16
-          content_size:
-            class: int
-            size: 16
diff --git a/tests/config/2/fail/stream/fail.bats b/tests/config/2/fail/stream/fail.bats
deleted file mode 100644 (file)
index f70eea0..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'unknown property in stream object makes barectf fail' {
-  barectf_config_check_fail unknown-prop.yaml
-}
-
-@test 'no "packet-context-type" property in stream object makes barectf fail' {
-  barectf_config_check_fail pct-no.yaml
-}
-
-@test 'wrong "packet-context-type" property type in stream object makes barectf fail' {
-  barectf_config_check_fail pct-invalid-type.yaml
-}
-
-@test 'invalid "packet-context-type" property field type (not a structure) in stream object makes barectf fail' {
-  barectf_config_check_fail pct-not-struct.yaml
-}
-
-@test 'invalid "timestamp_begin" field type (not an integer) in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-tb-not-int.yaml
-}
-
-@test 'invalid "timestamp_begin" field type (signed) in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-tb-wrong-signed.yaml
-}
-
-@test 'invalid "timestamp_begin" field type (not mapped to a clock) in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-tb-wrong-pm.yaml
-}
-
-@test 'no "timestamp_begin" field with an existing "timestamp_end" field in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-te-yes-tb-no.yaml
-}
-
-@test 'invalid "timestamp_end" field type (not an integer) in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-te-not-int.yaml
-}
-
-@test 'invalid "timestamp_end" field type (signed) in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-te-wrong-signed.yaml
-}
-
-@test 'invalid "timestamp_end" field type (not mapped to a clock) in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-te-wrong-pm.yaml
-}
-
-@test 'no "timestamp_end" field with an existing "timestamp_begin" field in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-tb-yes-te-no.yaml
-}
-
-@test '"timestamp_begin" field and "timestamp_end" field are not mapped to the same clock in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-tb-te-different-clocks.yaml
-}
-
-@test 'invalid "packet_size" field type (not an integer) in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-ps-not-int.yaml
-}
-
-@test 'invalid "packet_size" field type (signed) in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-ps-wrong-signed.yaml
-}
-
-@test 'no "packet_size" field with an existing "content_size" field in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-cs-yes-ps-no.yaml
-}
-
-@test 'invalid "content_size" field type (not an integer) in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-cs-not-int.yaml
-}
-
-@test 'invalid "content_size" field type (signed) in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-cs-wrong-signed.yaml
-}
-
-@test 'no "content_size" field with an existing "packet_size" field in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-ps-yes-cs-no.yaml
-}
-
-@test 'invalid "events_discarded" field type (not an integer) in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-ed-not-int.yaml
-}
-
-@test 'invalid "events_discarded" field type (signed) in packet context type makes barectf fail' {
-  barectf_config_check_fail pct-ed-wrong-signed.yaml
-}
-
-@test 'wrong "event-header-type" property type in stream object makes barectf fail' {
-  barectf_config_check_fail eht-invalid-type.yaml
-}
-
-@test 'invalid "event-header-type" property field type (not a structure) in stream object makes barectf fail' {
-  barectf_config_check_fail eht-not-struct.yaml
-}
-
-@test 'invalid "timestamp" field type (not an integer) in event header type makes barectf fail' {
-  barectf_config_check_fail eht-timestamp-not-int.yaml
-}
-
-@test 'invalid "timestamp" field type (signed) in event header type makes barectf fail' {
-  barectf_config_check_fail eht-timestamp-wrong-signed.yaml
-}
-
-@test 'invalid "timestamp" field type (not mapped to a clock) in event header type makes barectf fail' {
-  barectf_config_check_fail eht-timestamp-wrong-pm.yaml
-}
-
-@test 'invalid "id" field type (not an integer) in event header type makes barectf fail' {
-  barectf_config_check_fail eht-id-not-int.yaml
-}
-
-@test 'invalid "id" field type (signed) in event header type makes barectf fail' {
-  barectf_config_check_fail eht-id-wrong-signed.yaml
-}
-
-@test 'no event header type with multiple events in stream object makes barectf fail' {
-  barectf_config_check_fail eht-id-no-multiple-events.yaml
-}
-
-@test '"id" field type size too small for the number of stream events in event header type makes barectf fail' {
-  barectf_config_check_fail eht-id-too-small.yaml
-}
-
-@test 'wrong "event-context-type" property type in stream object makes barectf fail' {
-  barectf_config_check_fail ect-invalid-type.yaml
-}
-
-@test 'invalid "event-context-type" property field type (not a structure) in stream object makes barectf fail' {
-  barectf_config_check_fail ect-not-struct.yaml
-}
-
-@test 'no "events" property in stream object makes barectf fail' {
-  barectf_config_check_fail events-no.yaml
-}
-
-@test 'wrong "events" property type in stream object makes barectf fail' {
-  barectf_config_check_fail events-invalid-type.yaml
-}
-
-@test 'empty "events" property in stream object makes barectf fail' {
-  barectf_config_check_fail events-empty.yaml
-}
-
-@test 'invalid "events" key (invalid C identifier) in metadata object makes barectf fail' {
-  barectf_config_check_fail events-key-invalid-identifier.yaml
-}
-
-@test 'wrong "$default" property type in stream object makes barectf fail' {
-  barectf_config_check_fail default-invalid-type.yaml
-}
diff --git a/tests/config/2/fail/stream/pct-cs-not-int.yaml b/tests/config/2/fail/stream/pct-cs-not-int.yaml
deleted file mode 100644 (file)
index 9b7c053..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size:
-            class: string
-          packet_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-cs-wrong-signed.yaml b/tests/config/2/fail/stream/pct-cs-wrong-signed.yaml
deleted file mode 100644 (file)
index 70127d7..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size:
-            class: int
-            size: 16
-            signed: true
-          packet_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-cs-yes-ps-no.yaml b/tests/config/2/fail/stream/pct-cs-yes-ps-no.yaml
deleted file mode 100644 (file)
index 5fb3a95..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-ed-not-int.yaml b/tests/config/2/fail/stream/pct-ed-not-int.yaml
deleted file mode 100644 (file)
index a1bfffb..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          events_discarded:
-            class: string
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-ed-wrong-signed.yaml b/tests/config/2/fail/stream/pct-ed-wrong-signed.yaml
deleted file mode 100644 (file)
index 372c70d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          events_discarded:
-            class: int
-            size: 16
-            signed: true
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-invalid-type.yaml b/tests/config/2/fail/stream/pct-invalid-type.yaml
deleted file mode 100644 (file)
index 55bf135..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type: 23
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-no.yaml b/tests/config/2/fail/stream/pct-no.yaml
deleted file mode 100644 (file)
index 1f4beab..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-not-struct.yaml b/tests/config/2/fail/stream/pct-not-struct.yaml
deleted file mode 100644 (file)
index 128f92e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: string
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-ps-not-int.yaml b/tests/config/2/fail/stream/pct-ps-not-int.yaml
deleted file mode 100644 (file)
index 5d767aa..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size:
-            class: string
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-ps-wrong-signed.yaml b/tests/config/2/fail/stream/pct-ps-wrong-signed.yaml
deleted file mode 100644 (file)
index 2887e05..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size:
-            class: int
-            size: 16
-            signed: true
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-ps-yes-cs-no.yaml b/tests/config/2/fail/stream/pct-ps-yes-cs-no.yaml
deleted file mode 100644 (file)
index 8f2ccd1..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-tb-not-int.yaml b/tests/config/2/fail/stream/pct-tb-not-int.yaml
deleted file mode 100644 (file)
index a78c9cb..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-          timestamp_begin:
-            class: string
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-tb-te-different-clocks.yaml b/tests/config/2/fail/stream/pct-tb-te-different-clocks.yaml
deleted file mode 100644 (file)
index 1158c8d..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-    my_other_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-          timestamp_begin:
-            class: int
-            size: 32
-            property-mappings:
-              - type: clock
-                name: my_clock
-                property: value
-          timestamp_end:
-            class: int
-            size: 32
-            property-mappings:
-              - type: clock
-                name: my_other_clock
-                property: value
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-tb-wrong-pm.yaml b/tests/config/2/fail/stream/pct-tb-wrong-pm.yaml
deleted file mode 100644 (file)
index c6ca9ae..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-          timestamp_begin:
-            class: int
-            size: 16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-tb-wrong-signed.yaml b/tests/config/2/fail/stream/pct-tb-wrong-signed.yaml
deleted file mode 100644 (file)
index f559bca..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-          timestamp_begin:
-            class: int
-            size: 16
-            signed: true
-            property-mappings:
-              - type: clock
-                name: my_clock
-                property: value
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-tb-yes-te-no.yaml b/tests/config/2/fail/stream/pct-tb-yes-te-no.yaml
deleted file mode 100644 (file)
index a3422a0..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-          timestamp_begin:
-            class: int
-            size: 32
-            property-mappings:
-              - type: clock
-                name: my_clock
-                property: value
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-te-not-int.yaml b/tests/config/2/fail/stream/pct-te-not-int.yaml
deleted file mode 100644 (file)
index 9e286c4..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-          timestamp_end:
-            class: string
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-te-wrong-pm.yaml b/tests/config/2/fail/stream/pct-te-wrong-pm.yaml
deleted file mode 100644 (file)
index 0b8bfd9..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-          timestamp_end:
-            class: int
-            size: 16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-te-wrong-signed.yaml b/tests/config/2/fail/stream/pct-te-wrong-signed.yaml
deleted file mode 100644 (file)
index 48507bf..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-          timestamp_end:
-            class: int
-            size: 16
-            signed: true
-            property-mappings:
-              - type: clock
-                name: my_clock
-                property: value
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/pct-te-yes-tb-no.yaml b/tests/config/2/fail/stream/pct-te-yes-tb-no.yaml
deleted file mode 100644 (file)
index 2fdd9b1..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-          timestamp_end:
-            class: int
-            size: 32
-            property-mappings:
-              - type: clock
-                name: my_clock
-                property: value
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/stream/unknown-prop.yaml b/tests/config/2/fail/stream/unknown-prop.yaml
deleted file mode 100644 (file)
index 0b370ba..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      unknown: true
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/bo-invalid-type.yaml b/tests/config/2/fail/trace/bo-invalid-type.yaml
deleted file mode 100644 (file)
index fddf0ef..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: 23
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/bo-invalid.yaml b/tests/config/2/fail/trace/bo-invalid.yaml
deleted file mode 100644 (file)
index 01baca8..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: ze
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/bo-no.yaml b/tests/config/2/fail/trace/bo-no.yaml
deleted file mode 100644 (file)
index 359c74f..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace: {}
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/fail.bats b/tests/config/2/fail/trace/fail.bats
deleted file mode 100644 (file)
index f8b6cb7..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'unknown property in trace object makes barectf fail' {
-  barectf_config_check_fail unknown-prop.yaml
-}
-
-@test 'wrong "byte-order" property type in trace object makes barectf fail' {
-  barectf_config_check_fail bo-invalid-type.yaml
-}
-
-@test 'no "byte-order" property in trace object makes barectf fail' {
-  barectf_config_check_fail bo-no.yaml
-}
-
-@test 'invalid "byte-order" property in trace object makes barectf fail' {
-  barectf_config_check_fail bo-invalid.yaml
-}
-
-@test 'invalid "packet-header-type" property field type (not a structure) in trace object makes barectf fail' {
-  barectf_config_check_fail ph-not-struct.yaml
-}
-
-@test 'wrong "uuid" property type in trace object makes barectf fail' {
-  barectf_config_check_fail uuid-invalid-type.yaml
-}
-
-@test 'invalid "uuid" property (invalid UUID format) in trace object makes barectf fail' {
-  barectf_config_check_fail uuid-invalid-uuid.yaml
-}
-
-@test 'invalid "magic" field type (not an integer) in packet header type makes barectf fail' {
-  barectf_config_check_fail ph-magic-not-int.yaml
-}
-
-@test 'invalid "magic" field type (wrong integer size) in packet header type makes barectf fail' {
-  barectf_config_check_fail ph-magic-wrong-size.yaml
-}
-
-@test 'invalid "magic" field type (signed) in packet header type makes barectf fail' {
-  barectf_config_check_fail ph-magic-wrong-signed.yaml
-}
-
-@test 'invalid "stream_id" field type (not an integer) in packet header type makes barectf fail' {
-  barectf_config_check_fail ph-streamid-not-int.yaml
-}
-
-@test 'invalid "stream_id" field type (signed) in packet header type makes barectf fail' {
-  barectf_config_check_fail ph-streamid-wrong-signed.yaml
-}
-
-@test '"stream_id" field type size too small for the number of trace streams in packet header type makes barectf fail' {
-  barectf_config_check_fail ph-streamid-too-small.yaml
-}
-
-@test 'invalid "uuid" field type (not an array) in packet header type makes barectf fail' {
-  barectf_config_check_fail ph-uuid-not-array.yaml
-}
-
-@test 'invalid "uuid" field type (wrong array length) in packet header type makes barectf fail' {
-  barectf_config_check_fail ph-uuid-wrong-length.yaml
-}
-
-@test 'invalid "uuid" field type (element type is not an integer) in packet header type makes barectf fail' {
-  barectf_config_check_fail ph-uuid-et-not-int.yaml
-}
-
-@test 'invalid "uuid" field type (wrong element type size) in packet header type makes barectf fail' {
-  barectf_config_check_fail ph-uuid-et-wrong-size.yaml
-}
-
-@test 'invalid "uuid" field type (element type is signed) in packet header type makes barectf fail' {
-  barectf_config_check_fail ph-uuid-et-wrong-signed.yaml
-}
-
-@test 'invalid "uuid" field type (wrong element type alignment) in packet header type makes barectf fail' {
-  barectf_config_check_fail ph-uuid-et-wrong-align.yaml
-}
diff --git a/tests/config/2/fail/trace/ph-magic-not-int.yaml b/tests/config/2/fail/trace/ph-magic-not-int.yaml
deleted file mode 100644 (file)
index 87911be..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: be
-    packet-header-type:
-      class: struct
-      fields:
-        magic:
-          class: string
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/ph-magic-wrong-signed.yaml b/tests/config/2/fail/trace/ph-magic-wrong-signed.yaml
deleted file mode 100644 (file)
index 604f0a0..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: be
-    packet-header-type:
-      class: struct
-      fields:
-        magic:
-          class: int
-          size: 32
-          signed: true
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/ph-magic-wrong-size.yaml b/tests/config/2/fail/trace/ph-magic-wrong-size.yaml
deleted file mode 100644 (file)
index 2a1eaf7..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: be
-    packet-header-type:
-      class: struct
-      fields:
-        magic:
-          class: int
-          size: 16
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/ph-not-struct.yaml b/tests/config/2/fail/trace/ph-not-struct.yaml
deleted file mode 100644 (file)
index 92a6d5e..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: be
-    packet-header-type:
-      class: int
-      size: 32
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/ph-streamid-not-int.yaml b/tests/config/2/fail/trace/ph-streamid-not-int.yaml
deleted file mode 100644 (file)
index d457fd1..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: be
-    packet-header-type:
-      class: struct
-      fields:
-        stream_id:
-          class: string
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/ph-streamid-too-small.yaml b/tests/config/2/fail/trace/ph-streamid-too-small.yaml
deleted file mode 100644 (file)
index 946406a..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  clocks:
-    my_clock: {}
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: le
-    packet-header-type:
-      class: struct
-      min-align: 8
-      fields:
-        stream_id:
-          class: int
-          size: 2
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-      event-header-type:
-        class: struct
-        min-align: 8
-        fields:
-          id: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field: uint16
-    my_stream2:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-      event-header-type:
-        class: struct
-        min-align: 8
-        fields:
-          id: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field: uint16
-    my_stream3:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-      event-header-type:
-        class: struct
-        min-align: 8
-        fields:
-          id: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field: uint16
-    my_stream4:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-      event-header-type:
-        class: struct
-        min-align: 8
-        fields:
-          id: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field: uint16
-    my_stream5:
-      packet-context-type:
-        class: struct
-        fields:
-          content_size: uint16
-          packet_size: uint16
-      event-header-type:
-        class: struct
-        min-align: 8
-        fields:
-          id: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field: uint16
diff --git a/tests/config/2/fail/trace/ph-streamid-wrong-signed.yaml b/tests/config/2/fail/trace/ph-streamid-wrong-signed.yaml
deleted file mode 100644 (file)
index e232bbb..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: be
-    packet-header-type:
-      class: struct
-      fields:
-        stream_id:
-          class: int
-          size: 16
-          signed: true
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/ph-uuid-et-not-int.yaml b/tests/config/2/fail/trace/ph-uuid-et-not-int.yaml
deleted file mode 100644 (file)
index cef76c8..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    uuid: auto
-    byte-order: be
-    packet-header-type:
-      class: struct
-      fields:
-        uuid:
-          class: array
-          length: 16
-          element-type:
-            class: string
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/ph-uuid-et-wrong-align.yaml b/tests/config/2/fail/trace/ph-uuid-et-wrong-align.yaml
deleted file mode 100644 (file)
index 319d986..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    uuid: auto
-    byte-order: be
-    packet-header-type:
-      class: struct
-      fields:
-        uuid:
-          class: array
-          length: 16
-          element-type:
-            class: int
-            size: 8
-            align: 16
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/ph-uuid-et-wrong-signed.yaml b/tests/config/2/fail/trace/ph-uuid-et-wrong-signed.yaml
deleted file mode 100644 (file)
index 04107bd..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    uuid: auto
-    byte-order: be
-    packet-header-type:
-      class: struct
-      fields:
-        uuid:
-          class: array
-          length: 16
-          element-type:
-            class: int
-            size: 8
-            signed: true
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/ph-uuid-et-wrong-size.yaml b/tests/config/2/fail/trace/ph-uuid-et-wrong-size.yaml
deleted file mode 100644 (file)
index c2492a7..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    uuid: auto
-    byte-order: be
-    packet-header-type:
-      class: struct
-      fields:
-        uuid:
-          class: array
-          length: 16
-          element-type:
-            class: int
-            size: 4
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/ph-uuid-not-array.yaml b/tests/config/2/fail/trace/ph-uuid-not-array.yaml
deleted file mode 100644 (file)
index d1aa05b..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    uuid: auto
-    byte-order: be
-    packet-header-type:
-      class: struct
-      fields:
-        uuid: uint16
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/ph-uuid-wrong-length.yaml b/tests/config/2/fail/trace/ph-uuid-wrong-length.yaml
deleted file mode 100644 (file)
index 4817248..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    uuid: auto
-    byte-order: be
-    packet-header-type:
-      class: struct
-      fields:
-        uuid:
-          class: array
-          length: 17
-          element-type:
-            class: int
-            size: 8
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/unknown-prop.yaml b/tests/config/2/fail/trace/unknown-prop.yaml
deleted file mode 100644 (file)
index 3ce7f0c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order: be
-    unknown: false
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/uuid-invalid-type.yaml b/tests/config/2/fail/trace/uuid-invalid-type.yaml
deleted file mode 100644 (file)
index 83d95f0..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    uuid: 12
-    byte-order: be
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/trace/uuid-invalid-uuid.yaml b/tests/config/2/fail/trace/uuid-invalid-uuid.yaml
deleted file mode 100644 (file)
index 92ba144..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    uuid: something
-    byte-order: be
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/type-enum/fail.bats b/tests/config/2/fail/type-enum/fail.bats
deleted file mode 100644 (file)
index 79a11c4..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'unknown property in enum type object makes barectf fail' {
-  barectf_config_check_fail unknown-prop.yaml
-}
-
-@test 'no "value-type" property in enum type object makes barectf fail' {
-  barectf_config_check_fail vt-no.yaml
-}
-
-@test 'wrong "value-type" property type in enum type object makes barectf fail' {
-  barectf_config_check_fail vt-invalid-type.yaml
-}
-
-@test 'no "members" property in enum type object makes barectf fail' {
-  barectf_config_check_fail members-no.yaml
-}
-
-@test 'wrong "members" property type in enum type object makes barectf fail' {
-  barectf_config_check_fail members-invalid-type.yaml
-}
-
-@test 'empty "members" property in enum type object makes barectf fail' {
-  barectf_config_check_fail members-empty.yaml
-}
-
-@test 'wrong "members" property element type in enum type object makes barectf fail' {
-  barectf_config_check_fail members-el-invalid-type.yaml
-}
-
-@test 'unknown property in enum type member object makes barectf fail' {
-  barectf_config_check_fail members-el-member-unknown-prop.yaml
-}
-
-@test 'wrong "label" property type in enum type member object makes barectf fail' {
-  barectf_config_check_fail members-el-member-label-invalid-type.yaml
-}
-
-@test 'wrong "value" property type in enum type member object makes barectf fail' {
-  barectf_config_check_fail members-el-member-value-invalid-type.yaml
-}
-
-@test '"value" property outside the unsigned value type range in enum type member object makes barectf fail' {
-  barectf_config_check_fail members-el-member-value-outside-range-unsigned.yaml
-}
-
-@test '"value" property outside the signed value type range in enum type member object makes barectf fail' {
-  barectf_config_check_fail members-el-member-value-outside-range-signed.yaml
-}
-
-@test 'overlapping members in enum type object makes barectf fail' {
-  barectf_config_check_fail members-overlap.yaml
-}
diff --git a/tests/config/2/fail/type-enum/members-el-invalid-type.yaml b/tests/config/2/fail/type-enum/members-el-invalid-type.yaml
deleted file mode 100644 (file)
index b5b4dec..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                value-type:
-                  class: int
-                  size: 8
-                members:
-                  - HELLO
-                  - 23
-                  - ZOOM
diff --git a/tests/config/2/fail/type-enum/members-el-member-label-invalid-type.yaml b/tests/config/2/fail/type-enum/members-el-member-label-invalid-type.yaml
deleted file mode 100644 (file)
index 8c9dac1..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                value-type:
-                  class: int
-                  size: 8
-                members:
-                  - HELLO
-                  - label: 65
-                    value: 6
-                  - ZOOM
diff --git a/tests/config/2/fail/type-enum/members-el-member-unknown-prop.yaml b/tests/config/2/fail/type-enum/members-el-member-unknown-prop.yaml
deleted file mode 100644 (file)
index 605ca47..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                value-type:
-                  class: int
-                  size: 8
-                members:
-                  - HELLO
-                  - label: six
-                    value: 6
-                    unknown: true
-                  - ZOOM
diff --git a/tests/config/2/fail/type-enum/members-el-member-value-invalid-type.yaml b/tests/config/2/fail/type-enum/members-el-member-value-invalid-type.yaml
deleted file mode 100644 (file)
index bff7116..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                value-type:
-                  class: int
-                  size: 8
-                members:
-                  - HELLO
-                  - label: label
-                    value: meow
-                  - ZOOM
diff --git a/tests/config/2/fail/type-enum/members-el-member-value-outside-range-signed.yaml b/tests/config/2/fail/type-enum/members-el-member-value-outside-range-signed.yaml
deleted file mode 100644 (file)
index 295e4e5..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                value-type:
-                  class: int
-                  size: 8
-                  signed: true
-                members:
-                  - HELLO
-                  - label: label
-                    value: -129
-                  - ZOOM
diff --git a/tests/config/2/fail/type-enum/members-el-member-value-outside-range-unsigned.yaml b/tests/config/2/fail/type-enum/members-el-member-value-outside-range-unsigned.yaml
deleted file mode 100644 (file)
index f36cf32..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                value-type:
-                  class: int
-                  size: 8
-                members:
-                  - HELLO
-                  - label: label
-                    value: 256
-                  - ZOOM
diff --git a/tests/config/2/fail/type-enum/members-empty.yaml b/tests/config/2/fail/type-enum/members-empty.yaml
deleted file mode 100644 (file)
index 0f93579..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                value-type:
-                  class: int
-                  size: 8
-                members: []
diff --git a/tests/config/2/fail/type-enum/members-invalid-type.yaml b/tests/config/2/fail/type-enum/members-invalid-type.yaml
deleted file mode 100644 (file)
index ac4a6f1..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                value-type:
-                  class: int
-                  size: 8
-                members: string
diff --git a/tests/config/2/fail/type-enum/members-no.yaml b/tests/config/2/fail/type-enum/members-no.yaml
deleted file mode 100644 (file)
index 19227ca..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                value-type:
-                  class: int
-                  size: 8
diff --git a/tests/config/2/fail/type-enum/members-overlap.yaml b/tests/config/2/fail/type-enum/members-overlap.yaml
deleted file mode 100644 (file)
index 5b50aa2..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                value-type:
-                  class: int
-                  size: 8
-                  signed: true
-                members:
-                  - HELLO
-                  - ZOOM
-                  - label: MAGOG
-                    value: 0
diff --git a/tests/config/2/fail/type-enum/unknown-prop.yaml b/tests/config/2/fail/type-enum/unknown-prop.yaml
deleted file mode 100644 (file)
index a845159..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                value-type:
-                  class: int
-                  size: 8
-                members:
-                  - HELLO
-                unknown: false
diff --git a/tests/config/2/fail/type-enum/vt-invalid-type.yaml b/tests/config/2/fail/type-enum/vt-invalid-type.yaml
deleted file mode 100644 (file)
index 4d2a184..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                value-type: 23
-                members:
-                  - HELLO
diff --git a/tests/config/2/fail/type-enum/vt-no.yaml b/tests/config/2/fail/type-enum/vt-no.yaml
deleted file mode 100644 (file)
index 374de4f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: enum
-                members:
-                  - HELLO
diff --git a/tests/config/2/fail/type-float/align-0.yaml b/tests/config/2/fail/type-float/align-0.yaml
deleted file mode 100644 (file)
index 6ac0410..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: float
-                size:
-                  exp: 8
-                  mant: 24
-                align: 0
diff --git a/tests/config/2/fail/type-float/align-3.yaml b/tests/config/2/fail/type-float/align-3.yaml
deleted file mode 100644 (file)
index 87ab18c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: float
-                size:
-                  exp: 8
-                  mant: 24
-                align: 3
diff --git a/tests/config/2/fail/type-float/align-invalid-type.yaml b/tests/config/2/fail/type-float/align-invalid-type.yaml
deleted file mode 100644 (file)
index 9c06ae5..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: float
-                size:
-                  exp: 8
-                  mant: 24
-                align: string
diff --git a/tests/config/2/fail/type-float/bo-invalid-type.yaml b/tests/config/2/fail/type-float/bo-invalid-type.yaml
deleted file mode 100644 (file)
index b0db7a7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: float
-                size:
-                  exp: 8
-                  mant: 24
-                byte-order: 17
diff --git a/tests/config/2/fail/type-float/bo-invalid.yaml b/tests/config/2/fail/type-float/bo-invalid.yaml
deleted file mode 100644 (file)
index 418a20f..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: float
-                size:
-                  exp: 8
-                  mant: 24
-                byte-order: ze
diff --git a/tests/config/2/fail/type-float/fail.bats b/tests/config/2/fail/type-float/fail.bats
deleted file mode 100644 (file)
index a4778fb..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'unknown property in float type object makes barectf fail' {
-  barectf_config_check_fail unknown-prop.yaml
-}
-
-@test 'no "size" property in float type object makes barectf fail' {
-  barectf_config_check_fail size-no.yaml
-}
-
-@test 'wrong "size" property type in float type object makes barectf fail' {
-  barectf_config_check_fail size-invalid-type.yaml
-}
-
-@test 'unknown property in float type object "size" property makes barectf fail' {
-  barectf_config_check_fail size-unknown-prop.yaml
-}
-
-@test 'no "exp" property in float type object "size" property makes barectf fail' {
-  barectf_config_check_fail size-exp-no.yaml
-}
-
-@test 'no "mant" property in float type object "size" property makes barectf fail' {
-  barectf_config_check_fail size-mant-no.yaml
-}
-
-@test 'sum of "mant" and "exp" properties of float type size object not a multiple of 32 property makes barectf fail' {
-  barectf_config_check_fail size-exp-mant-wrong-sum.yaml
-}
-
-@test 'wrong "align" property type in float type object makes barectf fail' {
-  barectf_config_check_fail align-invalid-type.yaml
-}
-
-@test 'invalid "align" property (0) in float type object makes barectf fail' {
-  barectf_config_check_fail align-0.yaml
-}
-
-@test 'invalid "align" property (3) in float type object makes barectf fail' {
-  barectf_config_check_fail align-3.yaml
-}
-
-@test 'wrong "byte-order" property type in float type object makes barectf fail' {
-  barectf_config_check_fail bo-invalid-type.yaml
-}
-
-@test 'invalid "byte-order" property in float type object makes barectf fail' {
-  barectf_config_check_fail bo-invalid.yaml
-}
diff --git a/tests/config/2/fail/type-float/size-exp-mant-wrong-sum.yaml b/tests/config/2/fail/type-float/size-exp-mant-wrong-sum.yaml
deleted file mode 100644 (file)
index f69f4cf..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: float
-                size:
-                  exp: 5
-                  mant: 21
diff --git a/tests/config/2/fail/type-float/size-exp-no.yaml b/tests/config/2/fail/type-float/size-exp-no.yaml
deleted file mode 100644 (file)
index f688daa..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: float
-                size:
-                  mant: 24
diff --git a/tests/config/2/fail/type-float/size-invalid-type.yaml b/tests/config/2/fail/type-float/size-invalid-type.yaml
deleted file mode 100644 (file)
index 91cc996..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: float
-                size: string
diff --git a/tests/config/2/fail/type-float/size-mant-no.yaml b/tests/config/2/fail/type-float/size-mant-no.yaml
deleted file mode 100644 (file)
index 753d7e0..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: float
-                size:
-                  exp: 8
diff --git a/tests/config/2/fail/type-float/size-no.yaml b/tests/config/2/fail/type-float/size-no.yaml
deleted file mode 100644 (file)
index 9f99c58..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: float
diff --git a/tests/config/2/fail/type-float/size-unknown-prop.yaml b/tests/config/2/fail/type-float/size-unknown-prop.yaml
deleted file mode 100644 (file)
index 9a9589c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: float
-                size:
-                  exp: 8
-                  mant: 24
-                  unknown: false
diff --git a/tests/config/2/fail/type-float/unknown-prop.yaml b/tests/config/2/fail/type-float/unknown-prop.yaml
deleted file mode 100644 (file)
index 9149ad2..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: float
-                size:
-                  exp: 8
-                  mant: 24
-                unknown: false
diff --git a/tests/config/2/fail/type-int/align-0.yaml b/tests/config/2/fail/type-int/align-0.yaml
deleted file mode 100644 (file)
index d32de2c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 32
-                align: 0
diff --git a/tests/config/2/fail/type-int/align-3.yaml b/tests/config/2/fail/type-int/align-3.yaml
deleted file mode 100644 (file)
index 26ac75e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 32
-                align: 3
diff --git a/tests/config/2/fail/type-int/align-invalid-type.yaml b/tests/config/2/fail/type-int/align-invalid-type.yaml
deleted file mode 100644 (file)
index 19cf4d4..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                align: string
diff --git a/tests/config/2/fail/type-int/base-invalid-type.yaml b/tests/config/2/fail/type-int/base-invalid-type.yaml
deleted file mode 100644 (file)
index 0068800..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-                base: 17.34
diff --git a/tests/config/2/fail/type-int/base-invalid.yaml b/tests/config/2/fail/type-int/base-invalid.yaml
deleted file mode 100644 (file)
index 01c097c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 32
-                base: inval
diff --git a/tests/config/2/fail/type-int/bo-invalid-type.yaml b/tests/config/2/fail/type-int/bo-invalid-type.yaml
deleted file mode 100644 (file)
index d54727b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                byte-order: 17.34
diff --git a/tests/config/2/fail/type-int/bo-invalid.yaml b/tests/config/2/fail/type-int/bo-invalid.yaml
deleted file mode 100644 (file)
index fd6945c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 32
-                byte-order: ze
diff --git a/tests/config/2/fail/type-int/fail.bats b/tests/config/2/fail/type-int/fail.bats
deleted file mode 100644 (file)
index fe0bbbe..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'unknown property in int type object makes barectf fail' {
-  barectf_config_check_fail unknown-prop.yaml
-}
-
-@test 'no "size" property in int type object makes barectf fail' {
-  barectf_config_check_fail size-no.yaml
-}
-
-@test 'wrong "size" property type in int type object makes barectf fail' {
-  barectf_config_check_fail size-invalid-type.yaml
-}
-
-@test 'invalid "size" property (0) in int type object makes barectf fail' {
-  barectf_config_check_fail size-0.yaml
-}
-
-@test 'invalid "size" property (65) in int type object makes barectf fail' {
-  barectf_config_check_fail size-65.yaml
-}
-
-@test 'wrong "signed" property type in int type object makes barectf fail' {
-  barectf_config_check_fail signed-invalid-type.yaml
-}
-
-@test 'wrong "align" property type in int type object makes barectf fail' {
-  barectf_config_check_fail align-invalid-type.yaml
-}
-
-@test 'invalid "align" property (0) in int type object makes barectf fail' {
-  barectf_config_check_fail align-0.yaml
-}
-
-@test 'invalid "align" property (3) in int type object makes barectf fail' {
-  barectf_config_check_fail align-3.yaml
-}
-
-@test 'wrong "base" property type in int type object makes barectf fail' {
-  barectf_config_check_fail base-invalid-type.yaml
-}
-
-@test 'invalid "base" property in int type object makes barectf fail' {
-  barectf_config_check_fail base-invalid.yaml
-}
-
-@test 'wrong "byte-order" property type in int type object makes barectf fail' {
-  barectf_config_check_fail bo-invalid-type.yaml
-}
-
-@test 'invalid "byte-order" property in int type object makes barectf fail' {
-  barectf_config_check_fail bo-invalid.yaml
-}
-
-@test 'wrong "property-mappings" property type in int type object makes barectf fail' {
-  barectf_config_check_fail pm-invalid-type.yaml
-}
-
-@test 'invalid "property-mappings" property in int type object makes barectf fail' {
-  barectf_config_check_fail pm-unknown-clock.yaml
-}
-
-@test 'invalid "property-mappings" property (invalid "type" property) in int type object makes barectf fail' {
-  barectf_config_check_fail pm-type-invalid.yaml
-}
-
-@test 'invalid "property-mappings" property (invalid "property" property) in int type object makes barectf fail' {
-  barectf_config_check_fail pm-property-invalid.yaml
-}
diff --git a/tests/config/2/fail/type-int/pm-invalid-type.yaml b/tests/config/2/fail/type-int/pm-invalid-type.yaml
deleted file mode 100644 (file)
index 676145a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                property-mappings: hello
diff --git a/tests/config/2/fail/type-int/pm-property-invalid.yaml b/tests/config/2/fail/type-int/pm-property-invalid.yaml
deleted file mode 100644 (file)
index edd828b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  clocks:
-    my_clock: {}
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-                property-mappings:
-                  - type: clock
-                    name: my_clock
-                    property: type
diff --git a/tests/config/2/fail/type-int/pm-type-invalid.yaml b/tests/config/2/fail/type-int/pm-type-invalid.yaml
deleted file mode 100644 (file)
index 3eda6f8..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  clocks:
-    my_clock: {}
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-                property-mappings:
-                  - type: stream
-                    name: zala
-                    property: value
diff --git a/tests/config/2/fail/type-int/pm-unknown-clock.yaml b/tests/config/2/fail/type-int/pm-unknown-clock.yaml
deleted file mode 100644 (file)
index 961c645..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  clocks:
-    my_clock: {}
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-                property-mappings:
-                  - type: clock
-                    name: zala
-                    property: value
diff --git a/tests/config/2/fail/type-int/signed-invalid-type.yaml b/tests/config/2/fail/type-int/signed-invalid-type.yaml
deleted file mode 100644 (file)
index 0877653..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                signed: string
diff --git a/tests/config/2/fail/type-int/size-0.yaml b/tests/config/2/fail/type-int/size-0.yaml
deleted file mode 100644 (file)
index b1e1da2..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 0
diff --git a/tests/config/2/fail/type-int/size-65.yaml b/tests/config/2/fail/type-int/size-65.yaml
deleted file mode 100644 (file)
index b8bbf41..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 65
-                align: 8
diff --git a/tests/config/2/fail/type-int/size-invalid-type.yaml b/tests/config/2/fail/type-int/size-invalid-type.yaml
deleted file mode 100644 (file)
index ebe09ec..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: string
diff --git a/tests/config/2/fail/type-int/size-no.yaml b/tests/config/2/fail/type-int/size-no.yaml
deleted file mode 100644 (file)
index a44afe4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
diff --git a/tests/config/2/fail/type-int/unknown-prop.yaml b/tests/config/2/fail/type-int/unknown-prop.yaml
deleted file mode 100644 (file)
index f48a297..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-                unknown: false
diff --git a/tests/config/2/fail/type-string/fail.bats b/tests/config/2/fail/type-string/fail.bats
deleted file mode 100644 (file)
index 5936c52..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'unknown property in string type object makes barectf fail' {
-  barectf_config_check_fail unknown-prop.yaml
-}
diff --git a/tests/config/2/fail/type-string/unknown-prop.yaml b/tests/config/2/fail/type-string/unknown-prop.yaml
deleted file mode 100644 (file)
index 19443c5..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: string
-                unknown: false
diff --git a/tests/config/2/fail/type-struct/fail.bats b/tests/config/2/fail/type-struct/fail.bats
deleted file mode 100644 (file)
index 175a1dd..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'unknown property in struct type object makes barectf fail' {
-  barectf_config_check_fail unknown-prop.yaml
-}
-
-@test 'wrong "fields" property type in struct type object makes barectf fail' {
-  barectf_config_check_fail fields-invalid-type.yaml
-}
-
-@test 'invalid field in "fields" property (invalid C identifier) in struct type object makes barectf fail' {
-  barectf_config_check_fail fields-field-invalid-identifier.yaml
-}
-
-@test 'wrong "min-align" property type in struct type object makes barectf fail' {
-  barectf_config_check_fail ma-invalid-type.yaml
-}
-
-@test 'invalid "min-align" property (0) in struct type object makes barectf fail' {
-  barectf_config_check_fail ma-0.yaml
-}
-
-@test 'invalid "min-align" property (3) in struct type object makes barectf fail' {
-  barectf_config_check_fail ma-3.yaml
-}
diff --git a/tests/config/2/fail/type-struct/fields-field-invalid-identifier.yaml b/tests/config/2/fail/type-struct/fields-field-invalid-identifier.yaml
deleted file mode 100644 (file)
index 8403de9..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              'a field':
-                class: int
-                size: 1
diff --git a/tests/config/2/fail/type-struct/fields-invalid-type.yaml b/tests/config/2/fail/type-struct/fields-invalid-type.yaml
deleted file mode 100644 (file)
index 73972f3..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields: 23
diff --git a/tests/config/2/fail/type-struct/ma-0.yaml b/tests/config/2/fail/type-struct/ma-0.yaml
deleted file mode 100644 (file)
index f84974a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            min-align: 0
diff --git a/tests/config/2/fail/type-struct/ma-3.yaml b/tests/config/2/fail/type-struct/ma-3.yaml
deleted file mode 100644 (file)
index a1af2f7..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            min-align: 3
diff --git a/tests/config/2/fail/type-struct/ma-invalid-type.yaml b/tests/config/2/fail/type-struct/ma-invalid-type.yaml
deleted file mode 100644 (file)
index edfd5e9..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            min-align: yes
diff --git a/tests/config/2/fail/type-struct/unknown-prop.yaml b/tests/config/2/fail/type-struct/unknown-prop.yaml
deleted file mode 100644 (file)
index f89d813..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            unknown: true
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/type/fail.bats b/tests/config/2/fail/type/fail.bats
deleted file mode 100644 (file)
index 36151cb..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'type inheriting an unknown type alias makes barectf fail' {
-  barectf_config_check_fail inherit-unknown.yaml
-}
-
-@test 'type inheriting a type alias defined after makes barectf fail' {
-  barectf_config_check_fail inherit-forward.yaml
-}
-
-@test 'wrong type property type makes barectf fail' {
-  barectf_config_check_fail invalid-type.yaml
-}
-
-@test 'no "class" property in type object makes barectf fail' {
-  barectf_config_check_fail no-class.yaml
-}
diff --git a/tests/config/2/fail/type/inherit-forward.yaml b/tests/config/2/fail/type/inherit-forward.yaml
deleted file mode 100644 (file)
index 241ad64..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      $inherit: meow
-      size: 16
-    meow:
-      class: int
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/type/inherit-unknown.yaml b/tests/config/2/fail/type/inherit-unknown.yaml
deleted file mode 100644 (file)
index 06aeaea..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      $inherit: unknown
-      size: 16
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/type/invalid-type.yaml b/tests/config/2/fail/type/invalid-type.yaml
deleted file mode 100644 (file)
index 63208f3..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    an-int: 23
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/fail/type/no-class.yaml b/tests/config/2/fail/type/no-class.yaml
deleted file mode 100644 (file)
index 2b3a63b..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  trace:
-    byte-order: le
-  streams:
-    my_stream:
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                size: 8
diff --git a/tests/config/2/fail/yaml/fail.bats b/tests/config/2/fail/yaml/fail.bats
deleted file mode 100644 (file)
index bf9559c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'invalid YAML input makes barectf fail' {
-  barectf_config_check_fail invalid.yaml
-}
diff --git a/tests/config/2/fail/yaml/invalid.yaml b/tests/config/2/fail/yaml/invalid.yaml
deleted file mode 100644 (file)
index d3804b9..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.1'
-metadata:
-  type-aliases:
-    uint16:
-      class: int
-      size: 16
-  trace:
-    byte-order:
-      le: -23
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
diff --git a/tests/config/2/pass/everything/config.yaml b/tests/config/2/pass/everything/config.yaml
deleted file mode 100644 (file)
index eb99189..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-version: '2.2'
-prefix: bctf_
-options:
-  gen-prefix-def: true
-  gen-default-stream-def: true
-metadata:
-  $include:
-    - inc-metadata.yaml
-    - stdmisc.yaml
-    - lttng-ust-log-levels.yaml
-  type-aliases:
-    my-clock-int:
-      $inherit: uint32
-      property-mappings:
-        - type: clock
-          name: some_clock
-          property: value
-    my-special-int:
-      size: 19
-      base: hex
-  $log-levels:
-    couch: 0755
-  trace:
-    $include: inc-trace.yaml
-    byte-order: be
-  clocks:
-    some_clock:
-      $include: inc-clock.yaml
-      description: this is my favorite clock
-      offset:
-        cycles: 91827439187
-      absolute: null
-  streams:
-    my_stream:
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint16
-          content_size: uint16
-          timestamp_begin: my-clock-int
-          timestamp_end: my-clock-int
-      events:
-        my_event:
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-    my_other_stream:
-      $include: inc-stream.yaml
-      packet-context-type:
-        class: struct
-        fields:
-          packet_size: uint32
-          content_size: uint32
-          events_discarded: uint16
-      event-header-type:
-        class: struct
-        fields:
-          id: uint8
-          timestamp: my-clock-int
-      events:
-        my_event:
-          $include: inc-event.yaml
-          context-type: null
-          payload-type:
-            class: struct
-            fields:
-              my_field:
-                class: int
-                size: 8
-        oh_henry_event:
-          payload-type:
-            class: struct
-            fields:
-              s1: string
-              s2: string
-              s3: string
-              s4: string
diff --git a/tests/config/2/pass/everything/inc-clock.yaml b/tests/config/2/pass/everything/inc-clock.yaml
deleted file mode 100644 (file)
index dd6fdec..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-freq: 123456789
-offset:
-  seconds: 18
-absolute: true
-$return-ctype: unsigned long
diff --git a/tests/config/2/pass/everything/inc-event.yaml b/tests/config/2/pass/everything/inc-event.yaml
deleted file mode 100644 (file)
index 5c77118..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-log-level: WARNING
-context-type:
-  class: struct
-  fields:
-    fff: float
diff --git a/tests/config/2/pass/everything/inc-metadata.yaml b/tests/config/2/pass/everything/inc-metadata.yaml
deleted file mode 100644 (file)
index 83e0b7d..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-$include:
-  - stdint.yaml
-  - stdfloat.yaml
-type-aliases:
-  my-special-int:
-    class: int
-    size: 23
-    align: 2
-  struct32:
-    class: struct
-    min-align: 32
-  def-payload-type:
-    $inherit: struct32
-    fields:
-      haha: float
-      hihi: uint32
-      huhu: uint16
-      hoho: double
-streams:
-  my_other_stream:
-    events:
-      this_event:
-        payload-type:
-          class: struct
-          fields:
-            special: my-special-int
-            more_special:
-              $inherit: my-special-int
-              align: 32
-$log-levels:
-  couch: 23
-  tv: 199
-  thread: 0x28aff
-env:
-  salut: lol
-  meow: mix
diff --git a/tests/config/2/pass/everything/inc-stream.yaml b/tests/config/2/pass/everything/inc-stream.yaml
deleted file mode 100644 (file)
index 56def30..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-event-context-type:
-  class: struct
-  fields:
-    i: int32
-    f: float
-    d: double
-    s: string
-    m: ctf-magic
-events:
-  evev:
-    payload-type: def-payload-type
-  context_no_payload:
-    context-type:
-      class: struct
-      fields:
-        str: string
-  no_context_no_payload: {}
diff --git a/tests/config/2/pass/everything/inc-trace.yaml b/tests/config/2/pass/everything/inc-trace.yaml
deleted file mode 100644 (file)
index d771be8..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-$include: trace-basic.yaml
-packet-header-type:
-  fields:
-    soy_sauce: uint64
diff --git a/tests/config/2/pass/everything/pass.bats b/tests/config/2/pass/everything/pass.bats
deleted file mode 100644 (file)
index a46bad4..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env bats
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-load ../../../common
-
-@test 'config file using all features makes barectf pass' {
-  barectf_config_check_success config.yaml
-  pushd "$BATS_TEST_DIRNAME" >/dev/null
-  [ -f metadata ]
-  [ -f bctf.c ]
-  [ -f bctf.h ]
-  [ -f bctf-bitfield.h ]
-
-  # test should be more extensive than that, but it's a start
-  "$CC" -c bctf.c
-  nm bctf.o | grep bctf_init
-  nm bctf.o | grep bctf_my_other_stream_close_packet
-  nm bctf.o | grep bctf_my_other_stream_open_packet
-  nm bctf.o | grep bctf_my_other_stream_trace_context_no_payload
-  nm bctf.o | grep bctf_my_other_stream_trace_evev
-  nm bctf.o | grep bctf_my_other_stream_trace_my_event
-  nm bctf.o | grep bctf_my_other_stream_trace_no_context_no_payload
-  nm bctf.o | grep bctf_my_other_stream_trace_oh_henry_event
-  nm bctf.o | grep bctf_my_other_stream_trace_this_event
-  nm bctf.o | grep bctf_my_stream_close_packet
-  nm bctf.o | grep bctf_my_stream_open_packet
-  nm bctf.o | grep bctf_my_stream_trace_my_event
-  nm bctf.o | grep bctf_packet_buf
-  nm bctf.o | grep bctf_packet_buf_size
-  nm bctf.o | grep bctf_packet_events_discarded
-  nm bctf.o | grep bctf_packet_is_empty
-  nm bctf.o | grep bctf_packet_is_full
-  nm bctf.o | grep bctf_packet_is_open
-  nm bctf.o | grep bctf_packet_set_buf
-  nm bctf.o | grep bctf_packet_size
-  popd
-}
diff --git a/tests/config/common.bash b/tests/config/common.bash
deleted file mode 100644 (file)
index 54e82af..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-barectf_assert_file_exists() {
-  if [ ! -f "$1" ]; then
-    echo "FATAL: "$1" does not exist" 1>&2
-    return 1
-  fi
-
-  if ! which barectf > /dev/null; then
-    echo "FATAL: cannot find barectf tool" 1>&2
-    return 1
-  fi
-}
-
-barectf_config_check_success() {
-  pushd "$BATS_TEST_DIRNAME" >/dev/null
-
-  if ! barectf_assert_file_exists "$1"; then
-    popd >/dev/null
-    return 1
-  fi
-
-  run barectf "$1"
-  popd >/dev/null
-
-  if [ "$status" -ne 0 ]; then
-    echo "Fail: exit code is $status" 1>&2
-    return 1
-  fi
-}
-
-barectf_config_check_fail() {
-  pushd "$BATS_TEST_DIRNAME" >/dev/null
-
-  if ! barectf_assert_file_exists "$1"; then
-    popd >/dev/null
-    return 1
-  fi
-
-  run barectf "$1"
-
-  if [[ $output != *'Cannot create configuration'* ]]; then
-    echo "Fail: barectf does not print a configuration error" 1>&2
-    echo "Output:" 1>&2
-    echo "$output" 1>&2
-    popd >/dev/null
-    return 1
-  fi
-
-  if [ "$status" -eq 0 ]; then
-    echo "Fail: exit code is 0" 1>&2
-    popd >/dev/null
-    return 1
-  fi
-
-  local find_output="$(find -iname '*.c' -o -iname '*.h' -o -iname metadata)"
-  popd >/dev/null
-
-  if [ -n "$find_output" ]; then
-    echo "Fail: barectf generated files" 1>&2
-    return 1
-  fi
-}
-
-setup() {
-  :
-}
-
-teardown() {
-  rm -f *ctf.c *ctf.h *ctf.o *ctf-bitfield.h metadata
-}
diff --git a/tests/config/yaml/2/configs/fail/clock/absolute-invalid-type.yaml b/tests/config/yaml/2/configs/fail/clock/absolute-invalid-type.yaml
new file mode 100644 (file)
index 0000000..50320f8
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      absolute: []
diff --git a/tests/config/yaml/2/configs/fail/clock/description-invalid-type.yaml b/tests/config/yaml/2/configs/fail/clock/description-invalid-type.yaml
new file mode 100644 (file)
index 0000000..6fd8990
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      description: 23
diff --git a/tests/config/yaml/2/configs/fail/clock/ec-invalid-type.yaml b/tests/config/yaml/2/configs/fail/clock/ec-invalid-type.yaml
new file mode 100644 (file)
index 0000000..ac46af9
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      error-cycles: string
diff --git a/tests/config/yaml/2/configs/fail/clock/ec-invalid.yaml b/tests/config/yaml/2/configs/fail/clock/ec-invalid.yaml
new file mode 100644 (file)
index 0000000..04bfd08
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      error-cycles: -17
diff --git a/tests/config/yaml/2/configs/fail/clock/freq-0.yaml b/tests/config/yaml/2/configs/fail/clock/freq-0.yaml
new file mode 100644 (file)
index 0000000..22ff073
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      freq: 0
diff --git a/tests/config/yaml/2/configs/fail/clock/freq-invalid-type.yaml b/tests/config/yaml/2/configs/fail/clock/freq-invalid-type.yaml
new file mode 100644 (file)
index 0000000..63255af
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      freq: string
diff --git a/tests/config/yaml/2/configs/fail/clock/freq-neg.yaml b/tests/config/yaml/2/configs/fail/clock/freq-neg.yaml
new file mode 100644 (file)
index 0000000..f2f0f70
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      freq: -12
diff --git a/tests/config/yaml/2/configs/fail/clock/offset-cycles-invalid-type.yaml b/tests/config/yaml/2/configs/fail/clock/offset-cycles-invalid-type.yaml
new file mode 100644 (file)
index 0000000..88fa94f
--- /dev/null
@@ -0,0 +1,49 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      offset:
+        cycles: string
diff --git a/tests/config/yaml/2/configs/fail/clock/offset-cycles-neg.yaml b/tests/config/yaml/2/configs/fail/clock/offset-cycles-neg.yaml
new file mode 100644 (file)
index 0000000..7631d69
--- /dev/null
@@ -0,0 +1,49 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      offset:
+        cycles: -17
diff --git a/tests/config/yaml/2/configs/fail/clock/offset-invalid-type.yaml b/tests/config/yaml/2/configs/fail/clock/offset-invalid-type.yaml
new file mode 100644 (file)
index 0000000..24dff48
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      offset: 23
diff --git a/tests/config/yaml/2/configs/fail/clock/offset-seconds-invalid-type.yaml b/tests/config/yaml/2/configs/fail/clock/offset-seconds-invalid-type.yaml
new file mode 100644 (file)
index 0000000..807ef40
--- /dev/null
@@ -0,0 +1,49 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      offset:
+        seconds: string
diff --git a/tests/config/yaml/2/configs/fail/clock/offset-seconds-neg.yaml b/tests/config/yaml/2/configs/fail/clock/offset-seconds-neg.yaml
new file mode 100644 (file)
index 0000000..1a90977
--- /dev/null
@@ -0,0 +1,49 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      offset:
+        seconds: -17
diff --git a/tests/config/yaml/2/configs/fail/clock/offset-unknown-prop.yaml b/tests/config/yaml/2/configs/fail/clock/offset-unknown-prop.yaml
new file mode 100644 (file)
index 0000000..34bbc3e
--- /dev/null
@@ -0,0 +1,49 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      offset:
+        unknown: false
diff --git a/tests/config/yaml/2/configs/fail/clock/rct-invalid-type.yaml b/tests/config/yaml/2/configs/fail/clock/rct-invalid-type.yaml
new file mode 100644 (file)
index 0000000..cc8a909
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      $return-ctype: 23
diff --git a/tests/config/yaml/2/configs/fail/clock/unknown-prop.yaml b/tests/config/yaml/2/configs/fail/clock/unknown-prop.yaml
new file mode 100644 (file)
index 0000000..d866485
--- /dev/null
@@ -0,0 +1,49 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      freq: 1000
+      unknown: false
diff --git a/tests/config/yaml/2/configs/fail/clock/uuid-invalid-type.yaml b/tests/config/yaml/2/configs/fail/clock/uuid-invalid-type.yaml
new file mode 100644 (file)
index 0000000..8eb0e66
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      uuid: -17
diff --git a/tests/config/yaml/2/configs/fail/clock/uuid-invalid.yaml b/tests/config/yaml/2/configs/fail/clock/uuid-invalid.yaml
new file mode 100644 (file)
index 0000000..2371ea1
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    my_clock:
+      uuid: zoom
diff --git a/tests/config/yaml/2/configs/fail/config/metadata-invalid-type.yaml b/tests/config/yaml/2/configs/fail/config/metadata-invalid-type.yaml
new file mode 100644 (file)
index 0000000..3291d6f
--- /dev/null
@@ -0,0 +1,25 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata: 23
+
diff --git a/tests/config/yaml/2/configs/fail/config/metadata-no.yaml b/tests/config/yaml/2/configs/fail/config/metadata-no.yaml
new file mode 100644 (file)
index 0000000..aba76ba
--- /dev/null
@@ -0,0 +1,23 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
diff --git a/tests/config/yaml/2/configs/fail/config/options-gen-default-stream-def-invalid-type.yaml b/tests/config/yaml/2/configs/fail/config/options-gen-default-stream-def-invalid-type.yaml
new file mode 100644 (file)
index 0000000..bfb36d2
--- /dev/null
@@ -0,0 +1,47 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.2'
+options:
+  gen-default-stream-def: 23
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/config/options-gen-prefix-def-invalid-type.yaml b/tests/config/yaml/2/configs/fail/config/options-gen-prefix-def-invalid-type.yaml
new file mode 100644 (file)
index 0000000..74a2bc4
--- /dev/null
@@ -0,0 +1,47 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.2'
+options:
+  gen-prefix-def: do it
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/config/options-invalid-type.yaml b/tests/config/yaml/2/configs/fail/config/options-invalid-type.yaml
new file mode 100644 (file)
index 0000000..921ec49
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.2'
+options: false
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/config/options-unknown-prop.yaml b/tests/config/yaml/2/configs/fail/config/options-unknown-prop.yaml
new file mode 100644 (file)
index 0000000..6327229
--- /dev/null
@@ -0,0 +1,47 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.2'
+options:
+  meow: mix
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/config/prefix-invalid-identifier.yaml b/tests/config/yaml/2/configs/fail/config/prefix-invalid-identifier.yaml
new file mode 100644 (file)
index 0000000..1ae048c
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+prefix: 'some prefix'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/config/prefix-invalid-type.yaml b/tests/config/yaml/2/configs/fail/config/prefix-invalid-type.yaml
new file mode 100644 (file)
index 0000000..2960934
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+prefix: -21
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/config/unknown-prop.yaml b/tests/config/yaml/2/configs/fail/config/unknown-prop.yaml
new file mode 100644 (file)
index 0000000..b8b6f9e
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+unknown: false
diff --git a/tests/config/yaml/2/configs/fail/config/version-invalid-19.yaml b/tests/config/yaml/2/configs/fail/config/version-invalid-19.yaml
new file mode 100644 (file)
index 0000000..ceccd5c
--- /dev/null
@@ -0,0 +1,45 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '1.9'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/config/version-invalid-23.yaml b/tests/config/yaml/2/configs/fail/config/version-invalid-23.yaml
new file mode 100644 (file)
index 0000000..cf73d04
--- /dev/null
@@ -0,0 +1,45 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.3'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/config/version-invalid-type.yaml b/tests/config/yaml/2/configs/fail/config/version-invalid-type.yaml
new file mode 100644 (file)
index 0000000..a28f748
--- /dev/null
@@ -0,0 +1,45 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: 2.1
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/config/version-no.yaml b/tests/config/yaml/2/configs/fail/config/version-no.yaml
new file mode 100644 (file)
index 0000000..d8e23a6
--- /dev/null
@@ -0,0 +1,44 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/event/ct-invalid-type.yaml b/tests/config/yaml/2/configs/fail/event/ct-invalid-type.yaml
new file mode 100644 (file)
index 0000000..b696056
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          context-type: 23
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/event/ct-not-struct.yaml b/tests/config/yaml/2/configs/fail/event/ct-not-struct.yaml
new file mode 100644 (file)
index 0000000..c1991d0
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          context-type:
+            class: int
+            size: 8
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/event/ll-invalid-type.yaml b/tests/config/yaml/2/configs/fail/event/ll-invalid-type.yaml
new file mode 100644 (file)
index 0000000..a9fef25
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          log-level: true
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/event/ll-non-existing.yaml b/tests/config/yaml/2/configs/fail/event/ll-non-existing.yaml
new file mode 100644 (file)
index 0000000..b2c23d3
--- /dev/null
@@ -0,0 +1,49 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  $log-levels:
+    EMERG: 0
+    WARNING: 23
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          log-level: EME
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/event/no-fields-at-all.yaml b/tests/config/yaml/2/configs/fail/event/no-fields-at-all.yaml
new file mode 100644 (file)
index 0000000..3a08827
--- /dev/null
@@ -0,0 +1,39 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event: {}
diff --git a/tests/config/yaml/2/configs/fail/event/pt-invalid-type.yaml b/tests/config/yaml/2/configs/fail/event/pt-invalid-type.yaml
new file mode 100644 (file)
index 0000000..6cbaba4
--- /dev/null
@@ -0,0 +1,40 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type: -17
diff --git a/tests/config/yaml/2/configs/fail/event/pt-not-struct.yaml b/tests/config/yaml/2/configs/fail/event/pt-not-struct.yaml
new file mode 100644 (file)
index 0000000..c1afa5a
--- /dev/null
@@ -0,0 +1,43 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: int
+            size: 8
+
diff --git a/tests/config/yaml/2/configs/fail/event/unknown-prop.yaml b/tests/config/yaml/2/configs/fail/event/unknown-prop.yaml
new file mode 100644 (file)
index 0000000..209f096
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          unknown: false
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/include/cycle.yaml b/tests/config/yaml/2/configs/fail/include/cycle.yaml
new file mode 100644 (file)
index 0000000..b6d3f6f
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  $include: inc-recursive1.yaml
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/include/file-not-found-abs.yaml b/tests/config/yaml/2/configs/fail/include/file-not-found-abs.yaml
new file mode 100644 (file)
index 0000000..691fffa
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  $include: /path/to/not/found
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/include/file-not-found-in-array.yaml b/tests/config/yaml/2/configs/fail/include/file-not-found-in-array.yaml
new file mode 100644 (file)
index 0000000..eb91fa9
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  $include:
+    - inc-empty.yaml
+    - yes.yaml
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/include/file-not-found-recursive.yaml b/tests/config/yaml/2/configs/fail/include/file-not-found-recursive.yaml
new file mode 100644 (file)
index 0000000..2ce1212
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  $include: inc-inc-not-found.yaml
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/include/file-not-found.yaml b/tests/config/yaml/2/configs/fail/include/file-not-found.yaml
new file mode 100644 (file)
index 0000000..b801533
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  $include: yes.yaml
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/include/inc-empty.yaml b/tests/config/yaml/2/configs/fail/include/inc-empty.yaml
new file mode 100644 (file)
index 0000000..7d717c4
--- /dev/null
@@ -0,0 +1,23 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+{}
diff --git a/tests/config/yaml/2/configs/fail/include/inc-inc-not-found.yaml b/tests/config/yaml/2/configs/fail/include/inc-inc-not-found.yaml
new file mode 100644 (file)
index 0000000..1310824
--- /dev/null
@@ -0,0 +1,23 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+$include: yes.yaml
diff --git a/tests/config/yaml/2/configs/fail/include/inc-recursive-sym1.yaml b/tests/config/yaml/2/configs/fail/include/inc-recursive-sym1.yaml
new file mode 100644 (file)
index 0000000..31301d2
--- /dev/null
@@ -0,0 +1,23 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+$include: inc-recursive-sym2.yaml
diff --git a/tests/config/yaml/2/configs/fail/include/inc-recursive-sym2.yaml b/tests/config/yaml/2/configs/fail/include/inc-recursive-sym2.yaml
new file mode 100644 (file)
index 0000000..c024779
--- /dev/null
@@ -0,0 +1,23 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+$include: inc-recursive-sym3.yaml
diff --git a/tests/config/yaml/2/configs/fail/include/inc-recursive1.yaml b/tests/config/yaml/2/configs/fail/include/inc-recursive1.yaml
new file mode 100644 (file)
index 0000000..f23e504
--- /dev/null
@@ -0,0 +1,23 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+$include: inc-recursive2.yaml
diff --git a/tests/config/yaml/2/configs/fail/include/inc-recursive2.yaml b/tests/config/yaml/2/configs/fail/include/inc-recursive2.yaml
new file mode 100644 (file)
index 0000000..cd29ed0
--- /dev/null
@@ -0,0 +1,23 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+$include: inc-recursive3.yaml
diff --git a/tests/config/yaml/2/configs/fail/include/inc-recursive3.yaml b/tests/config/yaml/2/configs/fail/include/inc-recursive3.yaml
new file mode 100644 (file)
index 0000000..1f92c70
--- /dev/null
@@ -0,0 +1,23 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+$include: inc-recursive1.yaml
diff --git a/tests/config/yaml/2/configs/fail/include/include-include-replace.yaml b/tests/config/yaml/2/configs/fail/include/include-include-replace.yaml
new file mode 100644 (file)
index 0000000..8acb978
--- /dev/null
@@ -0,0 +1,47 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  $include: inc-empty.yaml
+  $include-replace: inc-empty.yaml
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/include/invalid-type.yaml b/tests/config/yaml/2/configs/fail/include/invalid-type.yaml
new file mode 100644 (file)
index 0000000..155bf7b
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  $include: 23
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/include/replace-file-not-found-in-array.yaml b/tests/config/yaml/2/configs/fail/include/replace-file-not-found-in-array.yaml
new file mode 100644 (file)
index 0000000..caefd2b
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  $include-replace:
+    - inc-empty.yaml
+    - yes.yaml
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/include/replace-file-not-found.yaml b/tests/config/yaml/2/configs/fail/include/replace-file-not-found.yaml
new file mode 100644 (file)
index 0000000..c6e64eb
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  $include-replace: yes.yaml
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/metadata/clocks-invalid-type.yaml b/tests/config/yaml/2/configs/fail/metadata/clocks-invalid-type.yaml
new file mode 100644 (file)
index 0000000..ef897e1
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks: 23
diff --git a/tests/config/yaml/2/configs/fail/metadata/clocks-key-invalid-identifier.yaml b/tests/config/yaml/2/configs/fail/metadata/clocks-key-invalid-identifier.yaml
new file mode 100644 (file)
index 0000000..1a33087
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  clocks:
+    'some clock':
+      freq: 1000
diff --git a/tests/config/yaml/2/configs/fail/metadata/default-stream-invalid-type.yaml b/tests/config/yaml/2/configs/fail/metadata/default-stream-invalid-type.yaml
new file mode 100644 (file)
index 0000000..d009ab9
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.2'
+metadata:
+  $default-stream: 23
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/metadata/default-stream-stream-default-duplicate.yaml b/tests/config/yaml/2/configs/fail/metadata/default-stream-stream-default-duplicate.yaml
new file mode 100644 (file)
index 0000000..c992213
--- /dev/null
@@ -0,0 +1,61 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.2'
+metadata:
+  $default-stream: my_stream
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+    other_stream:
+      $default: true
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/metadata/default-stream-unknown-stream.yaml b/tests/config/yaml/2/configs/fail/metadata/default-stream-unknown-stream.yaml
new file mode 100644 (file)
index 0000000..2ccec89
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.2'
+metadata:
+  $default-stream: some_stream
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/metadata/env-invalid-type.yaml b/tests/config/yaml/2/configs/fail/metadata/env-invalid-type.yaml
new file mode 100644 (file)
index 0000000..1886d02
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  env: 17
diff --git a/tests/config/yaml/2/configs/fail/metadata/env-key-invalid-identifier.yaml b/tests/config/yaml/2/configs/fail/metadata/env-key-invalid-identifier.yaml
new file mode 100644 (file)
index 0000000..24027df
--- /dev/null
@@ -0,0 +1,47 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  env:
+    'yes sir miller': bug
diff --git a/tests/config/yaml/2/configs/fail/metadata/env-value-invalid-type.yaml b/tests/config/yaml/2/configs/fail/metadata/env-value-invalid-type.yaml
new file mode 100644 (file)
index 0000000..1daeade
--- /dev/null
@@ -0,0 +1,49 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  env:
+    yes-sir-miller:
+      - a
+      - b
diff --git a/tests/config/yaml/2/configs/fail/metadata/ll-invalid-type.yaml b/tests/config/yaml/2/configs/fail/metadata/ll-invalid-type.yaml
new file mode 100644 (file)
index 0000000..cda3e9f
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  $log-levels: hello
diff --git a/tests/config/yaml/2/configs/fail/metadata/ll-value-invalid-type.yaml b/tests/config/yaml/2/configs/fail/metadata/ll-value-invalid-type.yaml
new file mode 100644 (file)
index 0000000..d9dce3c
--- /dev/null
@@ -0,0 +1,47 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  $log-levels:
+    'yes sir miller': meow
diff --git a/tests/config/yaml/2/configs/fail/metadata/multiple-streams-trace-ph-no-stream-id.yaml b/tests/config/yaml/2/configs/fail/metadata/multiple-streams-trace-ph-no-stream-id.yaml
new file mode 100644 (file)
index 0000000..71d7469
--- /dev/null
@@ -0,0 +1,54 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  $include:
+    - stdint.yaml
+    - stdmisc.yaml
+  type-aliases:
+    pct:
+      class: struct
+      fields:
+        packet_size: uint32
+        content_size: uint32
+    pt:
+      class: struct
+      fields:
+        a: uint32
+  trace:
+    byte-order: le
+    packet-header-type:
+      class: struct
+      fields:
+        magic: ctf-magic
+  streams:
+    s1:
+      packet-context-type: pct
+      events:
+        ev1:
+          payload-type: pt
+    s2:
+      packet-context-type: pct
+      events:
+        ev2:
+          payload-type: pt
diff --git a/tests/config/yaml/2/configs/fail/metadata/streams-empty.yaml b/tests/config/yaml/2/configs/fail/metadata/streams-empty.yaml
new file mode 100644 (file)
index 0000000..a911f0e
--- /dev/null
@@ -0,0 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams: {}
diff --git a/tests/config/yaml/2/configs/fail/metadata/streams-invalid-type.yaml b/tests/config/yaml/2/configs/fail/metadata/streams-invalid-type.yaml
new file mode 100644 (file)
index 0000000..76391ab
--- /dev/null
@@ -0,0 +1,31 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams: -17
diff --git a/tests/config/yaml/2/configs/fail/metadata/streams-key-invalid-identifier.yaml b/tests/config/yaml/2/configs/fail/metadata/streams-key-invalid-identifier.yaml
new file mode 100644 (file)
index 0000000..4ca8111
--- /dev/null
@@ -0,0 +1,45 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    'some stream':
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/metadata/streams-no.yaml b/tests/config/yaml/2/configs/fail/metadata/streams-no.yaml
new file mode 100644 (file)
index 0000000..32894b4
--- /dev/null
@@ -0,0 +1,26 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
diff --git a/tests/config/yaml/2/configs/fail/metadata/ta-invalid-type.yaml b/tests/config/yaml/2/configs/fail/metadata/ta-invalid-type.yaml
new file mode 100644 (file)
index 0000000..888210d
--- /dev/null
@@ -0,0 +1,45 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    - uint16:
+        class: int
+        size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/metadata/trace-empty.yaml b/tests/config/yaml/2/configs/fail/metadata/trace-empty.yaml
new file mode 100644 (file)
index 0000000..359c74f
--- /dev/null
@@ -0,0 +1,44 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace: {}
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/metadata/trace-invalid-type.yaml b/tests/config/yaml/2/configs/fail/metadata/trace-invalid-type.yaml
new file mode 100644 (file)
index 0000000..3f39bc5
--- /dev/null
@@ -0,0 +1,44 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace: switch
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/metadata/trace-no.yaml b/tests/config/yaml/2/configs/fail/metadata/trace-no.yaml
new file mode 100644 (file)
index 0000000..060b39b
--- /dev/null
@@ -0,0 +1,39 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/metadata/unknown-prop.yaml b/tests/config/yaml/2/configs/fail/metadata/unknown-prop.yaml
new file mode 100644 (file)
index 0000000..5ad61d3
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+  unknown: false
diff --git a/tests/config/yaml/2/configs/fail/stream/default-invalid-type.yaml b/tests/config/yaml/2/configs/fail/stream/default-invalid-type.yaml
new file mode 100644 (file)
index 0000000..908eb79
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.2'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      $default: 23
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/ect-invalid-type.yaml b/tests/config/yaml/2/configs/fail/stream/ect-invalid-type.yaml
new file mode 100644 (file)
index 0000000..b56c582
--- /dev/null
@@ -0,0 +1,41 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      event-context-type: 23
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/ect-not-struct.yaml b/tests/config/yaml/2/configs/fail/stream/ect-not-struct.yaml
new file mode 100644 (file)
index 0000000..4a9bbe9
--- /dev/null
@@ -0,0 +1,42 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      event-context-type:
+        class: string
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/eht-id-no-multiple-events.yaml b/tests/config/yaml/2/configs/fail/stream/eht-id-no-multiple-events.yaml
new file mode 100644 (file)
index 0000000..cb7ced7
--- /dev/null
@@ -0,0 +1,54 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+        my_other_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/eht-id-not-int.yaml b/tests/config/yaml/2/configs/fail/stream/eht-id-not-int.yaml
new file mode 100644 (file)
index 0000000..1eeb868
--- /dev/null
@@ -0,0 +1,52 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+      event-header-type:
+        class: struct
+        fields:
+          id:
+            class: string
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/eht-id-too-small.yaml b/tests/config/yaml/2/configs/fail/stream/eht-id-too-small.yaml
new file mode 100644 (file)
index 0000000..a3a4b11
--- /dev/null
@@ -0,0 +1,72 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+      event-header-type:
+        class: struct
+        min-align: 8
+        fields:
+          id:
+            class: int
+            size: 2
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field: uint16
+        my_event2:
+          payload-type:
+            class: struct
+            fields:
+              my_field: uint16
+        my_event3:
+          payload-type:
+            class: struct
+            fields:
+              my_field: uint16
+        my_event4:
+          payload-type:
+            class: struct
+            fields:
+              my_field: uint16
+        my_event5:
+          payload-type:
+            class: struct
+            fields:
+              my_field: uint16
diff --git a/tests/config/yaml/2/configs/fail/stream/eht-id-wrong-signed.yaml b/tests/config/yaml/2/configs/fail/stream/eht-id-wrong-signed.yaml
new file mode 100644 (file)
index 0000000..9485bd2
--- /dev/null
@@ -0,0 +1,54 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+      event-header-type:
+        class: struct
+        fields:
+          id:
+            class: int
+            size: 16
+            signed: true
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/eht-invalid-type.yaml b/tests/config/yaml/2/configs/fail/stream/eht-invalid-type.yaml
new file mode 100644 (file)
index 0000000..765c67e
--- /dev/null
@@ -0,0 +1,41 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      event-header-type: 23
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/eht-not-struct.yaml b/tests/config/yaml/2/configs/fail/stream/eht-not-struct.yaml
new file mode 100644 (file)
index 0000000..048f62e
--- /dev/null
@@ -0,0 +1,42 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      event-header-type:
+        class: string
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/eht-timestamp-not-int.yaml b/tests/config/yaml/2/configs/fail/stream/eht-timestamp-not-int.yaml
new file mode 100644 (file)
index 0000000..39a07ac
--- /dev/null
@@ -0,0 +1,52 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+      event-header-type:
+        class: struct
+        fields:
+          timestamp:
+            class: string
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/eht-timestamp-wrong-pm.yaml b/tests/config/yaml/2/configs/fail/stream/eht-timestamp-wrong-pm.yaml
new file mode 100644 (file)
index 0000000..064eafe
--- /dev/null
@@ -0,0 +1,53 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+      event-header-type:
+        class: struct
+        fields:
+          timestamp:
+            class: int
+            size: 16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/eht-timestamp-wrong-signed.yaml b/tests/config/yaml/2/configs/fail/stream/eht-timestamp-wrong-signed.yaml
new file mode 100644 (file)
index 0000000..2e65575
--- /dev/null
@@ -0,0 +1,58 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+      event-header-type:
+        class: struct
+        fields:
+          timestamp:
+            class: int
+            size: 16
+            signed: true
+            property-mappings:
+              - type: clock
+                name: my_clock
+                property: value
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/events-empty.yaml b/tests/config/yaml/2/configs/fail/stream/events-empty.yaml
new file mode 100644 (file)
index 0000000..b100d92
--- /dev/null
@@ -0,0 +1,29 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events: {}
diff --git a/tests/config/yaml/2/configs/fail/stream/events-invalid-type.yaml b/tests/config/yaml/2/configs/fail/stream/events-invalid-type.yaml
new file mode 100644 (file)
index 0000000..557d1b0
--- /dev/null
@@ -0,0 +1,38 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events: 23.5
diff --git a/tests/config/yaml/2/configs/fail/stream/events-key-invalid-identifier.yaml b/tests/config/yaml/2/configs/fail/stream/events-key-invalid-identifier.yaml
new file mode 100644 (file)
index 0000000..6c17ee1
--- /dev/null
@@ -0,0 +1,45 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    a_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        'my event':
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/events-no.yaml b/tests/config/yaml/2/configs/fail/stream/events-no.yaml
new file mode 100644 (file)
index 0000000..eae4fbe
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size:
+            class: int
+            size: 16
+          content_size:
+            class: int
+            size: 16
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-cs-not-int.yaml b/tests/config/yaml/2/configs/fail/stream/pct-cs-not-int.yaml
new file mode 100644 (file)
index 0000000..9b7c053
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size:
+            class: string
+          packet_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-cs-wrong-signed.yaml b/tests/config/yaml/2/configs/fail/stream/pct-cs-wrong-signed.yaml
new file mode 100644 (file)
index 0000000..70127d7
--- /dev/null
@@ -0,0 +1,50 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size:
+            class: int
+            size: 16
+            signed: true
+          packet_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-cs-yes-ps-no.yaml b/tests/config/yaml/2/configs/fail/stream/pct-cs-yes-ps-no.yaml
new file mode 100644 (file)
index 0000000..5fb3a95
--- /dev/null
@@ -0,0 +1,44 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-ed-not-int.yaml b/tests/config/yaml/2/configs/fail/stream/pct-ed-not-int.yaml
new file mode 100644 (file)
index 0000000..a1bfffb
--- /dev/null
@@ -0,0 +1,45 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          events_discarded:
+            class: string
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-ed-wrong-signed.yaml b/tests/config/yaml/2/configs/fail/stream/pct-ed-wrong-signed.yaml
new file mode 100644 (file)
index 0000000..372c70d
--- /dev/null
@@ -0,0 +1,49 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          events_discarded:
+            class: int
+            size: 16
+            signed: true
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-invalid-type.yaml b/tests/config/yaml/2/configs/fail/stream/pct-invalid-type.yaml
new file mode 100644 (file)
index 0000000..55bf135
--- /dev/null
@@ -0,0 +1,41 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type: 23
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-no.yaml b/tests/config/yaml/2/configs/fail/stream/pct-no.yaml
new file mode 100644 (file)
index 0000000..1f4beab
--- /dev/null
@@ -0,0 +1,42 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-not-struct.yaml b/tests/config/yaml/2/configs/fail/stream/pct-not-struct.yaml
new file mode 100644 (file)
index 0000000..128f92e
--- /dev/null
@@ -0,0 +1,42 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: string
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-ps-not-int.yaml b/tests/config/yaml/2/configs/fail/stream/pct-ps-not-int.yaml
new file mode 100644 (file)
index 0000000..5d767aa
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size:
+            class: string
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-ps-wrong-signed.yaml b/tests/config/yaml/2/configs/fail/stream/pct-ps-wrong-signed.yaml
new file mode 100644 (file)
index 0000000..2887e05
--- /dev/null
@@ -0,0 +1,50 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size:
+            class: int
+            size: 16
+            signed: true
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-ps-yes-cs-no.yaml b/tests/config/yaml/2/configs/fail/stream/pct-ps-yes-cs-no.yaml
new file mode 100644 (file)
index 0000000..8f2ccd1
--- /dev/null
@@ -0,0 +1,44 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-tb-not-int.yaml b/tests/config/yaml/2/configs/fail/stream/pct-tb-not-int.yaml
new file mode 100644 (file)
index 0000000..a78c9cb
--- /dev/null
@@ -0,0 +1,47 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+          timestamp_begin:
+            class: string
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-tb-te-different-clocks.yaml b/tests/config/yaml/2/configs/fail/stream/pct-tb-te-different-clocks.yaml
new file mode 100644 (file)
index 0000000..1158c8d
--- /dev/null
@@ -0,0 +1,62 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+    my_other_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+          timestamp_begin:
+            class: int
+            size: 32
+            property-mappings:
+              - type: clock
+                name: my_clock
+                property: value
+          timestamp_end:
+            class: int
+            size: 32
+            property-mappings:
+              - type: clock
+                name: my_other_clock
+                property: value
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-tb-wrong-pm.yaml b/tests/config/yaml/2/configs/fail/stream/pct-tb-wrong-pm.yaml
new file mode 100644 (file)
index 0000000..c6ca9ae
--- /dev/null
@@ -0,0 +1,50 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+          timestamp_begin:
+            class: int
+            size: 16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-tb-wrong-signed.yaml b/tests/config/yaml/2/configs/fail/stream/pct-tb-wrong-signed.yaml
new file mode 100644 (file)
index 0000000..f559bca
--- /dev/null
@@ -0,0 +1,55 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+          timestamp_begin:
+            class: int
+            size: 16
+            signed: true
+            property-mappings:
+              - type: clock
+                name: my_clock
+                property: value
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-tb-yes-te-no.yaml b/tests/config/yaml/2/configs/fail/stream/pct-tb-yes-te-no.yaml
new file mode 100644 (file)
index 0000000..a3422a0
--- /dev/null
@@ -0,0 +1,54 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+          timestamp_begin:
+            class: int
+            size: 32
+            property-mappings:
+              - type: clock
+                name: my_clock
+                property: value
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-te-not-int.yaml b/tests/config/yaml/2/configs/fail/stream/pct-te-not-int.yaml
new file mode 100644 (file)
index 0000000..9e286c4
--- /dev/null
@@ -0,0 +1,47 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+          timestamp_end:
+            class: string
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-te-wrong-pm.yaml b/tests/config/yaml/2/configs/fail/stream/pct-te-wrong-pm.yaml
new file mode 100644 (file)
index 0000000..0b8bfd9
--- /dev/null
@@ -0,0 +1,50 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+          timestamp_end:
+            class: int
+            size: 16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-te-wrong-signed.yaml b/tests/config/yaml/2/configs/fail/stream/pct-te-wrong-signed.yaml
new file mode 100644 (file)
index 0000000..48507bf
--- /dev/null
@@ -0,0 +1,55 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+          timestamp_end:
+            class: int
+            size: 16
+            signed: true
+            property-mappings:
+              - type: clock
+                name: my_clock
+                property: value
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/pct-te-yes-tb-no.yaml b/tests/config/yaml/2/configs/fail/stream/pct-te-yes-tb-no.yaml
new file mode 100644 (file)
index 0000000..2fdd9b1
--- /dev/null
@@ -0,0 +1,54 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+          timestamp_end:
+            class: int
+            size: 32
+            property-mappings:
+              - type: clock
+                name: my_clock
+                property: value
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/stream/unknown-prop.yaml b/tests/config/yaml/2/configs/fail/stream/unknown-prop.yaml
new file mode 100644 (file)
index 0000000..0b370ba
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      unknown: true
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/bo-invalid-type.yaml b/tests/config/yaml/2/configs/fail/trace/bo-invalid-type.yaml
new file mode 100644 (file)
index 0000000..fddf0ef
--- /dev/null
@@ -0,0 +1,45 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: 23
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/bo-invalid.yaml b/tests/config/yaml/2/configs/fail/trace/bo-invalid.yaml
new file mode 100644 (file)
index 0000000..01baca8
--- /dev/null
@@ -0,0 +1,45 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: ze
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/bo-no.yaml b/tests/config/yaml/2/configs/fail/trace/bo-no.yaml
new file mode 100644 (file)
index 0000000..359c74f
--- /dev/null
@@ -0,0 +1,44 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace: {}
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-magic-not-int.yaml b/tests/config/yaml/2/configs/fail/trace/ph-magic-not-int.yaml
new file mode 100644 (file)
index 0000000..87911be
--- /dev/null
@@ -0,0 +1,50 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: be
+    packet-header-type:
+      class: struct
+      fields:
+        magic:
+          class: string
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-magic-wrong-signed.yaml b/tests/config/yaml/2/configs/fail/trace/ph-magic-wrong-signed.yaml
new file mode 100644 (file)
index 0000000..604f0a0
--- /dev/null
@@ -0,0 +1,52 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: be
+    packet-header-type:
+      class: struct
+      fields:
+        magic:
+          class: int
+          size: 32
+          signed: true
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-magic-wrong-size.yaml b/tests/config/yaml/2/configs/fail/trace/ph-magic-wrong-size.yaml
new file mode 100644 (file)
index 0000000..2a1eaf7
--- /dev/null
@@ -0,0 +1,51 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: be
+    packet-header-type:
+      class: struct
+      fields:
+        magic:
+          class: int
+          size: 16
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-not-struct.yaml b/tests/config/yaml/2/configs/fail/trace/ph-not-struct.yaml
new file mode 100644 (file)
index 0000000..92a6d5e
--- /dev/null
@@ -0,0 +1,48 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: be
+    packet-header-type:
+      class: int
+      size: 32
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-streamid-not-int.yaml b/tests/config/yaml/2/configs/fail/trace/ph-streamid-not-int.yaml
new file mode 100644 (file)
index 0000000..d457fd1
--- /dev/null
@@ -0,0 +1,50 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: be
+    packet-header-type:
+      class: struct
+      fields:
+        stream_id:
+          class: string
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-streamid-too-small.yaml b/tests/config/yaml/2/configs/fail/trace/ph-streamid-too-small.yaml
new file mode 100644 (file)
index 0000000..946406a
--- /dev/null
@@ -0,0 +1,125 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  clocks:
+    my_clock: {}
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: le
+    packet-header-type:
+      class: struct
+      min-align: 8
+      fields:
+        stream_id:
+          class: int
+          size: 2
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+      event-header-type:
+        class: struct
+        min-align: 8
+        fields:
+          id: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field: uint16
+    my_stream2:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+      event-header-type:
+        class: struct
+        min-align: 8
+        fields:
+          id: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field: uint16
+    my_stream3:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+      event-header-type:
+        class: struct
+        min-align: 8
+        fields:
+          id: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field: uint16
+    my_stream4:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+      event-header-type:
+        class: struct
+        min-align: 8
+        fields:
+          id: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field: uint16
+    my_stream5:
+      packet-context-type:
+        class: struct
+        fields:
+          content_size: uint16
+          packet_size: uint16
+      event-header-type:
+        class: struct
+        min-align: 8
+        fields:
+          id: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field: uint16
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-streamid-wrong-signed.yaml b/tests/config/yaml/2/configs/fail/trace/ph-streamid-wrong-signed.yaml
new file mode 100644 (file)
index 0000000..e232bbb
--- /dev/null
@@ -0,0 +1,52 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: be
+    packet-header-type:
+      class: struct
+      fields:
+        stream_id:
+          class: int
+          size: 16
+          signed: true
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-uuid-et-not-int.yaml b/tests/config/yaml/2/configs/fail/trace/ph-uuid-et-not-int.yaml
new file mode 100644 (file)
index 0000000..cef76c8
--- /dev/null
@@ -0,0 +1,54 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    uuid: auto
+    byte-order: be
+    packet-header-type:
+      class: struct
+      fields:
+        uuid:
+          class: array
+          length: 16
+          element-type:
+            class: string
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-uuid-et-wrong-align.yaml b/tests/config/yaml/2/configs/fail/trace/ph-uuid-et-wrong-align.yaml
new file mode 100644 (file)
index 0000000..319d986
--- /dev/null
@@ -0,0 +1,56 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    uuid: auto
+    byte-order: be
+    packet-header-type:
+      class: struct
+      fields:
+        uuid:
+          class: array
+          length: 16
+          element-type:
+            class: int
+            size: 8
+            align: 16
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-uuid-et-wrong-signed.yaml b/tests/config/yaml/2/configs/fail/trace/ph-uuid-et-wrong-signed.yaml
new file mode 100644 (file)
index 0000000..04107bd
--- /dev/null
@@ -0,0 +1,56 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    uuid: auto
+    byte-order: be
+    packet-header-type:
+      class: struct
+      fields:
+        uuid:
+          class: array
+          length: 16
+          element-type:
+            class: int
+            size: 8
+            signed: true
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-uuid-et-wrong-size.yaml b/tests/config/yaml/2/configs/fail/trace/ph-uuid-et-wrong-size.yaml
new file mode 100644 (file)
index 0000000..c2492a7
--- /dev/null
@@ -0,0 +1,55 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    uuid: auto
+    byte-order: be
+    packet-header-type:
+      class: struct
+      fields:
+        uuid:
+          class: array
+          length: 16
+          element-type:
+            class: int
+            size: 4
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-uuid-not-array.yaml b/tests/config/yaml/2/configs/fail/trace/ph-uuid-not-array.yaml
new file mode 100644 (file)
index 0000000..d1aa05b
--- /dev/null
@@ -0,0 +1,50 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    uuid: auto
+    byte-order: be
+    packet-header-type:
+      class: struct
+      fields:
+        uuid: uint16
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/ph-uuid-wrong-length.yaml b/tests/config/yaml/2/configs/fail/trace/ph-uuid-wrong-length.yaml
new file mode 100644 (file)
index 0000000..4817248
--- /dev/null
@@ -0,0 +1,55 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    uuid: auto
+    byte-order: be
+    packet-header-type:
+      class: struct
+      fields:
+        uuid:
+          class: array
+          length: 17
+          element-type:
+            class: int
+            size: 8
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/unknown-prop.yaml b/tests/config/yaml/2/configs/fail/trace/unknown-prop.yaml
new file mode 100644 (file)
index 0000000..3ce7f0c
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order: be
+    unknown: false
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/uuid-invalid-type.yaml b/tests/config/yaml/2/configs/fail/trace/uuid-invalid-type.yaml
new file mode 100644 (file)
index 0000000..83d95f0
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    uuid: 12
+    byte-order: be
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/trace/uuid-invalid-uuid.yaml b/tests/config/yaml/2/configs/fail/trace/uuid-invalid-uuid.yaml
new file mode 100644 (file)
index 0000000..92ba144
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    uuid: something
+    byte-order: be
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/type-enum/members-el-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-enum/members-el-invalid-type.yaml
new file mode 100644 (file)
index 0000000..b5b4dec
--- /dev/null
@@ -0,0 +1,42 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                value-type:
+                  class: int
+                  size: 8
+                members:
+                  - HELLO
+                  - 23
+                  - ZOOM
diff --git a/tests/config/yaml/2/configs/fail/type-enum/members-el-member-label-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-enum/members-el-member-label-invalid-type.yaml
new file mode 100644 (file)
index 0000000..8c9dac1
--- /dev/null
@@ -0,0 +1,43 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                value-type:
+                  class: int
+                  size: 8
+                members:
+                  - HELLO
+                  - label: 65
+                    value: 6
+                  - ZOOM
diff --git a/tests/config/yaml/2/configs/fail/type-enum/members-el-member-unknown-prop.yaml b/tests/config/yaml/2/configs/fail/type-enum/members-el-member-unknown-prop.yaml
new file mode 100644 (file)
index 0000000..605ca47
--- /dev/null
@@ -0,0 +1,44 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                value-type:
+                  class: int
+                  size: 8
+                members:
+                  - HELLO
+                  - label: six
+                    value: 6
+                    unknown: true
+                  - ZOOM
diff --git a/tests/config/yaml/2/configs/fail/type-enum/members-el-member-value-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-enum/members-el-member-value-invalid-type.yaml
new file mode 100644 (file)
index 0000000..bff7116
--- /dev/null
@@ -0,0 +1,43 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                value-type:
+                  class: int
+                  size: 8
+                members:
+                  - HELLO
+                  - label: label
+                    value: meow
+                  - ZOOM
diff --git a/tests/config/yaml/2/configs/fail/type-enum/members-el-member-value-outside-range-signed.yaml b/tests/config/yaml/2/configs/fail/type-enum/members-el-member-value-outside-range-signed.yaml
new file mode 100644 (file)
index 0000000..295e4e5
--- /dev/null
@@ -0,0 +1,44 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                value-type:
+                  class: int
+                  size: 8
+                  signed: true
+                members:
+                  - HELLO
+                  - label: label
+                    value: -129
+                  - ZOOM
diff --git a/tests/config/yaml/2/configs/fail/type-enum/members-el-member-value-outside-range-unsigned.yaml b/tests/config/yaml/2/configs/fail/type-enum/members-el-member-value-outside-range-unsigned.yaml
new file mode 100644 (file)
index 0000000..f36cf32
--- /dev/null
@@ -0,0 +1,43 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                value-type:
+                  class: int
+                  size: 8
+                members:
+                  - HELLO
+                  - label: label
+                    value: 256
+                  - ZOOM
diff --git a/tests/config/yaml/2/configs/fail/type-enum/members-empty.yaml b/tests/config/yaml/2/configs/fail/type-enum/members-empty.yaml
new file mode 100644 (file)
index 0000000..0f93579
--- /dev/null
@@ -0,0 +1,39 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                value-type:
+                  class: int
+                  size: 8
+                members: []
diff --git a/tests/config/yaml/2/configs/fail/type-enum/members-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-enum/members-invalid-type.yaml
new file mode 100644 (file)
index 0000000..ac4a6f1
--- /dev/null
@@ -0,0 +1,39 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                value-type:
+                  class: int
+                  size: 8
+                members: string
diff --git a/tests/config/yaml/2/configs/fail/type-enum/members-no.yaml b/tests/config/yaml/2/configs/fail/type-enum/members-no.yaml
new file mode 100644 (file)
index 0000000..19227ca
--- /dev/null
@@ -0,0 +1,38 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                value-type:
+                  class: int
+                  size: 8
diff --git a/tests/config/yaml/2/configs/fail/type-enum/members-overlap.yaml b/tests/config/yaml/2/configs/fail/type-enum/members-overlap.yaml
new file mode 100644 (file)
index 0000000..5b50aa2
--- /dev/null
@@ -0,0 +1,44 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                value-type:
+                  class: int
+                  size: 8
+                  signed: true
+                members:
+                  - HELLO
+                  - ZOOM
+                  - label: MAGOG
+                    value: 0
diff --git a/tests/config/yaml/2/configs/fail/type-enum/unknown-prop.yaml b/tests/config/yaml/2/configs/fail/type-enum/unknown-prop.yaml
new file mode 100644 (file)
index 0000000..a845159
--- /dev/null
@@ -0,0 +1,41 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                value-type:
+                  class: int
+                  size: 8
+                members:
+                  - HELLO
+                unknown: false
diff --git a/tests/config/yaml/2/configs/fail/type-enum/vt-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-enum/vt-invalid-type.yaml
new file mode 100644 (file)
index 0000000..4d2a184
--- /dev/null
@@ -0,0 +1,38 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                value-type: 23
+                members:
+                  - HELLO
diff --git a/tests/config/yaml/2/configs/fail/type-enum/vt-no.yaml b/tests/config/yaml/2/configs/fail/type-enum/vt-no.yaml
new file mode 100644 (file)
index 0000000..374de4f
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: enum
+                members:
+                  - HELLO
diff --git a/tests/config/yaml/2/configs/fail/type-float/align-0.yaml b/tests/config/yaml/2/configs/fail/type-float/align-0.yaml
new file mode 100644 (file)
index 0000000..6ac0410
--- /dev/null
@@ -0,0 +1,39 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: float
+                size:
+                  exp: 8
+                  mant: 24
+                align: 0
diff --git a/tests/config/yaml/2/configs/fail/type-float/align-3.yaml b/tests/config/yaml/2/configs/fail/type-float/align-3.yaml
new file mode 100644 (file)
index 0000000..87ab18c
--- /dev/null
@@ -0,0 +1,39 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: float
+                size:
+                  exp: 8
+                  mant: 24
+                align: 3
diff --git a/tests/config/yaml/2/configs/fail/type-float/align-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-float/align-invalid-type.yaml
new file mode 100644 (file)
index 0000000..9c06ae5
--- /dev/null
@@ -0,0 +1,39 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: float
+                size:
+                  exp: 8
+                  mant: 24
+                align: string
diff --git a/tests/config/yaml/2/configs/fail/type-float/bo-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-float/bo-invalid-type.yaml
new file mode 100644 (file)
index 0000000..b0db7a7
--- /dev/null
@@ -0,0 +1,39 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: float
+                size:
+                  exp: 8
+                  mant: 24
+                byte-order: 17
diff --git a/tests/config/yaml/2/configs/fail/type-float/bo-invalid.yaml b/tests/config/yaml/2/configs/fail/type-float/bo-invalid.yaml
new file mode 100644 (file)
index 0000000..418a20f
--- /dev/null
@@ -0,0 +1,39 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: float
+                size:
+                  exp: 8
+                  mant: 24
+                byte-order: ze
diff --git a/tests/config/yaml/2/configs/fail/type-float/size-exp-mant-wrong-sum.yaml b/tests/config/yaml/2/configs/fail/type-float/size-exp-mant-wrong-sum.yaml
new file mode 100644 (file)
index 0000000..f69f4cf
--- /dev/null
@@ -0,0 +1,38 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: float
+                size:
+                  exp: 5
+                  mant: 21
diff --git a/tests/config/yaml/2/configs/fail/type-float/size-exp-no.yaml b/tests/config/yaml/2/configs/fail/type-float/size-exp-no.yaml
new file mode 100644 (file)
index 0000000..f688daa
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: float
+                size:
+                  mant: 24
diff --git a/tests/config/yaml/2/configs/fail/type-float/size-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-float/size-invalid-type.yaml
new file mode 100644 (file)
index 0000000..91cc996
--- /dev/null
@@ -0,0 +1,36 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: float
+                size: string
diff --git a/tests/config/yaml/2/configs/fail/type-float/size-mant-no.yaml b/tests/config/yaml/2/configs/fail/type-float/size-mant-no.yaml
new file mode 100644 (file)
index 0000000..753d7e0
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: float
+                size:
+                  exp: 8
diff --git a/tests/config/yaml/2/configs/fail/type-float/size-no.yaml b/tests/config/yaml/2/configs/fail/type-float/size-no.yaml
new file mode 100644 (file)
index 0000000..9f99c58
--- /dev/null
@@ -0,0 +1,35 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: float
diff --git a/tests/config/yaml/2/configs/fail/type-float/size-unknown-prop.yaml b/tests/config/yaml/2/configs/fail/type-float/size-unknown-prop.yaml
new file mode 100644 (file)
index 0000000..9a9589c
--- /dev/null
@@ -0,0 +1,39 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: float
+                size:
+                  exp: 8
+                  mant: 24
+                  unknown: false
diff --git a/tests/config/yaml/2/configs/fail/type-float/unknown-prop.yaml b/tests/config/yaml/2/configs/fail/type-float/unknown-prop.yaml
new file mode 100644 (file)
index 0000000..9149ad2
--- /dev/null
@@ -0,0 +1,39 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: float
+                size:
+                  exp: 8
+                  mant: 24
+                unknown: false
diff --git a/tests/config/yaml/2/configs/fail/type-int/align-0.yaml b/tests/config/yaml/2/configs/fail/type-int/align-0.yaml
new file mode 100644 (file)
index 0000000..d32de2c
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 32
+                align: 0
diff --git a/tests/config/yaml/2/configs/fail/type-int/align-3.yaml b/tests/config/yaml/2/configs/fail/type-int/align-3.yaml
new file mode 100644 (file)
index 0000000..26ac75e
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 32
+                align: 3
diff --git a/tests/config/yaml/2/configs/fail/type-int/align-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-int/align-invalid-type.yaml
new file mode 100644 (file)
index 0000000..19cf4d4
--- /dev/null
@@ -0,0 +1,36 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                align: string
diff --git a/tests/config/yaml/2/configs/fail/type-int/base-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-int/base-invalid-type.yaml
new file mode 100644 (file)
index 0000000..0068800
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+                base: 17.34
diff --git a/tests/config/yaml/2/configs/fail/type-int/base-invalid.yaml b/tests/config/yaml/2/configs/fail/type-int/base-invalid.yaml
new file mode 100644 (file)
index 0000000..01c097c
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 32
+                base: inval
diff --git a/tests/config/yaml/2/configs/fail/type-int/bo-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-int/bo-invalid-type.yaml
new file mode 100644 (file)
index 0000000..d54727b
--- /dev/null
@@ -0,0 +1,36 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                byte-order: 17.34
diff --git a/tests/config/yaml/2/configs/fail/type-int/bo-invalid.yaml b/tests/config/yaml/2/configs/fail/type-int/bo-invalid.yaml
new file mode 100644 (file)
index 0000000..fd6945c
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 32
+                byte-order: ze
diff --git a/tests/config/yaml/2/configs/fail/type-int/pm-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-int/pm-invalid-type.yaml
new file mode 100644 (file)
index 0000000..676145a
--- /dev/null
@@ -0,0 +1,36 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                property-mappings: hello
diff --git a/tests/config/yaml/2/configs/fail/type-int/pm-property-invalid.yaml b/tests/config/yaml/2/configs/fail/type-int/pm-property-invalid.yaml
new file mode 100644 (file)
index 0000000..edd828b
--- /dev/null
@@ -0,0 +1,42 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  clocks:
+    my_clock: {}
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+                property-mappings:
+                  - type: clock
+                    name: my_clock
+                    property: type
diff --git a/tests/config/yaml/2/configs/fail/type-int/pm-type-invalid.yaml b/tests/config/yaml/2/configs/fail/type-int/pm-type-invalid.yaml
new file mode 100644 (file)
index 0000000..3eda6f8
--- /dev/null
@@ -0,0 +1,42 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  clocks:
+    my_clock: {}
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+                property-mappings:
+                  - type: stream
+                    name: zala
+                    property: value
diff --git a/tests/config/yaml/2/configs/fail/type-int/pm-unknown-clock.yaml b/tests/config/yaml/2/configs/fail/type-int/pm-unknown-clock.yaml
new file mode 100644 (file)
index 0000000..961c645
--- /dev/null
@@ -0,0 +1,42 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  clocks:
+    my_clock: {}
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+                property-mappings:
+                  - type: clock
+                    name: zala
+                    property: value
diff --git a/tests/config/yaml/2/configs/fail/type-int/signed-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-int/signed-invalid-type.yaml
new file mode 100644 (file)
index 0000000..0877653
--- /dev/null
@@ -0,0 +1,36 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                signed: string
diff --git a/tests/config/yaml/2/configs/fail/type-int/size-0.yaml b/tests/config/yaml/2/configs/fail/type-int/size-0.yaml
new file mode 100644 (file)
index 0000000..b1e1da2
--- /dev/null
@@ -0,0 +1,36 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 0
diff --git a/tests/config/yaml/2/configs/fail/type-int/size-65.yaml b/tests/config/yaml/2/configs/fail/type-int/size-65.yaml
new file mode 100644 (file)
index 0000000..b8bbf41
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 65
+                align: 8
diff --git a/tests/config/yaml/2/configs/fail/type-int/size-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-int/size-invalid-type.yaml
new file mode 100644 (file)
index 0000000..ebe09ec
--- /dev/null
@@ -0,0 +1,36 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: string
diff --git a/tests/config/yaml/2/configs/fail/type-int/size-no.yaml b/tests/config/yaml/2/configs/fail/type-int/size-no.yaml
new file mode 100644 (file)
index 0000000..a44afe4
--- /dev/null
@@ -0,0 +1,35 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
diff --git a/tests/config/yaml/2/configs/fail/type-int/unknown-prop.yaml b/tests/config/yaml/2/configs/fail/type-int/unknown-prop.yaml
new file mode 100644 (file)
index 0000000..f48a297
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+                unknown: false
diff --git a/tests/config/yaml/2/configs/fail/type-string/unknown-prop.yaml b/tests/config/yaml/2/configs/fail/type-string/unknown-prop.yaml
new file mode 100644 (file)
index 0000000..19443c5
--- /dev/null
@@ -0,0 +1,36 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: string
+                unknown: false
diff --git a/tests/config/yaml/2/configs/fail/type-struct/fields-field-invalid-identifier.yaml b/tests/config/yaml/2/configs/fail/type-struct/fields-field-invalid-identifier.yaml
new file mode 100644 (file)
index 0000000..8403de9
--- /dev/null
@@ -0,0 +1,36 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              'a field':
+                class: int
+                size: 1
diff --git a/tests/config/yaml/2/configs/fail/type-struct/fields-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-struct/fields-invalid-type.yaml
new file mode 100644 (file)
index 0000000..73972f3
--- /dev/null
@@ -0,0 +1,33 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields: 23
diff --git a/tests/config/yaml/2/configs/fail/type-struct/ma-0.yaml b/tests/config/yaml/2/configs/fail/type-struct/ma-0.yaml
new file mode 100644 (file)
index 0000000..f84974a
--- /dev/null
@@ -0,0 +1,33 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            min-align: 0
diff --git a/tests/config/yaml/2/configs/fail/type-struct/ma-3.yaml b/tests/config/yaml/2/configs/fail/type-struct/ma-3.yaml
new file mode 100644 (file)
index 0000000..a1af2f7
--- /dev/null
@@ -0,0 +1,33 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            min-align: 3
diff --git a/tests/config/yaml/2/configs/fail/type-struct/ma-invalid-type.yaml b/tests/config/yaml/2/configs/fail/type-struct/ma-invalid-type.yaml
new file mode 100644 (file)
index 0000000..edfd5e9
--- /dev/null
@@ -0,0 +1,33 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            min-align: yes
diff --git a/tests/config/yaml/2/configs/fail/type-struct/unknown-prop.yaml b/tests/config/yaml/2/configs/fail/type-struct/unknown-prop.yaml
new file mode 100644 (file)
index 0000000..f89d813
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            unknown: true
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/type/inherit-forward.yaml b/tests/config/yaml/2/configs/fail/type/inherit-forward.yaml
new file mode 100644 (file)
index 0000000..241ad64
--- /dev/null
@@ -0,0 +1,42 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      $inherit: meow
+      size: 16
+    meow:
+      class: int
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/type/inherit-unknown.yaml b/tests/config/yaml/2/configs/fail/type/inherit-unknown.yaml
new file mode 100644 (file)
index 0000000..06aeaea
--- /dev/null
@@ -0,0 +1,40 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      $inherit: unknown
+      size: 16
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/type/invalid-type.yaml b/tests/config/yaml/2/configs/fail/type/invalid-type.yaml
new file mode 100644 (file)
index 0000000..63208f3
--- /dev/null
@@ -0,0 +1,43 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    an-int: 23
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/type/no-class.yaml b/tests/config/yaml/2/configs/fail/type/no-class.yaml
new file mode 100644 (file)
index 0000000..2b3a63b
--- /dev/null
@@ -0,0 +1,35 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  trace:
+    byte-order: le
+  streams:
+    my_stream:
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                size: 8
diff --git a/tests/config/yaml/2/configs/fail/yaml/invalid.yaml b/tests/config/yaml/2/configs/fail/yaml/invalid.yaml
new file mode 100644 (file)
index 0000000..d3804b9
--- /dev/null
@@ -0,0 +1,46 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.1'
+metadata:
+  type-aliases:
+    uint16:
+      class: int
+      size: 16
+  trace:
+    byte-order:
+      le: -23
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
diff --git a/tests/config/yaml/2/configs/pass/everything/config.yaml b/tests/config/yaml/2/configs/pass/everything/config.yaml
new file mode 100644 (file)
index 0000000..eb99189
--- /dev/null
@@ -0,0 +1,102 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+version: '2.2'
+prefix: bctf_
+options:
+  gen-prefix-def: true
+  gen-default-stream-def: true
+metadata:
+  $include:
+    - inc-metadata.yaml
+    - stdmisc.yaml
+    - lttng-ust-log-levels.yaml
+  type-aliases:
+    my-clock-int:
+      $inherit: uint32
+      property-mappings:
+        - type: clock
+          name: some_clock
+          property: value
+    my-special-int:
+      size: 19
+      base: hex
+  $log-levels:
+    couch: 0755
+  trace:
+    $include: inc-trace.yaml
+    byte-order: be
+  clocks:
+    some_clock:
+      $include: inc-clock.yaml
+      description: this is my favorite clock
+      offset:
+        cycles: 91827439187
+      absolute: null
+  streams:
+    my_stream:
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint16
+          content_size: uint16
+          timestamp_begin: my-clock-int
+          timestamp_end: my-clock-int
+      events:
+        my_event:
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+    my_other_stream:
+      $include: inc-stream.yaml
+      packet-context-type:
+        class: struct
+        fields:
+          packet_size: uint32
+          content_size: uint32
+          events_discarded: uint16
+      event-header-type:
+        class: struct
+        fields:
+          id: uint8
+          timestamp: my-clock-int
+      events:
+        my_event:
+          $include: inc-event.yaml
+          context-type: null
+          payload-type:
+            class: struct
+            fields:
+              my_field:
+                class: int
+                size: 8
+        oh_henry_event:
+          payload-type:
+            class: struct
+            fields:
+              s1: string
+              s2: string
+              s3: string
+              s4: string
diff --git a/tests/config/yaml/2/configs/pass/everything/inc-clock.yaml b/tests/config/yaml/2/configs/pass/everything/inc-clock.yaml
new file mode 100644 (file)
index 0000000..dd6fdec
--- /dev/null
@@ -0,0 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+freq: 123456789
+offset:
+  seconds: 18
+absolute: true
+$return-ctype: unsigned long
diff --git a/tests/config/yaml/2/configs/pass/everything/inc-event.yaml b/tests/config/yaml/2/configs/pass/everything/inc-event.yaml
new file mode 100644 (file)
index 0000000..5c77118
--- /dev/null
@@ -0,0 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+log-level: WARNING
+context-type:
+  class: struct
+  fields:
+    fff: float
diff --git a/tests/config/yaml/2/configs/pass/everything/inc-metadata.yaml b/tests/config/yaml/2/configs/pass/everything/inc-metadata.yaml
new file mode 100644 (file)
index 0000000..83e0b7d
--- /dev/null
@@ -0,0 +1,58 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+$include:
+  - stdint.yaml
+  - stdfloat.yaml
+type-aliases:
+  my-special-int:
+    class: int
+    size: 23
+    align: 2
+  struct32:
+    class: struct
+    min-align: 32
+  def-payload-type:
+    $inherit: struct32
+    fields:
+      haha: float
+      hihi: uint32
+      huhu: uint16
+      hoho: double
+streams:
+  my_other_stream:
+    events:
+      this_event:
+        payload-type:
+          class: struct
+          fields:
+            special: my-special-int
+            more_special:
+              $inherit: my-special-int
+              align: 32
+$log-levels:
+  couch: 23
+  tv: 199
+  thread: 0x28aff
+env:
+  salut: lol
+  meow: mix
diff --git a/tests/config/yaml/2/configs/pass/everything/inc-stream.yaml b/tests/config/yaml/2/configs/pass/everything/inc-stream.yaml
new file mode 100644 (file)
index 0000000..56def30
--- /dev/null
@@ -0,0 +1,39 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+event-context-type:
+  class: struct
+  fields:
+    i: int32
+    f: float
+    d: double
+    s: string
+    m: ctf-magic
+events:
+  evev:
+    payload-type: def-payload-type
+  context_no_payload:
+    context-type:
+      class: struct
+      fields:
+        str: string
+  no_context_no_payload: {}
diff --git a/tests/config/yaml/2/configs/pass/everything/inc-trace.yaml b/tests/config/yaml/2/configs/pass/everything/inc-trace.yaml
new file mode 100644 (file)
index 0000000..d771be8
--- /dev/null
@@ -0,0 +1,26 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+$include: trace-basic.yaml
+packet-header-type:
+  fields:
+    soy_sauce: uint64
diff --git a/tests/config/yaml/2/test_fail_clock.py b/tests/config/yaml/2/test_fail_clock.py
new file mode 100644 (file)
index 0000000..b132687
--- /dev/null
@@ -0,0 +1,89 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_absolute_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'clock/absolute-invalid-type')
+
+
+def test_description_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'clock/description-invalid-type')
+
+
+def test_ec_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'clock/ec-invalid-type')
+
+
+def test_ec_invalid(request, config_fail_test):
+    config_fail_test(request, 'clock/ec-invalid')
+
+
+def test_freq_0(request, config_fail_test):
+    config_fail_test(request, 'clock/freq-0')
+
+
+def test_freq_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'clock/freq-invalid-type')
+
+
+def test_freq_neg(request, config_fail_test):
+    config_fail_test(request, 'clock/freq-neg')
+
+
+def test_offset_cycles_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'clock/offset-cycles-invalid-type')
+
+
+def test_offset_cycles_neg(request, config_fail_test):
+    config_fail_test(request, 'clock/offset-cycles-neg')
+
+
+def test_offset_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'clock/offset-invalid-type')
+
+
+def test_offset_seconds_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'clock/offset-seconds-invalid-type')
+
+
+def test_offset_seconds_neg(request, config_fail_test):
+    config_fail_test(request, 'clock/offset-seconds-neg')
+
+
+def test_offset_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'clock/offset-unknown-prop')
+
+
+def test_rct_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'clock/rct-invalid-type')
+
+
+def test_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'clock/unknown-prop')
+
+
+def test_uuid_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'clock/uuid-invalid-type')
+
+
+def test_uuid_invalid(request, config_fail_test):
+    config_fail_test(request, 'clock/uuid-invalid')
diff --git a/tests/config/yaml/2/test_fail_config.py b/tests/config/yaml/2/test_fail_config.py
new file mode 100644 (file)
index 0000000..1dd3166
--- /dev/null
@@ -0,0 +1,73 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_metadata_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'config/metadata-invalid-type')
+
+
+def test_metadata_no(request, config_fail_test):
+    config_fail_test(request, 'config/metadata-no')
+
+
+def test_options_gen_default_stream_def_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'config/options-gen-default-stream-def-invalid-type')
+
+
+def test_options_gen_prefix_def_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'config/options-gen-prefix-def-invalid-type')
+
+
+def test_options_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'config/options-invalid-type')
+
+
+def test_options_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'config/options-unknown-prop')
+
+
+def test_prefix_invalid_identifier(request, config_fail_test):
+    config_fail_test(request, 'config/prefix-invalid-identifier')
+
+
+def test_prefix_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'config/prefix-invalid-type')
+
+
+def test_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'config/unknown-prop')
+
+
+def test_version_invalid_19(request, config_fail_test):
+    config_fail_test(request, 'config/version-invalid-19')
+
+
+def test_version_invalid_23(request, config_fail_test):
+    config_fail_test(request, 'config/version-invalid-23')
+
+
+def test_version_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'config/version-invalid-type')
+
+
+def test_version_no(request, config_fail_test):
+    config_fail_test(request, 'config/version-no')
diff --git a/tests/config/yaml/2/test_fail_event.py b/tests/config/yaml/2/test_fail_event.py
new file mode 100644 (file)
index 0000000..a89b8c9
--- /dev/null
@@ -0,0 +1,53 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_ct_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'event/ct-invalid-type')
+
+
+def test_ct_not_struct(request, config_fail_test):
+    config_fail_test(request, 'event/ct-not-struct')
+
+
+def test_ll_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'event/ll-invalid-type')
+
+
+def test_ll_non_existing(request, config_fail_test):
+    config_fail_test(request, 'event/ll-non-existing')
+
+
+def test_no_fields_at_all(request, config_fail_test):
+    config_fail_test(request, 'event/no-fields-at-all')
+
+
+def test_pt_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'event/pt-invalid-type')
+
+
+def test_pt_not_struct(request, config_fail_test):
+    config_fail_test(request, 'event/pt-not-struct')
+
+
+def test_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'event/unknown-prop')
diff --git a/tests/config/yaml/2/test_fail_include.py b/tests/config/yaml/2/test_fail_include.py
new file mode 100644 (file)
index 0000000..7f54998
--- /dev/null
@@ -0,0 +1,45 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'include/invalid-type')
+
+
+def test_file_not_found(request, config_fail_test):
+    config_fail_test(request, 'include/file-not-found')
+
+
+def test_file_not_found_abs(request, config_fail_test):
+    config_fail_test(request, 'include/file-not-found-abs')
+
+
+def test_file_not_found_in_array(request, config_fail_test):
+    config_fail_test(request, 'include/file-not-found-in-array')
+
+
+def test_file_not_found_recursive(request, config_fail_test):
+    config_fail_test(request, 'include/file-not-found-recursive')
+
+
+def test_cycle(request, config_fail_test):
+    config_fail_test(request, 'include/cycle')
diff --git a/tests/config/yaml/2/test_fail_metadata.py b/tests/config/yaml/2/test_fail_metadata.py
new file mode 100644 (file)
index 0000000..ba11f47
--- /dev/null
@@ -0,0 +1,101 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_clocks_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'metadata/clocks-invalid-type')
+
+
+def test_clocks_key_invalid_identifier(request, config_fail_test):
+    config_fail_test(request, 'metadata/clocks-key-invalid-identifier')
+
+
+def test_default_stream_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'metadata/default-stream-invalid-type')
+
+
+def test_default_stream_stream_default_duplicate(request, config_fail_test):
+    config_fail_test(request, 'metadata/default-stream-stream-default-duplicate')
+
+
+def test_default_stream_unknown_stream(request, config_fail_test):
+    config_fail_test(request, 'metadata/default-stream-unknown-stream')
+
+
+def test_env_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'metadata/env-invalid-type')
+
+
+def test_env_key_invalid_identifier(request, config_fail_test):
+    config_fail_test(request, 'metadata/env-key-invalid-identifier')
+
+
+def test_env_value_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'metadata/env-value-invalid-type')
+
+
+def test_ll_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'metadata/ll-invalid-type')
+
+
+def test_ll_value_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'metadata/ll-value-invalid-type')
+
+
+def test_multiple_streams_trace_ph_no_stream_id(request, config_fail_test):
+    config_fail_test(request, 'metadata/multiple-streams-trace-ph-no-stream-id')
+
+
+def test_streams_empty(request, config_fail_test):
+    config_fail_test(request, 'metadata/streams-empty')
+
+
+def test_streams_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'metadata/streams-invalid-type')
+
+
+def test_streams_key_invalid_identifier(request, config_fail_test):
+    config_fail_test(request, 'metadata/streams-key-invalid-identifier')
+
+
+def test_streams_no(request, config_fail_test):
+    config_fail_test(request, 'metadata/streams-no')
+
+
+def test_ta_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'metadata/ta-invalid-type')
+
+
+def test_trace_empty(request, config_fail_test):
+    config_fail_test(request, 'metadata/trace-empty')
+
+
+def test_trace_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'metadata/trace-invalid-type')
+
+
+def test_trace_no(request, config_fail_test):
+    config_fail_test(request, 'metadata/trace-no')
+
+
+def test_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'metadata/unknown-prop')
diff --git a/tests/config/yaml/2/test_fail_stream.py b/tests/config/yaml/2/test_fail_stream.py
new file mode 100644 (file)
index 0000000..42a9a5b
--- /dev/null
@@ -0,0 +1,169 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_default_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'stream/default-invalid-type')
+
+
+def test_ect_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'stream/ect-invalid-type')
+
+
+def test_ect_not_struct(request, config_fail_test):
+    config_fail_test(request, 'stream/ect-not-struct')
+
+
+def test_eht_id_no_multiple_events(request, config_fail_test):
+    config_fail_test(request, 'stream/eht-id-no-multiple-events')
+
+
+def test_eht_id_not_int(request, config_fail_test):
+    config_fail_test(request, 'stream/eht-id-not-int')
+
+
+def test_eht_id_too_small(request, config_fail_test):
+    config_fail_test(request, 'stream/eht-id-too-small')
+
+
+def test_eht_id_wrong_signed(request, config_fail_test):
+    config_fail_test(request, 'stream/eht-id-wrong-signed')
+
+
+def test_eht_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'stream/eht-invalid-type')
+
+
+def test_eht_not_struct(request, config_fail_test):
+    config_fail_test(request, 'stream/eht-not-struct')
+
+
+def test_eht_timestamp_not_int(request, config_fail_test):
+    config_fail_test(request, 'stream/eht-timestamp-not-int')
+
+
+def test_eht_timestamp_wrong_pm(request, config_fail_test):
+    config_fail_test(request, 'stream/eht-timestamp-wrong-pm')
+
+
+def test_eht_timestamp_wrong_signed(request, config_fail_test):
+    config_fail_test(request, 'stream/eht-timestamp-wrong-signed')
+
+
+def test_events_empty(request, config_fail_test):
+    config_fail_test(request, 'stream/events-empty')
+
+
+def test_events_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'stream/events-invalid-type')
+
+
+def test_events_key_invalid_identifier(request, config_fail_test):
+    config_fail_test(request, 'stream/events-key-invalid-identifier')
+
+
+def test_events_no(request, config_fail_test):
+    config_fail_test(request, 'stream/events-no')
+
+
+def test_pct_cs_not_int(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-cs-not-int')
+
+
+def test_pct_cs_wrong_signed(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-cs-wrong-signed')
+
+
+def test_pct_cs_yes_ps_no(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-cs-yes-ps-no')
+
+
+def test_pct_ed_not_int(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-ed-not-int')
+
+
+def test_pct_ed_wrong_signed(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-ed-wrong-signed')
+
+
+def test_pct_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-invalid-type')
+
+
+def test_pct_not_struct(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-not-struct')
+
+
+def test_pct_no(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-no')
+
+
+def test_pct_ps_not_int(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-ps-not-int')
+
+
+def test_pct_ps_wrong_signed(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-ps-wrong-signed')
+
+
+def test_pct_ps_yes_cs_no(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-ps-yes-cs-no')
+
+
+def test_pct_tb_not_int(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-tb-not-int')
+
+
+def test_pct_tb_te_different_clocks(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-tb-te-different-clocks')
+
+
+def test_pct_tb_wrong_pm(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-tb-wrong-pm')
+
+
+def test_pct_tb_wrong_signed(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-tb-wrong-signed')
+
+
+def test_pct_tb_yes_te_no(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-tb-yes-te-no')
+
+
+def test_pct_te_not_int(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-te-not-int')
+
+
+def test_pct_te_wrong_pm(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-te-wrong-pm')
+
+
+def test_pct_te_wrong_signed(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-te-wrong-signed')
+
+
+def test_pct_te_yes_tb_no(request, config_fail_test):
+    config_fail_test(request, 'stream/pct-te-yes-tb-no')
+
+
+def test_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'stream/unknown-prop')
diff --git a/tests/config/yaml/2/test_fail_trace.py b/tests/config/yaml/2/test_fail_trace.py
new file mode 100644 (file)
index 0000000..82cae71
--- /dev/null
@@ -0,0 +1,97 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_bo_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'trace/bo-invalid-type')
+
+
+def test_bo_invalid(request, config_fail_test):
+    config_fail_test(request, 'trace/bo-invalid')
+
+
+def test_bo_no(request, config_fail_test):
+    config_fail_test(request, 'trace/bo-no')
+
+
+def test_ph_magic_not_int(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-magic-not-int')
+
+
+def test_ph_magic_wrong_signed(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-magic-wrong-signed')
+
+
+def test_ph_magic_wrong_size(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-magic-wrong-size')
+
+
+def test_ph_not_struct(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-not-struct')
+
+
+def test_ph_streamid_not_int(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-streamid-not-int')
+
+
+def test_ph_streamid_too_small(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-streamid-too-small')
+
+
+def test_ph_streamid_wrong_signed(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-streamid-wrong-signed')
+
+
+def test_ph_uuid_et_not_int(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-uuid-et-not-int')
+
+
+def test_ph_uuid_et_wrong_align(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-uuid-et-wrong-align')
+
+
+def test_ph_uuid_et_wrong_signed(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-uuid-et-wrong-signed')
+
+
+def test_ph_uuid_et_wrong_size(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-uuid-et-wrong-size')
+
+
+def test_ph_uuid_not_array(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-uuid-not-array')
+
+
+def test_ph_uuid_wrong_length(request, config_fail_test):
+    config_fail_test(request, 'trace/ph-uuid-wrong-length')
+
+
+def test_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'trace/unknown-prop')
+
+
+def test_uuid_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'trace/uuid-invalid-type')
+
+
+def test_uuid_invalid_uuid(request, config_fail_test):
+    config_fail_test(request, 'trace/uuid-invalid-uuid')
diff --git a/tests/config/yaml/2/test_fail_type.py b/tests/config/yaml/2/test_fail_type.py
new file mode 100644 (file)
index 0000000..cda672f
--- /dev/null
@@ -0,0 +1,37 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_inherit_forward(request, config_fail_test):
+    config_fail_test(request, 'type/inherit-forward')
+
+
+def test_inherit_unknown(request, config_fail_test):
+    config_fail_test(request, 'type/inherit-unknown')
+
+
+def test_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type/invalid-type')
+
+
+def test_no_class(request, config_fail_test):
+    config_fail_test(request, 'type/no-class')
diff --git a/tests/config/yaml/2/test_fail_type_enum.py b/tests/config/yaml/2/test_fail_type_enum.py
new file mode 100644 (file)
index 0000000..ab97aaa
--- /dev/null
@@ -0,0 +1,73 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_members_el_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-enum/members-el-invalid-type')
+
+
+def test_members_el_member_label_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-enum/members-el-member-label-invalid-type')
+
+
+def test_members_el_member_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'type-enum/members-el-member-unknown-prop')
+
+
+def test_members_el_member_value_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-enum/members-el-member-value-invalid-type')
+
+
+def test_members_el_member_value_outside_range_signed(request, config_fail_test):
+    config_fail_test(request, 'type-enum/members-el-member-value-outside-range-signed')
+
+
+def test_members_el_member_value_outside_range_unsigned(request, config_fail_test):
+    config_fail_test(request, 'type-enum/members-el-member-value-outside-range-unsigned')
+
+
+def test_members_empty(request, config_fail_test):
+    config_fail_test(request, 'type-enum/members-empty')
+
+
+def test_members_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-enum/members-invalid-type')
+
+
+def test_members_no(request, config_fail_test):
+    config_fail_test(request, 'type-enum/members-no')
+
+
+def test_members_overlap(request, config_fail_test):
+    config_fail_test(request, 'type-enum/members-overlap')
+
+
+def test_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'type-enum/unknown-prop')
+
+
+def test_vt_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-enum/vt-invalid-type')
+
+
+def test_vt_no(request, config_fail_test):
+    config_fail_test(request, 'type-enum/vt-no')
diff --git a/tests/config/yaml/2/test_fail_type_float.py b/tests/config/yaml/2/test_fail_type_float.py
new file mode 100644 (file)
index 0000000..dc7894d
--- /dev/null
@@ -0,0 +1,69 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_align_0(request, config_fail_test):
+    config_fail_test(request, 'type-float/align-0')
+
+
+def test_align_3(request, config_fail_test):
+    config_fail_test(request, 'type-float/align-3')
+
+
+def test_align_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-float/align-invalid-type')
+
+
+def test_bo_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-float/bo-invalid-type')
+
+
+def test_bo_invalid(request, config_fail_test):
+    config_fail_test(request, 'type-float/bo-invalid')
+
+
+def test_size_exp_mant_wrong_sum(request, config_fail_test):
+    config_fail_test(request, 'type-float/size-exp-mant-wrong-sum')
+
+
+def test_size_exp_no(request, config_fail_test):
+    config_fail_test(request, 'type-float/size-exp-no')
+
+
+def test_size_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-float/size-invalid-type')
+
+
+def test_size_mant_no(request, config_fail_test):
+    config_fail_test(request, 'type-float/size-mant-no')
+
+
+def test_size_no(request, config_fail_test):
+    config_fail_test(request, 'type-float/size-no')
+
+
+def test_size_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'type-float/size-unknown-prop')
+
+
+def test_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'type-float/unknown-prop')
diff --git a/tests/config/yaml/2/test_fail_type_int.py b/tests/config/yaml/2/test_fail_type_int.py
new file mode 100644 (file)
index 0000000..07ac0a3
--- /dev/null
@@ -0,0 +1,89 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_align_0(request, config_fail_test):
+    config_fail_test(request, 'type-int/align-0')
+
+
+def test_align_3(request, config_fail_test):
+    config_fail_test(request, 'type-int/align-3')
+
+
+def test_align_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-int/align-invalid-type')
+
+
+def test_base_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-int/base-invalid-type')
+
+
+def test_base_invalid(request, config_fail_test):
+    config_fail_test(request, 'type-int/base-invalid')
+
+
+def test_bo_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-int/bo-invalid-type')
+
+
+def test_bo_invalid(request, config_fail_test):
+    config_fail_test(request, 'type-int/bo-invalid')
+
+
+def test_pm_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-int/pm-invalid-type')
+
+
+def test_pm_property_invalid(request, config_fail_test):
+    config_fail_test(request, 'type-int/pm-property-invalid')
+
+
+def test_pm_type_invalid(request, config_fail_test):
+    config_fail_test(request, 'type-int/pm-type-invalid')
+
+
+def test_pm_unknown_clock(request, config_fail_test):
+    config_fail_test(request, 'type-int/pm-unknown-clock')
+
+
+def test_signed_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-int/signed-invalid-type')
+
+
+def test_size_0(request, config_fail_test):
+    config_fail_test(request, 'type-int/size-0')
+
+
+def test_size_65(request, config_fail_test):
+    config_fail_test(request, 'type-int/size-65')
+
+
+def test_size_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-int/size-invalid-type')
+
+
+def test_size_no(request, config_fail_test):
+    config_fail_test(request, 'type-int/size-no')
+
+
+def test_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'type-int/unknown-prop')
diff --git a/tests/config/yaml/2/test_fail_type_string.py b/tests/config/yaml/2/test_fail_type_string.py
new file mode 100644 (file)
index 0000000..224862f
--- /dev/null
@@ -0,0 +1,25 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'type-string/unknown-prop')
diff --git a/tests/config/yaml/2/test_fail_type_struct.py b/tests/config/yaml/2/test_fail_type_struct.py
new file mode 100644 (file)
index 0000000..46ff835
--- /dev/null
@@ -0,0 +1,45 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_fields_field_invalid_identifier(request, config_fail_test):
+    config_fail_test(request, 'type-struct/fields-field-invalid-identifier')
+
+
+def test_fields_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-struct/fields-invalid-type')
+
+
+def test_ma_0(request, config_fail_test):
+    config_fail_test(request, 'type-struct/ma-0')
+
+
+def test_ma_3(request, config_fail_test):
+    config_fail_test(request, 'type-struct/ma-3')
+
+
+def test_ma_invalid_type(request, config_fail_test):
+    config_fail_test(request, 'type-struct/ma-invalid-type')
+
+
+def test_unknown_prop(request, config_fail_test):
+    config_fail_test(request, 'type-struct/unknown-prop')
diff --git a/tests/config/yaml/2/test_fail_yaml.py b/tests/config/yaml/2/test_fail_yaml.py
new file mode 100644 (file)
index 0000000..8b2079c
--- /dev/null
@@ -0,0 +1,25 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+def test_invalid(request, config_fail_test):
+    config_fail_test(request, 'yaml/invalid')
diff --git a/tests/config/yaml/2/test_pass_everything.py b/tests/config/yaml/2/test_pass_everything.py
new file mode 100644 (file)
index 0000000..0c10a36
--- /dev/null
@@ -0,0 +1,75 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+import os
+import os.path
+import barectf
+import subprocess
+
+
+def test_everything(request, tmpdir):
+    yaml_path = os.path.join(os.path.dirname(request.fspath), 'configs', 'pass', 'everything',
+                             'config.yaml')
+    yaml_dir = os.path.dirname(yaml_path)
+
+    with open(yaml_path) as f:
+        cfg = barectf.configuration_from_file(f, inclusion_directories=[yaml_dir])
+
+    cg = barectf.CodeGenerator(cfg)
+    files = cg.generate_c_headers()
+    files += cg.generate_c_sources()
+
+    for file in files:
+        with open(os.path.join(tmpdir, file.name), 'w') as f:
+            f.write(file.contents)
+
+    cc = os.environ.get('CC', 'gcc')
+    o_file = 'obj.o'
+    subprocess.check_call([cc, '-c', '-o', o_file, files[-1].name], cwd=tmpdir)
+    nm = os.environ.get('NM', 'nm')
+    syms = subprocess.check_output([nm, o_file], cwd=tmpdir, universal_newlines=True)
+    syms_to_check = [
+        'bctf_init',
+        'bctf_my_other_stream_close_packet',
+        'bctf_my_other_stream_open_packet',
+        'bctf_my_other_stream_trace_context_no_payload',
+        'bctf_my_other_stream_trace_evev',
+        'bctf_my_other_stream_trace_my_event',
+        'bctf_my_other_stream_trace_no_context_no_payload',
+        'bctf_my_other_stream_trace_oh_henry_event',
+        'bctf_my_other_stream_trace_this_event',
+        'bctf_my_stream_close_packet',
+        'bctf_my_stream_open_packet',
+        'bctf_my_stream_trace_my_event',
+        'bctf_packet_buf',
+        'bctf_packet_buf_size',
+        'bctf_packet_events_discarded',
+        'bctf_packet_is_empty',
+        'bctf_packet_is_full',
+        'bctf_packet_is_open',
+        'bctf_packet_set_buf',
+        'bctf_packet_size',
+    ]
+
+    for sym in syms_to_check:
+        assert sym in syms
diff --git a/tests/config/yaml/conftest.py b/tests/config/yaml/conftest.py
new file mode 100644 (file)
index 0000000..1c29e8c
--- /dev/null
@@ -0,0 +1,40 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+import pytest
+import os.path
+import barectf
+
+
+@pytest.fixture
+def config_fail_test():
+    def func(request, rel_path):
+        yaml_path = os.path.join(os.path.dirname(request.fspath),
+                                 'configs', 'fail', rel_path) + '.yaml'
+        yaml_dir = os.path.dirname(yaml_path)
+
+        with open(yaml_path) as f:
+            with pytest.raises(barectf._ConfigurationParseError):
+                barectf.configuration_from_file(f, inclusion_directories=[yaml_dir])
+
+    return func
diff --git a/tests/test.bash b/tests/test.bash
deleted file mode 100755 (executable)
index 509f5e1..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env bash
-
-# The MIT License (MIT)
-#
-# Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-test_dirs=(
-  "config/2/fail/clock"
-  "config/2/fail/config"
-  "config/2/fail/event"
-  "config/2/fail/include"
-  "config/2/fail/metadata"
-  "config/2/fail/stream"
-  "config/2/fail/trace"
-  "config/2/fail/type"
-  "config/2/fail/type-enum"
-  "config/2/fail/type-float"
-  "config/2/fail/type-int"
-  "config/2/fail/type-string"
-  "config/2/fail/type-struct"
-  "config/2/fail/yaml"
-  "config/2/pass/everything"
-)
-bats_bin="$(pwd)/bats/bin/bats"
-
-if [ -z "${CC+x}" ]; then
-  # default to gcc
-  export CC=gcc
-fi
-
-"$bats_bin" "${test_dirs[@]}"
diff --git a/tox.ini b/tox.ini
index c47a5c44f272119b63bf7ff112d506cee28b7adb..9b6de43997741008bc8bb82cd2a6dfefb0d1e225 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -12,7 +12,7 @@ passenv = TERM TERMINFO
 changedir = tests
 commands =
     poetry install -v
-    poetry run bash ./test.bash -t
+    poetry run py.test -v .
 
 [testenv:flake8]
 commands =
This page took 0.348587 seconds and 4 git commands to generate.