This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 1329

Summary: More informative testing framework
Product: Eigen Reporter: Tal Hadad <tal_hd>
Component: TestsAssignee: Nobody <eigen.nobody>
Status: CONFIRMED ---    
Severity: Feature Request CC: chtz, gael.guennebaud, jacob.benoit.1
Priority: Low Keywords: JuniorJob
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:

Description Tal Hadad 2016-10-18 06:01:51 UTC
Eigen testing framework designed to catch failures very well. However, it doesn't good on printing information when there is an error. In my experience, I end up in debugging, commemt test code and manually print values, and when I finally fix it, reverting these changes.

Here are few suggestions I thought about:
* The obvious one - printing input values of "VERIFY" macros. E.g approximation verification should print both values on failure and not just print the diff.
* Allow getting string/printing functio which made up by the developer that shows what he think that should be printed.
* Allow custom "info stack" that should help the dev know in which function call stack she is in, and what is their arguments. The stack is printed on failure.
Comment 1 Christoph Hertzberg 2016-10-18 14:08:20 UTC
Sure, more information can be helpful. OTOH, one often needs to debug into the actual implementation anyway.

Be aware though, that sometimes very large vectors are compared, which should probably not printed out entirely, as they would spam our dash-board (in this case maybe just output some subvector which is significantly different from the intended value?)

Regarding the stack, we already have Eigen::g_test_stack, which is printed out on failures (as far as I can see, currently the seed, the name of the test function and the subtest function are pushed onto it). If you think it is useful provide a convenience function which pushes (and pops) additional data onto it.

If somebody wants to implement this, make sure that the all existing macros are still working (introduce new macros if you want extended functionality).

I'm marking this as JuniorJob.
Comment 2 Nobody 2019-12-04 16:26:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1329.