[Lula] Intermediate C class in the LA area?
Dan Kegel
dank06 at kegel.com
Mon Jul 30 16:58:45 EDT 2007
On 7/28/07, Jesse W <jessw at netwood.net> wrote:
> However, I am now throughly stuck regarding exercise 5.11, which asks
> for a tabs-to-spaces (and reverse) program that takes a list of tab
> stops as an argument. What I'm stuck on is trying to figure out how to
> test it properly.
Write test code like this:
create test input file and redirect stdin from it
capture stdout
run your function
assert that it has the desired output exactly
You might create a struct containing one input string and expected
output string,
then create an array of those, and run through all the test cases in a loop.
More information about the Lula
mailing list