Testing for type-of

6 views
Skip to first unread message

Derek Manwaring

unread,
Nov 21, 2011, 10:48:22 PM11/21/11
to byu-cs-330-fall-2011
Jay,

Is it sufficient to show that a couple wrong types are rejected by each part of the syntax, like this:

(test/exn (type-of (parse '(nfirst 1)))
          "Argumet of nfirst must be type (t-nlist)")
(test/exn (type-of (parse '(nfirst false)))
          "Argumet of nfirst must be type (t-nlist)")

Or do we need to show that every incorrect type is rejected for each part of the syntax. (Meaning adding a test for calling nfirst with a function as its argument in addition to the above two tests)

Derek

Jay McCarthy

unread,
Nov 22, 2011, 12:21:21 AM11/22/11
to byu-cs-330...@googlegroups.com
What you have is sufficient
--
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
Reply all
Reply to author
Forward
0 new messages