mirror of https://gitlab.freedesktop.org/mesa/mesa
util: Remove usage of designated initializers in timespec_test.cpp
As the default option for msvc 2019 does support designated initializers ``` ../src/util/tests/timespec_test.cpp(302): error C7555: use of designated initializers requires at least '/std:c++20' ../src/util/tests/timespec_test.cpp(303): error C7555: use of designated initializers requires at least '/std:c++20' ../src/util/tests/timespec_test.cpp(312): error C7555: use of designated initializers requires at least '/std:c++20' ../src/util/tests/timespec_test.cpp(313): error C7555: use of designated initializers requires at least '/std:c++20' ``` Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
This commit is contained in:
parent
672a93cd6d
commit
5abf590c71
|
@ -298,8 +298,8 @@ TEST(timespec_test, timespec_from_proto)
|
|||
TEST(timespec_test, timespec_is_zero)
|
||||
{
|
||||
struct timespec zero = { 0 };
|
||||
struct timespec non_zero_sec = { .tv_sec = 1, .tv_nsec = 0 };
|
||||
struct timespec non_zero_nsec = { .tv_sec = 0, .tv_nsec = 1 };
|
||||
struct timespec non_zero_sec = { 1, 0 };
|
||||
struct timespec non_zero_nsec = { 0, 1 };
|
||||
|
||||
EXPECT_TRUE(timespec_is_zero(&zero));
|
||||
EXPECT_FALSE(timespec_is_zero(&non_zero_nsec));
|
||||
|
@ -308,8 +308,8 @@ TEST(timespec_test, timespec_is_zero)
|
|||
|
||||
TEST(timespec_test, timespec_eq)
|
||||
{
|
||||
struct timespec a = { .tv_sec = 2, .tv_nsec = 1 };
|
||||
struct timespec b = { .tv_sec = -1, .tv_nsec = 2 };
|
||||
struct timespec a = { 2, 1 };
|
||||
struct timespec b = { -1, 2 };
|
||||
|
||||
EXPECT_TRUE(timespec_eq(&a, &a));
|
||||
EXPECT_TRUE(timespec_eq(&b, &b));
|
||||
|
|
Loading…
Reference in New Issue