frenetic-lang/ocaml-openflow — pull request #3 by seliopou (2013-10-10 15:29:34+00:00)
Title: QuickCheck experiment

This pull requests includes QuickCheck tests for the OpenFlow0x01.Wildcards module. During the course of implementing the tests, I found that the `nw_src` and `nw_dst` have type `int` but those should be `unit`, if OCaml had such a type.

Some questions:

* Is it worth going doing roudtrip testing with QuickCheck for all the serializable types in this package?
* A subordinate question: Doing so requires exposing currently private functions (i.e., `marshal` and `parse`). Is this acceptable?
* Where should QuickCheck "instances" reside? Separate from the module providing the datatype requires that the datatype no longer be abstract.

For my perspective, the answer to these questions are: yes, yes, and it should go in the module where the datatype is defined.