1 /*
2  * Copyright (c) 2024 Abhinav Srivastava
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 #include "_common.h"
7 #ifdef CONFIG_POSIX_API
8 #include <stropts.h>
9 #else
10 #include <zephyr/posix/stropts.h>
11 #endif
12 
13 /**
14  * @brief Test existence and basic functionality of stropts.h
15  *
16  * @see stropts.h
17  */
ZTEST(posix_headers,test_stropts_h)18 ZTEST(posix_headers, test_stropts_h)
19 {
20 	#ifdef CONFIG_POSIX_API
21 	zassert_not_null((void *)putmsg, "putmsg is null");
22 	zassert_not_null((void *)fdetach, "fdetach is null");
23 	zassert_not_null((void *)fattach, "fattach is null");
24 	zassert_not_null((void *)getmsg, "getmsg is null");
25 	zassert_not_null((void *)getpmsg, "getpmsg is null");
26 	zassert_not_null((void *)isastream, "isastream is null");
27 
28 	zassert_true(sizeof(((struct strbuf *)0)->maxlen) > 0, "maxlen size is 0");
29 	zassert_true(sizeof(((struct strbuf *)0)->len) > 0, "len size is 0");
30 	zassert_true(sizeof(((struct strbuf *)0)->buf) > 0, "buf size is 0");
31 	zassert_not_equal(RS_HIPRI, ~RS_HIPRI);
32 	#endif
33 }
34