Lines Matching refs:yo_opt
1915 let yo_opt = |y, o| NaiveDate::from_yo_opt(y, o); in test_date_from_yo() localVariable
1918 assert_eq!(yo_opt(2012, 0), None); in test_date_from_yo()
1919 assert_eq!(yo_opt(2012, 1), Some(ymd(2012, 1, 1))); in test_date_from_yo()
1920 assert_eq!(yo_opt(2012, 2), Some(ymd(2012, 1, 2))); in test_date_from_yo()
1921 assert_eq!(yo_opt(2012, 32), Some(ymd(2012, 2, 1))); in test_date_from_yo()
1922 assert_eq!(yo_opt(2012, 60), Some(ymd(2012, 2, 29))); in test_date_from_yo()
1923 assert_eq!(yo_opt(2012, 61), Some(ymd(2012, 3, 1))); in test_date_from_yo()
1924 assert_eq!(yo_opt(2012, 100), Some(ymd(2012, 4, 9))); in test_date_from_yo()
1925 assert_eq!(yo_opt(2012, 200), Some(ymd(2012, 7, 18))); in test_date_from_yo()
1926 assert_eq!(yo_opt(2012, 300), Some(ymd(2012, 10, 26))); in test_date_from_yo()
1927 assert_eq!(yo_opt(2012, 366), Some(ymd(2012, 12, 31))); in test_date_from_yo()
1928 assert_eq!(yo_opt(2012, 367), None); in test_date_from_yo()
1930 assert_eq!(yo_opt(2014, 0), None); in test_date_from_yo()
1931 assert_eq!(yo_opt(2014, 1), Some(ymd(2014, 1, 1))); in test_date_from_yo()
1932 assert_eq!(yo_opt(2014, 2), Some(ymd(2014, 1, 2))); in test_date_from_yo()
1933 assert_eq!(yo_opt(2014, 32), Some(ymd(2014, 2, 1))); in test_date_from_yo()
1934 assert_eq!(yo_opt(2014, 59), Some(ymd(2014, 2, 28))); in test_date_from_yo()
1935 assert_eq!(yo_opt(2014, 60), Some(ymd(2014, 3, 1))); in test_date_from_yo()
1936 assert_eq!(yo_opt(2014, 100), Some(ymd(2014, 4, 10))); in test_date_from_yo()
1937 assert_eq!(yo_opt(2014, 200), Some(ymd(2014, 7, 19))); in test_date_from_yo()
1938 assert_eq!(yo_opt(2014, 300), Some(ymd(2014, 10, 27))); in test_date_from_yo()
1939 assert_eq!(yo_opt(2014, 365), Some(ymd(2014, 12, 31))); in test_date_from_yo()
1940 assert_eq!(yo_opt(2014, 366), None); in test_date_from_yo()