diff options
Diffstat (limited to 'tests/lib.rs')
-rw-r--r-- | tests/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib.rs b/tests/lib.rs index 8e097de..9add6e3 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -10,6 +10,17 @@ fn test_u16() { } #[test] +fn generic_error_can_bail() { + use yaxpeax_arch::{Arch, Decoder, Reader}; + + #[allow(dead_code)] + fn decode<A: Arch, U: Into<impl Reader<A::Address, A::Word>>>(data: U, decoder: &A::Decoder) -> anyhow::Result<()> { + let mut reader = data.into(); + decoder.decode(&mut reader)?; + Ok(()) + } +} +#[test] fn error_can_bail() { use yaxpeax_arch::{Arch, AddressDiff, Decoder, Reader, LengthedInstruction, Instruction, StandardDecodeError, U8Reader}; struct TestIsa {} |