| 1 | use leb128rust-analyzer cargo leb128 0.2.5 crate/; |
| 2 | use quickcheckrust-analyzer cargo quickcheck 1.1.0 crate/; |
| 3 | |
| 4 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/; |
| 5 | |
| 6 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 7 | fn can_write_any_unsigned_intrust-analyzer cargo leb128 0.2.5 can_write_any_unsigned_int().() { |
| 8 | fn frust-analyzer cargo leb128 0.2.5 f().(x: u64) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<()> { |
| 9 | let mut v = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![]; |
| 10 | leb128rust-analyzer cargo leb128 0.2.5 crate/::writerust-analyzer cargo leb128 0.2.5 write/::unsignedrust-analyzer cargo leb128 0.2.5 write/unsigned().(&mut v, x)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 11 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 12 | } |
| 13 | quickcheckrust-analyzer cargo quickcheck 1.1.0 crate/::quickcheckrust-analyzer cargo quickcheck 1.1.0 tester/quickcheck().(frust-analyzer cargo leb128 0.2.5 f(). as fn(u64) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<()>); |
| 14 | } |
| 15 | |
| 16 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 17 | fn can_round_trip_any_unsigned_intrust-analyzer cargo leb128 0.2.5 can_round_trip_any_unsigned_int().() { |
| 18 | fn frust-analyzer cargo leb128 0.2.5 f().(x: u64) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<bool> { |
| 19 | let mut v = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![]; |
| 20 | leb128rust-analyzer cargo leb128 0.2.5 crate/::writerust-analyzer cargo leb128 0.2.5 write/::unsignedrust-analyzer cargo leb128 0.2.5 write/unsigned().(&mut v, x)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 21 | let y = leb128rust-analyzer cargo leb128 0.2.5 crate/::readrust-analyzer cargo leb128 0.2.5 read/::unsignedrust-analyzer cargo leb128 0.2.5 read/unsigned().(&mut &v[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFull#]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().) |
| 22 | .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]new().(iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::Otherrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#Other#, e))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 23 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq().y) |
| 24 | } |
| 25 | quickcheckrust-analyzer cargo quickcheck 1.1.0 crate/::quickcheckrust-analyzer cargo quickcheck 1.1.0 tester/quickcheck().(frust-analyzer cargo leb128 0.2.5 f(). as fn(u64) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<bool>); |
| 26 | } |
| 27 | |
| 28 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 29 | fn can_write_any_signed_intrust-analyzer cargo leb128 0.2.5 can_write_any_signed_int().() { |
| 30 | fn frust-analyzer cargo leb128 0.2.5 f().(x: i64) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<()> { |
| 31 | let mut v = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![]; |
| 32 | leb128rust-analyzer cargo leb128 0.2.5 crate/::writerust-analyzer cargo leb128 0.2.5 write/::signedrust-analyzer cargo leb128 0.2.5 write/signed().(&mut v, x)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 33 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 34 | } |
| 35 | quickcheckrust-analyzer cargo quickcheck 1.1.0 crate/::quickcheckrust-analyzer cargo quickcheck 1.1.0 tester/quickcheck().(frust-analyzer cargo leb128 0.2.5 f(). as fn(i64) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<()>); |
| 36 | } |
| 37 | |
| 38 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 39 | fn can_round_trip_any_signed_intrust-analyzer cargo leb128 0.2.5 can_round_trip_any_signed_int().() { |
| 40 | fn frust-analyzer cargo leb128 0.2.5 f().(x: i64) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<bool> { |
| 41 | let mut v = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![]; |
| 42 | leb128rust-analyzer cargo leb128 0.2.5 crate/::writerust-analyzer cargo leb128 0.2.5 write/::signedrust-analyzer cargo leb128 0.2.5 write/signed().(&mut v, x)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 43 | let y = leb128rust-analyzer cargo leb128 0.2.5 crate/::readrust-analyzer cargo leb128 0.2.5 read/::signedrust-analyzer cargo leb128 0.2.5 read/signed().(&mut &v[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFull#]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().) |
| 44 | .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]new().(iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::Otherrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#Other#, e))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 45 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialEq<Self>`]eq().y) |
| 46 | } |
| 47 | quickcheckrust-analyzer cargo quickcheck 1.1.0 crate/::quickcheckrust-analyzer cargo quickcheck 1.1.0 tester/quickcheck().(frust-analyzer cargo leb128 0.2.5 f(). as fn(i64) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<bool>); |
| 48 | } |