1
0
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:
Falk Werner
2019-04-25 20:08:34 +02:00
committed by GitHub
parent f4180224b2
commit a717248e80
6 changed files with 19 additions and 11 deletions

View File

@@ -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));
}