diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-01-07 16:43:07 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-01-07 16:43:07 +0100 |
| commit | a524db35ac5c2099671d16318524e277e88631be (patch) | |
| tree | 54b29c42a317b9a13c3049ff85b14f7dce734cf6 /src/tests/test-core-with-expect.c | |
| parent | 6917e28d2d16138d6d497dc96efafe573b4b0979 (diff) | |
| parent | 724bcc5c7be3aed3646ed2b2989c34d438217176 (diff) | |
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream
Diffstat (limited to 'src/tests/test-core-with-expect.c')
| -rw-r--r-- | src/tests/test-core-with-expect.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/tests/test-core-with-expect.c b/src/tests/test-core-with-expect.c index 2d111a41..74e1043b 100644 --- a/src/tests/test-core-with-expect.c +++ b/src/tests/test-core-with-expect.c @@ -1,20 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ /* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * * Copyright (C) 2014 Red Hat, Inc. - * */ #include "nm-default.h" @@ -58,10 +44,13 @@ test_nm_utils_monotonic_timestamp_as_boottime (void) g_assert_cmpint (now_boottime_2, >=, now_boottime); g_assert_cmpint (now_boottime_2 - now_boottime, <=, NM_UTILS_NS_PER_SECOND / 10); + g_assert_cmpint (now, ==, nm_utils_monotonic_timestamp_from_boottime (now_boottime_2, 1)); + for (timestamp_ns_per_tick = 1; timestamp_ns_per_tick <= NM_UTILS_NS_PER_SECOND; timestamp_ns_per_tick *= 10) { now_boottime_3 = nm_utils_monotonic_timestamp_as_boottime (now / timestamp_ns_per_tick, timestamp_ns_per_tick); g_assert_cmpint (now_boottime_2 / timestamp_ns_per_tick, ==, now_boottime_3); + g_assert_cmpint (now / timestamp_ns_per_tick, ==, nm_utils_monotonic_timestamp_from_boottime (now_boottime_3, timestamp_ns_per_tick)); } } } |