To execute them you need - beside the former prerequisites -
either have boost installed installed at system level (UNIX)
or you must specify BOOST_INCLUDE_DIR as environment variable
otherwise the respective test will be skipped.
Change-Id: I6bd8472e554132ab05e58b56e3ccbd5e9dffada9
Reviewed-by: David Schulz <david.schulz@qt.io>
Follow the official terms used by the test frameworks.
In detail this means Google test now uses TestSuite and TestCase
and the value for a normal function has been simplified to
TestFunction.
Beside the visual change there is no change in functionality.
Change-Id: Idf541d07fa3469e04a699d46f4625ff9075d5b6f
Reviewed-by: David Schulz <david.schulz@qt.io>
Test suites are used in several test frameworks. To avoid
fiddling around with the types and their meaning on the
frameworks side just add another type (TestSuite) that can
be used.
Frameworks can use or ignore this type as it is done already
for other types.
Change-Id: I6c2a312a32ce5716f55b49303e2b1a0f6f8e8da4
Reviewed-by: David Schulz <david.schulz@qt.io>
The old approach was working due to the fact that all
test frameworks followed a fixed type scheme and tried
to handle differences between the AutoTest plugin and
the "real" world of the test framework internally.
Generalizing this decision does no more make sense when
adding an optional test suite layer.
Change-Id: I4788150a8935d8e35e557df8475aa95c8ca545b4
Reviewed-by: David Schulz <david.schulz@qt.io>
QtTest had been forgotten to handle correctly as well. So, it
was possible to have several levels of grouping which had not
been handled correctly.
By (current) definition we handle only one level of grouping,
so prohibit more for QtTest tree items as well.
Basically move the check into a separate function and use this
beforehand instead of creating a nullptr.
Change-Id: Icbf02eae67e89464f371eb349eecf2976636d05f
Reviewed-by: David Schulz <david.schulz@qt.io>
* use nullptr
* override
* remove old style casts
* fix most of the code model warnings
Change-Id: Ia08e846f9326ae28ca7e7d66748e25a8b817b9b1
Reviewed-by: Xing Xiong
Reviewed-by: David Schulz <david.schulz@qt.io>
Run specific test functions since one test case can be implemented in multiple files.
Task-number: QTCREATORBUG-20329
Change-Id: I07f435c264f18e9608caa5b7ee20dff2d33ee9c0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Changing (gtest) filters can result in inconsistent
check states up to the root item.
This patch makes the check states consistent again.
Change-Id: I83b146c8859a352892945312ee2fd183699fc79c
Reviewed-by: David Schulz <david.schulz@qt.io>
When the rebuild of the tree model has been triggered
due to switching between grouping by filter or directory
it could happen that some children did not get merged
into others due to (insignificant) differences.
Avoid this visual duplication by finding items similar
to the one to be added and if there is one re-use this
instead.
Change-Id: Ife49593638e0af23ffc7353e305be4ea25eb2180
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This adds another grouping mode to the gtest framework based on
gtest filtering. You can now specify a filter that will be used
to group the gtest tree items into matching and non-matching
tests.
Change-Id: Iaf0e55c9e57e2720f4fa84ab4b51ecaeb614df88
Reviewed-by: David Schulz <david.schulz@qt.io>
Simplify and re-arrange to avoid wrong indirections and
unnecessary delegation.
Beside this ensure correct check states of group nodes
when adding them.
Change-Id: I24a32249d785e48c9d27111d062c2a06a17327ef
Reviewed-by: David Schulz <david.schulz@qt.io>
Grouping of test cases can now get enabled for each
registered framework.
For now grouping happens only folder based.
Task-number: QTCREATORBUG-17979
Change-Id: Ic0e5c0ecc76998a1aedea8aa0845f6d9b53fb179
Reviewed-by: David Schulz <david.schulz@qt.io>
Root items that have a partially checked state would keep the state when
switching projects until manually modified or if new items would be
added on a next parse. Reset them to checked state instead.
Change-Id: Id543edd7694abc6fcec3b8d028dce2ee82213517
Reviewed-by: David Schulz <david.schulz@qt.io>
This allows (de)selecting of all test cases of a specific test
framework.
Change-Id: I21357d3dbcfce73387f157b1b40686f437fa260b
Reviewed-by: David Schulz <david.schulz@qt.io>
It is a bad idea to remove child items while iterating over them.
Introduced a while ago, but forgotten to fix in f00a113e.
Change-Id: I8d335cec34c2e6a9e7dff99d10c68066ffa8933d
Reviewed-by: David Schulz <david.schulz@qt.io>
* remove unnecessary QLatin1String where possible
* foreach
* nullptr
* bad naming of static members
Change-Id: If0f7c6839be4d2efbfef6f7f0775d2034775bd90
Reviewed-by: David Schulz <david.schulz@qt.io>
Introduced with latest changes to TreeItem.
It is a bad idea to remove child items while iterating over them.
Change-Id: I6941f4728cf93e47b3ef6405bd1304112946c481
Reviewed-by: hjk <hjk@qt.io>
... and use this to reduce the number of explicit uses of m_children.
Despite of being shorter code by itself it is a step towards having
an explicit LeafItem object that doesn't explicitly store a(n empty)
vector of child nodes.
Change-Id: If8db85e2f1134dd1578a78d31235bf57a28f863a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Introducing support for inheritance broke some old functionality
which in fact was just over engineered.
Remove additional code which will be automatically handled and does
not need to get handled by special logic which could be now wrong.
Change-Id: I05a063c41dc0f8f644d0807fc5497de9c4461246
Reviewed-by: David Schulz <david.schulz@qt.io>
Remove the 'Always parse' setting and respective special handling.
This simplifies the handling of parsing for tests and removes
strange special handling that was introduced in earlier versions
and led more to confusion on the user side.
Change-Id: Ia4d122ed448244f3cb3876dda9930864afde9c28
Reviewed-by: David Schulz <david.schulz@qt.io>
Avoid unintentional re-enabling of the code parser.
Handling of the enabled state broke several times before,
therefore separate it from other states of the parser to
avoid breaking it again when not taking enough care while
refactoring or adding features related to states.
Change-Id: If1eb0dd649225f10bfc3bf06f09851649da75983
Reviewed-by: David Schulz <david.schulz@qt.io>
The LeveledTreeModel case is general enough to cover
the UniformTreeModel case, so merge them and rename to
TreeModel. The former TreeModel is now BaseTreeModel.
BaseTreeModels should not be instantiated directly,
a tree model with non-uniform basic items is available
as TreeModel<>.
Done-with: Eike Ziller <eike.ziller@qt.io>
Change-Id: I64a65617ab68c0cde39cf65f4bc092ef808ee6fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
TestTreeModel::testCaseNamesForFiles() is a helper that is currently
needed only for handling the Qt test framework.
Move it down into Qt framework's helper class and make it static.
Change-Id: I03c377a76402593584870cbbdaa4621d19278443
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Mainly a preparation for enabling/disabling test frame works.
Change-Id: I0bbea7e055a607517ef8193587c229cadf0de027
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
...for determining from which root node test cases names are needed.
Another preparation for introducing test frameworks.
Change-Id: I02910f3e4736d9be6e6822eea7863fc62252d4db
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Preparation for introducing test frameworks.
Change-Id: Iefaa4ca9dd9af665444556afa9c6e326041cfd0f
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
AutoTest* is too generic within the context where it is used.
This patch renames respective classes, members and string occurrences.
Change-Id: Ie413e4a344ddaf7892ecf248ba486defb4b9e3ef
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
...into files and respective sub folders.
Change-Id: Ic80d693bd73993a6e74b6d422349e47276e8cb6e
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This is also necessary for a uniform handling while adding or
updating test tree items, which in turn makes it possible to
separate model and items once more.
Change-Id: I84ff558d23490c8734b22062f00e03e8c06d6720
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
...to allow different approaches for different test frameworks.
Change-Id: I16f101fb3f702a0db00cffe33e0d83cd4ea28c99
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This is necessary later on as we will need different sub-classes of
TestParseResult to support different test frameworks.
This avoids the necessarity to put all information inside a single
object even if it is not used.
Change-Id: I39c74ba06b9337608ece8b113b0993c0934b24b9
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Another preparation for having a consistent interface later on.
Change-Id: I573e45101016048de916f4d321b326a24efbe4ee
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Items that will be marked for possible removal on first level
forgot to mark their childrens which led to keeping them when
sweeping although they should get removed if they were not
found again.
Change-Id: Ib364823ee60d31370331b090c776799ca5f663bf
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
The signal used to be emitted only on reset or when tests are actually removed during sweep phase:
thus the 'run tests' button in test panel stayed disabled if the panel was opened while tests were
scanned.
Change-Id: I274c9d03f1e1140c8aa375f92465c5a0c866cd62
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>