summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-09-11 18:11:53 +0200
committerMatthias Beyer <mail@beyermatthias.de>2017-09-12 18:06:49 +0200
commit4db260ccd6e0fbd41fcf7aa57b733c2cf5afd15f (patch)
treed290a9ad46acf0fa367313f8c6297cf3eb971d21
parentca08126b9338bdb43a1795d509a3d2d5d4dd38f7 (diff)
Fix in tests: There is no day/month "0" - the minimum value is 1
-rw-r--r--src/timetype.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/timetype.rs b/src/timetype.rs
index 7030c87..ef3aa33 100644
--- a/src/timetype.rs
+++ b/src/timetype.rs
@@ -1926,8 +1926,8 @@ mod test_time_adjustments {
fn test_adjust_times_add_seconds() {
generate_test_add! {
y : 0 => 0;
- mo : 0 => 0;
- d : 0 => 0;
+ mo : 1 => 1;
+ d : 1 => 1;
h : 0 => 0;
m : 0 => 1;
s : 62 => 2;
@@ -1938,8 +1938,8 @@ mod test_time_adjustments {
fn test_adjust_times_add_minutes() {
generate_test_add! {
y : 0 => 0;
- mo : 0 => 0;
- d : 0 => 0;
+ mo : 1 => 1;
+ d : 1 => 1;
h : 0 => 1;
m : 62 => 2;
s : 0 => 0;
@@ -1950,8 +1950,8 @@ mod test_time_adjustments {
fn test_adjust_times_add_hours() {
generate_test_add! {
y : 0 => 0;
- mo : 0 => 0;
- d : 0 => 1;
+ mo : 1 => 1;
+ d : 1 => 2;
h : 26 => 2;
m : 0 => 0;
s : 0 => 0;
@@ -1962,8 +1962,8 @@ mod test_time_adjustments {
fn test_adjust_times_add_days() {
generate_test_add! {
y : 0 => 0;
- mo : 0 => 1;
- d : 32 => 2;
+ mo : 1 => 2;
+ d : 32 => 1;
h : 0 => 0;
m : 0 => 0;
s : 0 => 0;
@@ -1975,7 +1975,7 @@ mod test_time_adjustments {
generate_test_add! {
y : 0 => 1;
mo : 14 => 2;
- d : 0 => 0;
+ d : 1 => 1;
h : 0 => 0;
m : 0 => 0;
s : 0 => 0;
@@ -1986,8 +1986,8 @@ mod test_time_adjustments {
fn test_adjust_times_sub_seconds() {
generate_test_sub! {
y : 1 - 0 => 0;
- mo : 0 - 1 => 11;
- d : 0 - 0 => 0;
+ mo : 1 - 1 => 12;
+ d : 1 - 0 => 1;
h : 0 - 0 => 0;
m : 0 - 0 => 0;
s : 0 - 0 => 0;