blob: c38b756eda525502bcf64646bc67f1494e02966d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* 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 <inttypes.h>
#include <zephyr/ztest.h>
#include "math.h"
#include "math_util.h"
ZTEST_USER(math, bitmask_uint64)
{
zassert_equal(bitmask_uint64(-1), 0);
zassert_equal(bitmask_uint64(64), 0);
zassert_equal(bitmask_uint64(1), UINT64_C(1) << 1);
zassert_equal(bitmask_uint64(15), UINT64_C(1) << 15);
zassert_equal(bitmask_uint64(35), UINT64_C(1) << 35);
zassert_equal(bitmask_uint64(60), UINT64_C(1) << 60);
}
|