Add tests for operator/()
This commit is contained in:
1 parent
27ebc9dc44
commit
12e6d38bba
23 files changed
+730
No files matched your search
@@ -147,13 +147,17 @@ main()
|
||||
using namespace date;
|
||||
|
||||
constexpr year_month_weekday ymdl1 = {2015_y, aug, weekday_indexed{fri, 2}};
|
||||
#if __cplusplus >= 201402
|
||||
static_assert(ymdl1.ok(), "");
|
||||
#endif
|
||||
static_assert(ymdl1.year() == 2015_y, "");
|
||||
static_assert(ymdl1.month() == aug, "");
|
||||
static_assert(ymdl1.weekday_indexed() == fri[2], "");
|
||||
#if __cplusplus >= 201402
|
||||
constexpr day_point dp = ymdl1;
|
||||
constexpr year_month_day ymd = dp;
|
||||
static_assert(ymd == 2015_y/aug/14, "");
|
||||
#endif
|
||||
|
||||
constexpr year_month_weekday ymdl2 = sat[1]/aug/2015;
|
||||
|
||||
|
||||
Reference in new issue
Block a user