forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: kconfig: functions: Fix arithmetic typo
Moved the test to a single main file, fixed a typo arithmetric -> arithmetic Signed-off-by: Pieter De Gendt <[email protected]>
- Loading branch information
1 parent
bc4442e
commit 1e6f39e
Showing
3 changed files
with
60 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) 2024 TOKITA Hiroshi | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <string.h> | ||
#include <zephyr/kernel.h> | ||
#include <zephyr/sys/__assert.h> | ||
#include <zephyr/ztest.h> | ||
|
||
ZTEST(test_kconfig_functions, test_arithmetic) | ||
{ | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_ADD_10, 10); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_ADD_10_3, 10 + 3); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_ADD_10_3_2, 10 + 3 + 2); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_SUB_10, 10); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_SUB_10_3, 10 - 3); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_SUB_10_3_2, 10 - 3 - 2); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_MUL_10, 10); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_MUL_10_3, 10 * 3); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_MUL_10_3_2, 10 * 3 * 2); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_DIV_10, 10); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_DIV_10_3, 10 / 3); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_DIV_10_3_2, 10 / 3 / 2); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_MOD_10, 10); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_MOD_10_3, 10 % 3); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_MOD_10_3_2, 10 % 3 % 2); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_INC_1, 1 + 1); | ||
zassert_str_equal(CONFIG_KCONFIG_ARITHMETIC_INC_1_1, "2,2"); | ||
zassert_str_equal(CONFIG_KCONFIG_ARITHMETIC_INC_INC_1_1, "3,3"); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_DEC_1, 1 - 1); | ||
zassert_str_equal(CONFIG_KCONFIG_ARITHMETIC_DEC_1_1, "0,0"); | ||
zassert_str_equal(CONFIG_KCONFIG_ARITHMETIC_DEC_DEC_1_1, "-1,-1"); | ||
zassert_equal(CONFIG_KCONFIG_ARITHMETIC_ADD_INC_1_1, (1 + 1) + (1 + 1)); | ||
} | ||
|
||
ZTEST_SUITE(test_kconfig_functions, NULL, NULL, NULL, NULL, NULL); |