mirror of
https://github.com/falk-werner/webfuse-provider
synced 2026-03-02 04:09:18 +00:00
chore(WF_CONTAINER_OF): makes WF_CONTAINER_OF use typeof, if available (#26)
* makes WF_CONTAINER_OF use typeof, if available * convertss WF_CONTAINER_OF to lower case * fixes include guard
This commit is contained in:
@@ -17,7 +17,7 @@ TEST(ContainerOf, FirstMember)
|
||||
MyStruct my_struct = {23, 42};
|
||||
|
||||
int * first = &my_struct.first;
|
||||
ASSERT_EQ(&my_struct, WF_CONTAINER_OF(first, MyStruct, first));
|
||||
ASSERT_EQ(&my_struct, wf_container_of(first, MyStruct, first));
|
||||
}
|
||||
|
||||
TEST(ContainerOf, SecondMember)
|
||||
@@ -25,5 +25,5 @@ TEST(ContainerOf, SecondMember)
|
||||
MyStruct my_struct = {23, 42};
|
||||
|
||||
int * second = &my_struct.second;
|
||||
ASSERT_EQ(&my_struct, WF_CONTAINER_OF(second, MyStruct, second));
|
||||
ASSERT_EQ(&my_struct, wf_container_of(second, MyStruct, second));
|
||||
}
|
||||
Reference in New Issue
Block a user