zephyr/tests/unit/time_units/main.c
Chris Friedt 74c9c0e7a3 tests: time_units: check for overflow in z_tmcvt intermediate
Prior to #41602, due to the ordering of operations (first mul,
then div), an intermediate value would overflow, resulting in
a time non-linearity.

This test ensures that time rolls-over properly.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-12-19 09:36:38 +00:00

10 lines
155 B
C

/*
* Copyright 2022 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/ztest.h>
ZTEST_SUITE(time_units, NULL, NULL, NULL, NULL, NULL);