Qt unit test template: add option to prefix test methods with "test"
ClosedPublic

Authored by kossebau on Jan 31 2017, 10:14 PM.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau updated this revision to Diff 10787.Jan 31 2017, 10:14 PM
kossebau retitled this revision from to Qt unit test template: add option to prefix test methods with "test".
kossebau added a reviewer: KDevelop.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptJan 31 2017, 10:14 PM
apol added a subscriber: apol.Jan 31 2017, 10:46 PM

Shouldn't test cases then be actually named "test*"?

In D4379#82035, @apol wrote:

Shouldn't test cases then be actually named "test*"?

Could you give an example, not sure what you mean?

The idea with the prefix is to allow the user optionally to enter test cases (by UI lingo) without a "test" prefix, for quicker typing. And then still have all the ,method names generated with a "test" prefix, if they want.
Hardcoding seemingly common practice, if the prefix is done, the first letter after the prefix would be enforced to camelCased: "test" + "foo" -> "testFoo".

mwolff accepted this revision.Feb 1 2017, 8:44 AM
mwolff added a reviewer: mwolff.
mwolff added a subscriber: mwolff.
mwolff added inline comments.
file_templates/testing/cpp_qtestlib/class.cpp
4

unrelated?

This revision is now accepted and ready to land.Feb 1 2017, 8:44 AM
This revision was automatically updated to reflect the committed changes.
kossebau marked an inline comment as done.