1 /* 2 * Arm SCP/MCP Software 3 * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 #include <fwk_macros.h> 9 #include <fwk_ring.h> 10 #include <fwk_test.h> 11 12 #include <assert.h> 13 test_fwk_ring_init(void)14static void test_fwk_ring_init(void) 15 { 16 char storage[4]; 17 18 struct fwk_ring ring; 19 20 fwk_ring_init(&ring, storage, sizeof(storage)); 21 22 assert(fwk_ring_get_capacity(&ring) == sizeof(storage)); 23 assert(fwk_ring_get_length(&ring) == 0); 24 } 25 26 static const struct fwk_test_case_desc test_case_table[] = { 27 FWK_TEST_CASE(test_fwk_ring_init), 28 }; 29 30 struct fwk_test_suite_desc test_suite = { 31 .name = "fwk_ring_init", 32 33 .test_case_count = FWK_ARRAY_SIZE(test_case_table), 34 .test_case_table = test_case_table, 35 }; 36