diff options
author | TA Thanh Dinh <tathanhdinh@gmail.com> | 2018-09-21 17:38:10 +0200 |
---|---|---|
committer | Ta Thanh Dinh <tathanhdinh@gmail.com> | 2018-09-22 18:08:16 +0200 |
commit | f9b2007ecd830adec8d98a25bcc2f84c104076ac (patch) | |
tree | 8b2fb66056d5cf09a9301f10de1125dd6770caec /tests/headers/ord-enum.h | |
parent | 6fc0a31febb63d77da1a38aa2eea9d10fbea0d0d (diff) |
PartialOrd and Ord for enum
Diffstat (limited to 'tests/headers/ord-enum.h')
-rw-r--r-- | tests/headers/ord-enum.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/headers/ord-enum.h b/tests/headers/ord-enum.h new file mode 100644 index 00000000..364f711e --- /dev/null +++ b/tests/headers/ord-enum.h @@ -0,0 +1,15 @@ +// bindgen-flags: --rustified-enum * --with-derive-ord + +enum A { + A0 = 0, + A1 = 1, + A2 = 2, + A3 = A0 - 1, +}; + +enum B { + B0 = 1, + B1 = B0 + 3, + B2 = B0 + 2, + B3 = B0 - 2, +};
\ No newline at end of file |