common: Add ExpressionMatchTests unit tests
authorShane Synan <digitalcircuit36939@gmail.com>
Sun, 2 Sep 2018 07:39:30 +0000 (02:39 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 3 Sep 2018 20:12:02 +0000 (22:12 +0200)
commit82530a03445572aad9997275e9c47c23aefabd0f
tree9084f40d34231ba3a4023f25b6d21415a43183d8
parent09906ed00eb2ba2fa1cc0f5464f166e5a85a2c92
common: Add ExpressionMatchTests unit tests

Add ExpressionMatchTests class to test the functionality of
ExpressionMatch, helping ensure it works across Qt 4 and Qt 5.

This is implemented as a series of Q_ASSERT()'s as Quassel does not
yet have an actual testing framework.  Once a test framework is
settled on, this class can be migrated to unit tests.

To use ExpressionMatchTests:

1.  Include it in "quassel.cpp"

2.  Call ExpressionMatchTests::runTests() near end of Quassel::init()
// DEBUG: Run tests!
ExpressionMatchTests::runTests();
src/common/CMakeLists.txt
src/common/expressionmatchtests.cpp [new file with mode: 0644]
src/common/expressionmatchtests.h [new file with mode: 0644]