thoughtpolice / salt

Fast cryptographic networking for Haskell
http://thoughtpolice.github.com/salt
MIT License
24 stars 1 forks source link

Rewrite tests #24

Open thoughtpolice opened 11 years ago

thoughtpolice commented 11 years ago

The tests are ridiculously ugly and crufty. They should be beautified a bit.

I broke these a bit in the midst of fixing #16.

These should also hopefully come with some doctests, courtesy of @tel.

tel commented 11 years ago

I'm still having trouble getting doctest to play nicely with hsc. I'll continue trying to get around it and present a patch with a nice doctest workflow.

thoughtpolice commented 11 years ago

Hm, perhaps a bug in doctest itself? May be worth submitting an issue to their issue tracker.

In the short term, perhaps one stop gap is to move all the uses of hsc2hs's preprocessor to their own module, and then only run doctest on the 'pure' .hs modules.

tel commented 11 years ago

That might be a useful component of the module refactoring anyway?

On Monday, December 17, 2012 at 4:44 PM, Austin Seipp wrote:

Hm, perhaps a bug in doctest itself? May be worth submitting an issue to their issue tracker. In the short term, perhaps one stop gap is to move all the uses of hsc2hs's preprocessor to their own module, and then only run doctest on the 'pure' .hs modules.

— Reply to this email directly or view it on GitHub (https://github.com/thoughtpolice/salt/issues/24#issuecomment-11462991).

thoughtpolice commented 11 years ago

I've moved all the 'meat' of the package out of .hsc files and isolated all FFI declarations there. You should be good to go with doctests now @tel (hopefully, anyway.)

tel commented 11 years ago

I'll take a look at it tonight. I've been a little sick after Xmas and haven't had time for some good solid concentration. Time to fix that though : )

On Saturday, December 29, 2012 at 2:11 PM, Austin Seipp wrote:

I've moved all the 'meat' of the package out of .hsc files and isolated all FFI declarations there. You should be good to go with doctests now @tel (https://github.com/tel) (hopefully, anyway.)

— Reply to this email directly or view it on GitHub (https://github.com/thoughtpolice/salt/issues/24#issuecomment-11756533).