Menu

Exception tests broken?

Help
2009-01-21
2013-04-15
  • Roger Banks

    Roger Banks - 2009-01-21

    I had been using an older version of Unit++. I recently downloaded and built the latest version and now the line:

    add("id2", exception_case<out_of_range>(tc));

    from the example in "unit++.h" fails. Or am I just doing something wrong?

     
    • Claus Dræby

      Claus Dræby - 2009-01-24

      The current version fails to address the exception_test correctly, and the example is wrong.

      As part of the improved reporting of file and line number the exception test case have changed signature:

      add("exception", testcase(new exception_test<out_of_range>(
          __FILE__, __LINE__, testcase(this, "gen ex", &Test::ex_test))));

      I'm sorry that I forgot to update the example :(

      I have a new version ready in a project I am currently working with, but have not had the time back port it to sourceforge (shame on me!). It includes a macro for adding exception tests, and is somewhat easier to use, I will try to get it released real soon!
      --
      Azhrarn

       
    • Roger Banks

      Roger Banks - 2009-01-24

      Very good. Thanks!

       

Log in to post a comment.