Add tests for 12h PM hours

pull/4/head
Diego Barrios Romero 2018-10-28 13:15:18 +01:00
parent 2ff917a5f0
commit d8e56f8694
1 changed files with 16 additions and 0 deletions

View File

@ -79,3 +79,19 @@ mod hours_12h_am {
set_invalid_param_test!(set_hours, Hours::AM(13));
}
}
mod hours_12h_pm {
use super::*;
get_param_test!(get_hours, HOURS, Hours::PM(12), 0b0111_0010);
set_param_test!(set_hours, HOURS, Hours::PM(12), 0b0111_0010);
mod too_small {
use super::*;
set_invalid_param_test!(set_hours, Hours::PM(0));
}
mod too_big {
use super::*;
set_invalid_param_test!(set_hours, Hours::PM(13));
}
}