X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftest-classifier.c;h=48eb8de5b147083b528b052f6ebbc5e7364df1af;hb=3d91d9094dcf49c210bd4ebae4bd1e0cea9defce;hp=10b196757176b7be6c4074c72980617c0f9bceb9;hpb=eadd16449c6e5292603cf009d29ab0e249979717;p=sliver-openvswitch.git diff --git a/tests/test-classifier.c b/tests/test-classifier.c index 10b196757..48eb8de5b 100644 --- a/tests/test-classifier.c +++ b/tests/test-classifier.c @@ -26,7 +26,6 @@ */ #include -#include "classifier.h" #include #include #include "byte-order.h" @@ -40,6 +39,11 @@ #undef NDEBUG #include +/* We need access to classifier internal definitions to be able to fully + * test them. The alternative would be to expose them all in the classifier + * API. */ +#include "classifier.c" + /* Fields in a rule. */ #define CLS_FIELDS \ /* struct flow all-caps */ \ @@ -1203,7 +1207,8 @@ test_miniflow(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) /* Check that the flow equals its miniflow. */ assert(miniflow_get_vid(&miniflow) == vlan_tci_to_vid(flow.vlan_tci)); for (i = 0; i < FLOW_U32S; i++) { - assert(miniflow_get(&miniflow, i) == flow_u32[i]); + assert(MINIFLOW_GET_TYPE(&miniflow, uint32_t, i * 4) + == flow_u32[i]); } /* Check that the miniflow equals itself. */