gcmd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gcmd-dev] Unit tests for gcmd


From: Uwe Scholz
Subject: [gcmd-dev] Unit tests for gcmd
Date: Mon, 12 Oct 2015 22:21:39 +0200

Hi,

In the last months I realized that it would be a good idea to have an
ability to check if a change on the GCMD code eventually brakes
something which worked before.

That's why I want to implement unit tests in GNOME Commander. I tried
two unit test frameworks: CppUnit and GoogleTest. To my knowledge, both
are well documented and you can find many examples online. 

For both frameworks a feature branch is available:

CppUnit:    https://git.gnome.org/browse/gnome-commander/log/?h=CppUnit
GoogleTest: 
https://git.gnome.org/browse/gnome-commander/log/?h=googletest

You can check them out by executing "autogen.sh && make check" in the
upmost directory. 

You will see that in both cases only a single unit test is executed.
Both try to open the file "INSTALL" and read by them by a method for the
internal editor. The test itself is not to be considered to be complete,
but it should pass.

Of course you need to install the test frameworks to be able to run the
tests. Otherwise an error will occur.

And now: Start playing with CppUnit or GoogleTest, write some tests and
send in patches for GCMD. This would be great, we all could learn.

Personally, I tend to GoogleTest in favour of CppUnit as it provides
much more features.

Best wishes,
Uwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]