Please have a look at the below functions. If the pointer is not a NULL, then this evaluates to pass otherwise fail.Ī separate set of functions are available for signed, unsigned integers that too for all sizes. If the pointer is NULL, then this evaluates to pass otherwise fail. This function is another way of TEST_ASSERT_FALSE If the condition is false, then this evaluates to pass otherwise fail. This function is another way of TEST_ASSERT_TRUE If the condition is true, then this evaluates to pass otherwise fail. These are the functions used to validate the boolean condition. TEST_ASSERT_XXX Functions Validating Boolean There are many TEST_ASSERT functions are available in the Unity framework, which is used to validate the values. Unity provides a framework to easily organize and execute those assertions in test code separate from your source code. Unity is simply a rich collection of assertions you can use to establish whether your source code behaves the way you think it does. In this tutorial, we are going to discuss –īefore doing anything, we have to know about unity and its APIs. I would recommend you to explore the relevant topics by using the below link. Unit testing in Embedded C using Unity Prerequisites
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |