ostream parameter to tests

8 views
Skip to first unread message

Ben Clifford

unread,
Apr 6, 2010, 7:24:56 AM4/6/10
to stupi...@googlegroups.com

The C tests assume that you can declare:

function () test()

or

function () test(ostream o)

depending on the needs of the test. This is OK in C. But the differing
type signatures translate poorly into both Java and Haskell which have
stricter behaviour in their normal definition of method/function
signatures.

I think its OK for tests to be required to always have the second
signature shown above.

--
http://www.hawaga.org.uk/ben/

Ben Laurie

unread,
Apr 11, 2010, 9:46:40 AM4/11/10
to stupi...@googlegroups.com

Sure thing. You should add a test that tests that failing to match
signatures produces an error :-)

--
http://www.apache-ssl.org/ben.html http://www.links.org/

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Reply all
Reply to author
Forward
0 new messages