mirror of
https://github.com/HowardHinnant/date.git
synced 2025-01-14 01:37:57 +08:00
Clean up time_of_day tests.
* Don't assume int64_t is the rep in the predefined chrono durations.
This commit is contained in:
parent
9e1120c676
commit
d110f07f59
@ -57,7 +57,7 @@ main()
|
||||
|
||||
using tod = time_of_day<hours>;
|
||||
|
||||
static_assert(is_same<tod::precision, hours>{}, "");
|
||||
static_assert(is_same<tod::precision::period, hours::period>{}, "");
|
||||
|
||||
static_assert( is_trivially_destructible<tod>{}, "");
|
||||
static_assert( is_default_constructible<tod>{}, "");
|
||||
@ -68,7 +68,6 @@ main()
|
||||
|
||||
static_assert(is_nothrow_constructible<tod, hours>{}, "");
|
||||
static_assert(!is_convertible<hours, tod>{}, "");
|
||||
static_assert(is_nothrow_constructible<tod, hours, unsigned>{}, "");
|
||||
|
||||
static_assert(is_nothrow_constructible<tod::precision, tod>{}, "");
|
||||
static_assert(!is_convertible<tod, tod::precision>{}, "");
|
||||
|
@ -65,7 +65,7 @@ main()
|
||||
|
||||
using tod = time_of_day<milliseconds>;
|
||||
|
||||
static_assert(is_same<tod::precision, milliseconds>{}, "");
|
||||
static_assert(is_same<tod::precision::period, milliseconds::period>{}, "");
|
||||
|
||||
static_assert( is_trivially_destructible<tod>{}, "");
|
||||
static_assert( is_default_constructible<tod>{}, "");
|
||||
@ -76,8 +76,6 @@ main()
|
||||
|
||||
static_assert(is_nothrow_constructible<tod, milliseconds>{}, "");
|
||||
static_assert(!is_convertible<milliseconds, tod>{}, "");
|
||||
static_assert(is_nothrow_constructible<tod, hours, minutes, seconds, milliseconds,
|
||||
unsigned>{}, "");
|
||||
|
||||
static_assert(is_nothrow_constructible<tod::precision, tod>{}, "");
|
||||
static_assert(!is_convertible<tod, tod::precision>{}, "");
|
||||
|
@ -59,7 +59,7 @@ main()
|
||||
|
||||
using tod = time_of_day<minutes>;
|
||||
|
||||
static_assert(is_same<tod::precision, minutes>{}, "");
|
||||
static_assert(is_same<tod::precision::period, minutes::period>{}, "");
|
||||
|
||||
static_assert( is_trivially_destructible<tod>{}, "");
|
||||
static_assert( is_default_constructible<tod>{}, "");
|
||||
@ -70,7 +70,6 @@ main()
|
||||
|
||||
static_assert(is_nothrow_constructible<tod, minutes>{}, "");
|
||||
static_assert(!is_convertible<minutes, tod>{}, "");
|
||||
static_assert(is_nothrow_constructible<tod, hours, minutes, unsigned>{}, "");
|
||||
|
||||
static_assert(is_nothrow_constructible<tod::precision, tod>{}, "");
|
||||
static_assert(!is_convertible<tod, tod::precision>{}, "");
|
||||
|
@ -65,7 +65,7 @@ main()
|
||||
|
||||
using tod = time_of_day<nanoseconds>;
|
||||
|
||||
static_assert(is_same<tod::precision, nanoseconds>{}, "");
|
||||
static_assert(is_same<tod::precision::period, nanoseconds::period>{}, "");
|
||||
|
||||
static_assert( is_trivially_destructible<tod>{}, "");
|
||||
static_assert( is_default_constructible<tod>{}, "");
|
||||
@ -76,8 +76,6 @@ main()
|
||||
|
||||
static_assert(is_nothrow_constructible<tod, nanoseconds>{}, "");
|
||||
static_assert(!is_convertible<nanoseconds, tod>{}, "");
|
||||
static_assert(is_nothrow_constructible<tod, hours, minutes, seconds, nanoseconds,
|
||||
unsigned>{}, "");
|
||||
|
||||
static_assert(is_nothrow_constructible<tod::precision, tod>{}, "");
|
||||
static_assert(!is_convertible<tod, tod::precision>{}, "");
|
||||
|
@ -60,7 +60,7 @@ main()
|
||||
|
||||
using tod = time_of_day<seconds>;
|
||||
|
||||
static_assert(is_same<tod::precision, seconds>{}, "");
|
||||
static_assert(is_same<tod::precision::period, seconds::period>{}, "");
|
||||
|
||||
static_assert( is_trivially_destructible<tod>{}, "");
|
||||
static_assert( is_default_constructible<tod>{}, "");
|
||||
@ -71,7 +71,6 @@ main()
|
||||
|
||||
static_assert(is_nothrow_constructible<tod, seconds>{}, "");
|
||||
static_assert(!is_convertible<seconds, tod>{}, "");
|
||||
static_assert(is_nothrow_constructible<tod, hours, minutes, seconds, unsigned>{}, "");
|
||||
|
||||
static_assert(is_nothrow_constructible<tod::precision, tod>{}, "");
|
||||
static_assert(!is_convertible<tod, tod::precision>{}, "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user