-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QuickCheck experiment #3
Conversation
On Thu, Oct 10, 2013 at 11:29 AM, Spiros Eliopoulos <
I agree. I don't know what unit test Best Practices (TM) are, but this
|
Yep that was a typo. I meant Are the OpenFlow0x04 datatypes completely independent from OpenFlow0x01? Arbitrary instances do tend to build on top of each other, but if they're independent I'll start looking at OpenFlow0x04 sooner rather than later. I envision having just the arbitrary instance in the module where the datatype was defined, exposing |
On Thu, Oct 10, 2013 at 12:34 PM, Spiros Eliopoulos <
Not quite sure what you mean by arbitrary instances, but OpenFlow0x04
|
Small correction: I suggest not prioritizing 0x04 over 0x01 (Mark's paper -N On Thu, Oct 10, 2013 at 12:34 PM, Spiros Eliopoulos <
|
On Thu, Oct 10, 2013 at 12:44 PM, Nate Foster notifications@github.comwrote:
True, but OpenFlow0x01 has been fairly stable for a while now, right? While |
As per the discussion on #3, arbitrary instances will reside in the module where the datatype it's testing resides. Because of this, the quickcheck library is now a dependency for the openflow library, as well as the test suite.
@@ -20,7 +20,8 @@ Library openflow | |||
cstruct, | |||
cstruct.syntax, | |||
lwt.syntax, | |||
packet | |||
packet, | |||
quickcheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend making this an optional dependency, by creating an openflow.quickcheck sub-library. See how it is done here:
I recommend putting *_arbitrary into a separate library. Keep the structure flat. I'd like to also flatten the structure of the OpenFlow parsers by using OCaml 4.01 |
0x01 is unfortunately not all that stable. But the code is a bit more -N On Thu, Oct 10, 2013 at 12:50 PM, Mark Reitblatt
|
Nate, Mark, you need to get on our hangout with marco and spiros. It is caleld FLAT TIRE. |
This reverts commit db9ae56.
This reverts commit 53f84d1.
Use the OpenFlow0x01_Arbitrary signature to build all the components of a roundtrip test. Then it will be straightforward to run a test using the values defined in the module that conforms to that signature: module M : OpenFlow0x01_Arbitrary quickCheck M.arbitrary M.to_string M.parse M.marshal
@arjunguha This should be good to go. |
This pull requests includes QuickCheck tests for the OpenFlow0x01.Wildcards module. During the course of implementing the tests, I found that the
nw_src
andnw_dst
have typeint
but those should beuint
, if OCaml had such a type.Some questions:
marshal
andparse
). Is this acceptable?For my perspective, the answer to these questions are: yes, yes, and it should go in the module where the datatype is defined.