Testing Utility Functions

5 views
Skip to first unread message

Willard Hagen

unread,
Dec 9, 2013, 9:23:24 PM12/9/13
to byu-cs-330...@googlegroups.com
I am trying to test the utility functions and I am having a hard time coming up with test cases for them.

Jay McCarthy

unread,
Dec 9, 2013, 10:07:18 PM12/9/13
to Willard Hagen, byu-cs-330...@googlegroups.com
Which ones?

Sent from my iPhone

On Dec 9, 2013, at 7:23 PM, Willard Hagen <willar...@gmail.com> wrote:

I am trying to test the utility functions and I am having a hard time coming up with test cases for them.

--
You received this message because you are subscribed to the Google Groups "byu-cs-330-fall-2013" group.
To unsubscribe from this group and stop receiving emails from it, send an email to byu-cs-330-fall-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Jay McCarthy

unread,
Dec 9, 2013, 10:56:34 PM12/9/13
to Willard Hagen, BYU CS 330 Fall 2013
I don't know what "both" means. Are you talking about take-while and
build-infinite-list?

The assignment page gives you two examples. Try those and then make more.

Jay

On Mon, Dec 9, 2013 at 8:46 PM, Willard Hagen <willar...@gmail.com> wrote:
> Both. For the infinite list function do I just try different types of
> input? I am not sure how to test the while function. It seems pretty
> simple. Do I just test varying functions that produce boolean values? I am
> not sure how to organize a test set to do this.
>
> Thanks.
> --
> -Willard



--
Jay McCarthy <j...@cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93

Jay McCarthy

unread,
Dec 9, 2013, 11:18:49 PM12/9/13
to Willard Hagen, BYU CS 330 Fall 2013
The second one gives you a specification. You can plug in any f and i,
and it's a valid test.

The first one doesn't give as much detail, but I hope that you
understand what filter is supposed to do and how this is related. If
you have specific questions, I'm happy to answer them.

Jay

On Mon, Dec 9, 2013 at 9:05 PM, Willard Hagen <willar...@gmail.com> wrote:
> Yes those were the two I meant. I tried the two examples that the page
> gave. I will make a few more I am just concerned I won't do the right
> tests.
Reply all
Reply to author
Forward
0 new messages