#20 unit tests: remove warning with empty tests

5.0
closed-rejected
2
2005-12-13
2005-12-05
Michael Fink
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.

     
    • priority: 5 --> 2
     
    • assigned_to: nobody --> complement
    • status: open --> open-wont-fix
     
  • 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?

     
  • Logged In: YES
    user_id=615813

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

     
  • Logged In: YES
    user_id=615813

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

     
    • status: open-wont-fix --> open-rejected
     
    • status: open-rejected --> closed-rejected