@@ -77,13 +77,15 @@ void Test_BinSem(void)
7777 char long_name [OS_MAX_API_NAME + 1 ];
7878 OS_bin_sem_prop_t sem_prop ;
7979 uint32 test_val ;
80- bool get_info_implemented ;
80+ bool get_value_implemented ;
8181
8282 memset (& sem_prop , 0 , sizeof (sem_prop ));
8383 memset (task_counter , 0 , sizeof (task_counter ));
8484
8585 /* Invalid id checks */
86- UtAssert_INT32_EQ (OS_BinSemGetInfo (OS_OBJECT_ID_UNDEFINED , & sem_prop ), OS_ERR_INVALID_ID );
86+ UtAssert_INT32_EQ (OS_BinSemGetName (OS_OBJECT_ID_UNDEFINED , & sem_prop ), OS_ERR_INVALID_ID );
87+ UtAssert_INT32_EQ (OS_BinSemGetCreator (OS_OBJECT_ID_UNDEFINED , & sem_prop ), OS_ERR_INVALID_ID );
88+ UtAssert_INT32_EQ (OS_BinSemGetValue (OS_OBJECT_ID_UNDEFINED , & sem_prop ), OS_ERR_INVALID_ID );
8789 UtAssert_INT32_EQ (OS_BinSemFlush (OS_OBJECT_ID_UNDEFINED ), OS_ERR_INVALID_ID );
8890 UtAssert_INT32_EQ (OS_BinSemGive (OS_OBJECT_ID_UNDEFINED ), OS_ERR_INVALID_ID );
8991 UtAssert_INT32_EQ (OS_BinSemTake (OS_OBJECT_ID_UNDEFINED ), OS_ERR_INVALID_ID );
@@ -93,7 +95,9 @@ void Test_BinSem(void)
9395 /* Null checks */
9496 UtAssert_INT32_EQ (OS_BinSemCreate (NULL , "Test_Sem" , 0 , 0 ), OS_INVALID_POINTER );
9597 UtAssert_INT32_EQ (OS_BinSemCreate (& sem_id [0 ], NULL , 0 , 0 ), OS_INVALID_POINTER );
96- UtAssert_INT32_EQ (OS_BinSemGetInfo (sem_id [0 ], NULL ), OS_INVALID_POINTER );
98+ UtAssert_INT32_EQ (OS_BinSemGetName (sem_id [0 ], NULL ), OS_INVALID_POINTER );
99+ UtAssert_INT32_EQ (OS_BinSemGetCreator (sem_id [0 ], NULL ), OS_INVALID_POINTER );
100+ UtAssert_INT32_EQ (OS_BinSemGetValue (sem_id [0 ], NULL ), OS_INVALID_POINTER );
97101 UtAssert_INT32_EQ (OS_BinSemGetIdByName (NULL , "Test_Sem" ), OS_INVALID_POINTER );
98102 UtAssert_INT32_EQ (OS_BinSemGetIdByName (& sem_id [0 ], NULL ), OS_INVALID_POINTER );
99103
@@ -109,15 +113,15 @@ void Test_BinSem(void)
109113 /* Nonzero create */
110114 UtAssert_INT32_EQ (OS_BinSemCreate (& sem_id [1 ], "Test_Sem_Nonzero" , 1 , 0 ), OS_SUCCESS );
111115
112- /* Check get info implementation */
113- get_info_implemented = (OS_BinSemGetInfo (sem_id [0 ], & sem_prop ) != OS_ERR_NOT_IMPLEMENTED );
116+ /* Check get value implementation */
117+ get_value_implemented = (OS_BinSemGetValue (sem_id [0 ], & sem_prop ) != OS_ERR_NOT_IMPLEMENTED );
114118
115119 /* Validate values */
116- if (get_info_implemented )
120+ if (get_value_implemented )
117121 {
118- UtAssert_INT32_EQ (OS_BinSemGetInfo (sem_id [0 ], & sem_prop ), OS_SUCCESS );
122+ UtAssert_INT32_EQ (OS_BinSemGetValue (sem_id [0 ], & sem_prop ), OS_SUCCESS );
119123 UtAssert_INT32_EQ (sem_prop .value , 0 );
120- UtAssert_INT32_EQ (OS_BinSemGetInfo (sem_id [1 ], & sem_prop ), OS_SUCCESS );
124+ UtAssert_INT32_EQ (OS_BinSemGetValue (sem_id [1 ], & sem_prop ), OS_SUCCESS );
121125 UtAssert_INT32_EQ (sem_prop .value , 1 );
122126 }
123127
@@ -141,11 +145,11 @@ void Test_BinSem(void)
141145 UtAssert_INT32_EQ (OS_BinSemTimedWait (sem_id [1 ], 0 ), OS_SUCCESS );
142146
143147 /* Validate zeros */
144- if (get_info_implemented )
148+ if (get_value_implemented )
145149 {
146- UtAssert_INT32_EQ (OS_BinSemGetInfo (sem_id [0 ], & sem_prop ), OS_SUCCESS );
150+ UtAssert_INT32_EQ (OS_BinSemGetValue (sem_id [0 ], & sem_prop ), OS_SUCCESS );
147151 UtAssert_INT32_EQ (sem_prop .value , 0 );
148- UtAssert_INT32_EQ (OS_BinSemGetInfo (sem_id [1 ], & sem_prop ), OS_SUCCESS );
152+ UtAssert_INT32_EQ (OS_BinSemGetValue (sem_id [1 ], & sem_prop ), OS_SUCCESS );
149153 UtAssert_INT32_EQ (sem_prop .value , 0 );
150154 }
151155 else
@@ -162,9 +166,9 @@ void Test_BinSem(void)
162166 UtAssert_INT32_EQ (OS_TaskDelete (task_id [0 ]), OS_SUCCESS );
163167 UtAssert_UINT32_EQ (task_counter [0 ], 0 );
164168
165- if (get_info_implemented )
169+ if (get_value_implemented )
166170 {
167- UtAssert_INT32_EQ (OS_BinSemGetInfo (sem_id [0 ], & sem_prop ), OS_SUCCESS );
171+ UtAssert_INT32_EQ (OS_BinSemGetValue (sem_id [0 ], & sem_prop ), OS_SUCCESS );
168172 UtAssert_INT32_EQ (sem_prop .value , 0 );
169173 }
170174 else
0 commit comments