Daniel Shahaf wrote on Fri, Dec 24, 2010 at 10:48:24 +0200: > Blair Zajac wrote on Thu, Dec 23, 2010 at 17:09:31 -0800: > > On 12/23/10 3:01 AM, Daniel Shahaf wrote: > >> I've made a quick sketch --- looks good? > > > > The suggestions look good. > > > > We could add some more tests, checking the behavior with SVN_NO_ERROR > > input and one where all errors are tracing, which should return an error > > from SVN_ERR_ASSERT(). > > > > I'm not sure about the 'assert' part (both due to the "testing that it > has asserted" issue and due to the fact that it's mathematiclaly > legitimaste to return an empty chain (aka SVN_NO_ERROR) in that case).
BTW, the malfunction API only promises an error in the category SVN_ERR_MALFUNC_CATEGORY_START, so I have assumed we should have a macro to decide whether an error code is in a given category: #define SVN_ERROR_IN_CATEGORY(err, category) \ ((category) == (((err) ? (err)->apr_err : 0) / SVN_ERR_CATEGORY_SIZE) * SVN_ERR_CATEGORY_SIZE) { if (SVN_ERROR_IN_CATEGORY(err, SVN_ERR_MALFUNC_CATEGORY_START)) { ... } }