tanghong123 / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Naming parametrized tests #112

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice to be able to give names to the specific value runs in
value-parametrized test, instead of the numbers provided now. E.g., instead
of rather unintelligible 

InstantiationName/FooTest.DoesBlah/0
InstantiationName/FooTest.DoesBlah/1
InstantiationName/FooTest.DoesBlah/2

I'd prefer something like

InstantiationName/FooTest.DoesBlah/RegularBlah
InstantiationName/FooTest.DoesBlah/A_Foo_End_Case_Of_Blah
InstantiationName/FooTest.DoesBlah/A_Bar_End_Case_Of_Blah

Original issue reported on code.google.com by dim...@gmail.com on 9 Feb 2009 at 8:43

GoogleCodeExporter commented 9 years ago
Please send feature requests or questions to the discussion group such that 
they can
be addressed more promptly and more people can help you.  Thanks.

I think this would complicate the user experience without generating enough 
benefit.
 If you want names, just use normal tests instead of parameterized tests, e.g.

  TEST(FooTest, RegularBlah) { Test("regular"); }
  TEST(FooTest, AFooEndCaseOfBlah { Test("x_foo"); }
  ...

Original comment by zhanyong...@gmail.com on 9 Feb 2009 at 7:44