https://github.com/nikvolf/inhex
Indented hex strings for your test data
https://github.com/nikvolf/inhex
Last synced: 7 months ago
JSON representation
Indented hex strings for your test data
- Host: GitHub
- URL: https://github.com/nikvolf/inhex
- Owner: NikVolf
- License: apache-2.0
- Created: 2019-10-03T06:48:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-03T07:13:45.000Z (over 6 years ago)
- Last Synced: 2025-10-25T03:55:24.803Z (8 months ago)
- Language: Rust
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# inhex
Indented hex strings for your test data
## Usage
Add to Cargo.toml
```toml
[dev-dependencies]
inhex = "0.1"
```
and use hex data in your tests:
```rust
#[test]
fn test_data() {
let data: Vec = inhex::inhex!("
0efd
5f74
");
assert_eq!(&data[..], &[0x0e, 0xfd, 0x5f, 0x74][..]);
}
```
# License
`inhex` is primarily distributed under the terms of both the MIT
license and the Apache License (Version 2.0), at your choice.
See LICENSE-APACHE, and LICENSE-MIT for details.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in inhex by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.