Consistent naming scheme for unit tests?
aleixpol at kde.org
Wed Jul 9 16:12:52 UTC 2014
On Wed, Jul 9, 2014 at 5:54 PM, Aleix Pol <aleixpol at kde.org> wrote:
> On Wed, Jul 9, 2014 at 4:10 PM, Milian Wolff <mail at milianw.de> wrote:
>> On Wednesday 09 July 2014 15:50:12 Kevin Funk wrote:
>> > Hey,
>> > While working on kdevplatform/kdevelop in the past this one annoyed me
>> > a bit:
>> > There's lots of different naming styles for file, executable and class
>> > for all the unit tests. This makes it hard to identify them when
>> > for classes via Quick Open or when looking up test binaries in the build
>> > folder.
>> > I'm proposing the following naming scheme (something I've already
>> > doing in kdev-clang):
>> > - test_foo.cpp (file name)
>> > - test_foo (target name)
>> > - TestFoo (class name)
>> > To be applied to all existing unit tests (potentially as a junior job)
>> > for code written in the future.
>> > Advantages:
>> > - Easy to look up via Quick Open because of the "Test" prefix
>> > - Easy to determine if a given class/file/target is a test, again
>> because of
>> > the prefix
>> > - Consistent!!11
>> sounds good, +1
> Maybe we can follow how it's usually done in KF5?
> - file name: classnametest.cpp
> - target name: classnametest
> - class name:ClassNameTest
> - test name: subproject-classnametest
> +1 for consistency anyway.
Oh, and separation between autotests and tests is interesting too.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel