blob: a76567b9d77a3fc585e3932ce75c3a90f5bd6ac9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/* Copyright 2022 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <zephyr/ztest.h>
#include "math.h"
#include "math_util.h"
ZTEST_USER(math, int_sqrtf_negative)
{
zassert_equal(int_sqrtf(-100), 0);
}
ZTEST_USER(math, int_sqrtf_overflow)
{
zassert_equal(int_sqrtf(INT64_MAX), INT32_MAX);
}
|