format-bytes 0.1.5

A macro to format bytestrings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Simple test where compiler error reporting is nicer than in doctests.

use format_bytes::format_bytes;

#[test]
fn smoke_test() {
    // Exercise different code paths of the proc macro
    assert_eq!(format_bytes!(b""), b"");
    assert_eq!(format_bytes!(b"foo"), b"foo");
    assert_eq!(format_bytes!(b"{}", b"foo"), b"foo");
    assert_eq!(format_bytes!(b"f{}", b"oo"), b"foo");
    assert_eq!(format_bytes!(b"{}oo", b"f"), b"foo");
}