25 lines
414 B
Rust
25 lines
414 B
Rust
|
#[cfg(test)]
|
||
|
mod examples {
|
||
|
use day30::max_value;
|
||
|
|
||
|
#[test]
|
||
|
fn example1() {
|
||
|
assert_eq!(max_value(276, '3'), Ok(3276));
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example2() {
|
||
|
assert_eq!(max_value(-999, '4'), Ok(-4999));
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example3() {
|
||
|
assert_eq!(max_value(0, '3'), Ok(30));
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn example4() {
|
||
|
assert_eq!(max_value(860, '7'), Ok(8760));
|
||
|
}
|
||
|
}
|