Skip to content

Commit

Permalink
Add tests for itoa::Buffer::{clone, default}
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisAntaki committed May 6, 2024
1 parent 945f297 commit e7d65e6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,16 @@ test! {
test_i128_min(i128::min_value(), "-170141183460469231731687303715884105728")
test_i128_max(i128::max_value(), "170141183460469231731687303715884105727")
}

#[test]
fn test_buffer_default() {
let mut buffer = itoa::Buffer::default();
assert_eq!(buffer.format(42), "42");
}

#[test]
fn test_buffer_clone() {
let buffer = itoa::Buffer::new();
let mut buffer = buffer.clone();
assert_eq!(buffer.format(42), "42");
}

0 comments on commit e7d65e6

Please sign in to comment.