diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2017-10-09 13:31:57 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2017-10-09 13:31:57 +0200 |
commit | cec6d90bd536a804ba669f2237aa16857e8e407a (patch) | |
tree | b106d9970ba469e26b80838d935d603fc32e294c /src | |
parent | 84c575097f3e57198fe4f20d5e31d605109c2a35 (diff) |
Add another testcase for adding months over year-borders
Diffstat (limited to 'src')
-rw-r--r-- | src/timetype.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/timetype.rs b/src/timetype.rs index e8df4c8..7832d85 100644 --- a/src/timetype.rs +++ b/src/timetype.rs @@ -2271,6 +2271,13 @@ mod moment_plus_amount_tests { amount = TT::months(78); expected = NaiveDate::from_ymd(2006, 7, 1).and_hms(0, 0, 0); } + + generate_test_moment_plus_amount! { + name = test_moment_plus_more_than_one_year_in_months_4; + base = NaiveDate::from_ymd(2000,10,31).and_hms(0, 0, 0); + amount = TT::months(4); + expected = NaiveDate::from_ymd(2001, 3, 1).and_hms(0, 0, 0); + } } #[cfg(test)] |