diff options
Diffstat (limited to 'zephyr/test/crc/main.c')
-rw-r--r-- | zephyr/test/crc/main.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/zephyr/test/crc/main.c b/zephyr/test/crc/main.c index 50f7be79a0..0b13970d83 100644 --- a/zephyr/test/crc/main.c +++ b/zephyr/test/crc/main.c @@ -1,15 +1,16 @@ -/* Copyright 2020 The Chromium OS Authors. All rights reserved. +/* Copyright 2020 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/kernel.h> -#include <ztest.h> +#include <zephyr/ztest_assert.h> +#include <zephyr/ztest_test_new.h> #include "crc8.h" -/* Note this test makes the pure platform/ec test that uses the same value */ -static void test_crc8_known_data(void) +ZTEST_SUITE(crc_driver, NULL, NULL, NULL, NULL, NULL); + +ZTEST(crc_driver, test_crc8_known_data) { uint8_t buffer[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 8 }; @@ -18,10 +19,3 @@ static void test_crc8_known_data(void) /* Verifies polynomial values of 0x07 representing x^8 + x^2 + x + 1 */ zassert_equal(crc, 170, "CRC8 hash did not match"); } - -void test_main(void) -{ - ztest_test_suite(test_task_shim, - ztest_unit_test(test_crc8_known_data)); - ztest_run_test_suite(test_task_shim); -} |