Be NULL
Behavior is undefined in the context of an array.
The be_null assertion checks if a void pointer is equal to NULL.
Example
#include "awry/awry.h"
typedef struct PersonStruct {
int age;
} Person;
describe("be_null assertion", test_be_null_assertion)
Person fry = { .age = 3000 };
it("can check if null")
expect(NULL) to be_null
end
it("can check if not null")
expect((void*)(&fry)) to not be_null
end
end
int main(void) {
Awry.run();
Awry.clear(&Awry);
return 0;
}
- Previous
- Next