Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
23
third-party/vendor/bitflags/src/tests/empty.rs
vendored
Normal file
23
third-party/vendor/bitflags/src/tests/empty.rs
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
use super::*;
|
||||
|
||||
use crate::Flags;
|
||||
|
||||
#[test]
|
||||
fn cases() {
|
||||
case(0, TestFlags::empty);
|
||||
|
||||
case(0, TestZero::empty);
|
||||
|
||||
case(0, TestEmpty::empty);
|
||||
|
||||
case(0, TestExternal::empty);
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
fn case<T: Flags>(expected: T::Bits, inherent: impl FnOnce() -> T)
|
||||
where
|
||||
<T as Flags>::Bits: std::fmt::Debug + PartialEq,
|
||||
{
|
||||
assert_eq!(expected, inherent().bits(), "T::empty()");
|
||||
assert_eq!(expected, T::empty().bits(), "Flags::empty()");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue