summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-03-12 20:59:38 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-03-13 04:43:51 +0900
commit6bed374280c0c24f3893ced34c66ac0f8d7ca7c0 (patch)
treec0a000d458b6c97c537515fd03b640e79fd003c6 /src
parentbd5770da76ee157d3b31323ed2d22f5d9082bb36 (diff)
downloadsystemd-6bed374280c0c24f3893ced34c66ac0f8d7ca7c0.tar.gz
test: add more testcases for formatting/parsing timestamp
Diffstat (limited to 'src')
-rw-r--r--src/test/test-time-util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test-time-util.c b/src/test/test-time-util.c
index 44eb0d25f6..e5a4cb6515 100644
--- a/src/test/test-time-util.c
+++ b/src/test/test-time-util.c
@@ -407,6 +407,10 @@ static void test_format_timestamp_impl(usec_t x) {
static void test_format_timestamp_loop(void) {
test_format_timestamp_impl(USEC_PER_SEC);
+ test_format_timestamp_impl(USEC_TIMESTAMP_FORMATTABLE_MAX_32BIT-1);
+ test_format_timestamp_impl(USEC_TIMESTAMP_FORMATTABLE_MAX_32BIT);
+ test_format_timestamp_impl(USEC_TIMESTAMP_FORMATTABLE_MAX-1);
+ test_format_timestamp_impl(USEC_TIMESTAMP_FORMATTABLE_MAX);
for (unsigned i = 0; i < TRIAL; i++) {
usec_t x;