On Nov 27, 2007 6:08 PM, Karl Fogel <kfogel@red-bean.com> wrote:
> "David Glasser" <glasser@davidglasser.net> writes:
> >> Log:
> >> Follow up to r28022: test that poking a path under an excluded path fails.
> >>
> >> * subversion/tests/libsvn_repos/repos-test.c
> >> (reporter_depth_exclude): Try some illegal reporting, expect failure.
> >
> > In general, when we say that callers of an API must do something, do
> > we guarantee that svn_error_t's are thrown if it's ignored? Seems
> > like "undefined behavior" to me...
>
> Well, that's a good question.
>
> We don't, in general, promise a specific error every time we impose a
> limitation on callers. We do promise a specific error when the error
> is something a caller might want to test for. While it never hurts to
> promise a specific error, the reporter's behavior in this regard is
> sufficiently random (right now) that I didn't feel comfortable making
> any particular error a guaranteed part of the API.
>
> But it's still useful to test for the specific error in this case.
> Even though the exact error isn't guaranteed by the doc string, if the
> behavior were to ever change, we'd want to know about it (the reporter
> code being sensitive stuff).
>
> Reasonable? Or just lily-livered?
Sure, maybe comment in the test that we're testing undefined behavior
and test failure could be not a bug?
(I'd be less comfortable with such a test in the Python (client/server) tests.)
--dave
--
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 28 04:10:38 2007