#20 unit tests: remove warning with empty tests

5.0
closed-rejected
2
2005-12-13
2005-12-05
No

I've done a patch to remove the following warning when
creating an empty test, e.g. seen in allocator_test.cpp
when _STLP_USE_EXCEPTIONS is not defined (e.g. seen in
evc3):

../../../test/unit\allocator_test.cpp(14) : warning
C4189: 'className' : local variable is initialized but
not referenced

This patch is useful for all types of test on any
platform, not just for evc. The patch is for 5.0 and HEAD.

Discussion

  • Michael Fink

    Michael Fink - 2005-12-05

    Logged In: YES
    user_id=124874

    Sorry, the first attached patch has an error, I've attached
    another patch that is correct.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2005-12-06
    • priority: 5 --> 2
     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2005-12-08
    • assigned_to: nobody --> complement
    • status: open --> open-wont-fix
     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2005-12-08

    Logged In: YES
    user_id=615813

    This is singular case, that may lead to confuse; empty test
    itself is a nonsense. Either don't run it, or ignore warning, but
    don't hide the fact that test do nothing.

     
  • Michael Fink

    Michael Fink - 2005-12-08

    Logged In: YES
    user_id=124874

    An empty test does occur, just look into allocator_test.cpp.
    I don't understand why the warning shouldn't be removed when
    there's no test to execute. The warning is about an unused
    variable internal to the test macros, so why generating
    warnings that the user doesn't understand?

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2005-12-08

    Logged In: YES
    user_id=615813

    I know about empty tests, but I hold by my opinion.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2005-12-09

    Logged In: YES
    user_id=615813

    I have expand my position in the stlport-devel mailing
    list.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2005-12-09
    • status: open-wont-fix --> open-rejected
     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2005-12-13
    • status: open-rejected --> closed-rejected
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks