-
Notifications
You must be signed in to change notification settings - Fork 955
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tomas/more-tests' (#3704)
* tomas/more-tests: ci: run integration tests with coverage make: add `test-unit-with-coverage` tests: remove "integration" feature codecov: ignore more utils & testing code test/core/masp: test basics test/core/ibc: add basic unit tests core: remove `ByteBuf` and re-export `HEXLOWER` and `HEXUPPER`
- Loading branch information
Showing
18 changed files
with
235 additions
and
109 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
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
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
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
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
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
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 |
---|---|---|
@@ -1,24 +1,3 @@ | ||
//! A helper module for dealing with bytes | ||
//! Bytes hex formatting | ||
|
||
use std::fmt::Display; | ||
|
||
/// A helper to show bytes in hex | ||
pub struct ByteBuf<'a>(pub &'a [u8]); | ||
|
||
impl<'a> std::fmt::LowerHex for ByteBuf<'a> { | ||
fn fmt( | ||
&self, | ||
f: &mut std::fmt::Formatter<'_>, | ||
) -> std::result::Result<(), std::fmt::Error> { | ||
for byte in self.0 { | ||
f.write_fmt(format_args!("{:02x}", byte))?; | ||
} | ||
Ok(()) | ||
} | ||
} | ||
|
||
impl<'a> Display for ByteBuf<'a> { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
write!(f, "{:x}", self) | ||
} | ||
} | ||
pub use data_encoding::{HEXLOWER, HEXUPPER}; |
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
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
Oops, something went wrong.