-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53ca28f
commit f0924b4
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
meta: | ||
id: valid_fail_in_enum | ||
endian: le | ||
seq: | ||
- id: foo | ||
type: u4 | ||
enum: animal | ||
valid: # there is actually 7 in the file | ||
in-enum: true | ||
enums: | ||
animal: | ||
4: dog | ||
12: chicken |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
id: valid_fail_in_enum | ||
data: enum_0.bin | ||
# NOTE: `s4` is not correct here. It should be the `valid_fail_in_enum::animal` | ||
# enum. However, if we specified it as | ||
# `ValidationNotInEnumError<valid_fail_in_enum::animal>`, KSC would think it's a | ||
# user-defined type and throw an error, because such user type doesn't exist. | ||
# | ||
# The type argument is only relevant to C++, though, so we pass `s4` here just | ||
# to pass something and the generated C++ test specs will have to be fixed | ||
# manually. | ||
exception: ValidationNotInEnumError<s4> |