summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolstestcase.h
Commit message (Collapse)AuthorAgeFilesLines
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* CppTools: Remove test file after testNikolai Kosjar2014-06-161-0/+12
| | | | | | | | | In test_includeGroups_detectIncludeGroupsByIncludeType the test file was not removed and thus subsequent and isolated executions of this test failed. Change-Id: I5eeb4f004f5b146ac794ca913b4092629131fca3 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Cpp{Tools,Editor}: Tests: Use QString instead of QByteArrayNikolai Kosjar2014-05-231-2/+2
| | | | | | | | | | This is necessary in order to add tests with multi-byte UTF-8 code points. Otherwise the initial and target source code marker positions will be calculated on the QByteArray (test code) but used with a QString (editor document). Change-Id: I108961b13d32912a4d3193cf26eb59f65d296f57 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Avoid self-includeNikolai Kosjar2014-02-241-0/+2
| | | | | | | | | ...in CPlusPlus::Document due to cyclic includes. Task-number: QTCREATORBUG-11457 Change-Id: I1ca19c901c26d9984d795a61879dd6b41c57096c Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Clean up single namespace forward-declarationsOrgad Shaneh2014-02-121-3/+1
| | | | | | | | | | | | | | | | | | Done using the following ruby script: Dir.glob('**/*.h').each { |file| if File.file?(file) s = File.read(file) t = s.gsub(/^namespace .+ \{\n\s*class .*;\n\s*\}.*$/) { |m| m.gsub(/\n\s*/, ' ').gsub(/\s*\/\/.*$/, '') } if t != s puts file File.open(file, 'w').write(t) end end } Change-Id: Iffcb966e90eb8e1a625eccd5dd0b94f000ae368e Reviewed-by: hjk <hjk121@nokiamail.com>
* Incremented year in copyright infoRobert Loehning2014-01-091-1/+1
| | | | | Change-Id: I6e25ba25aa2898b5382dae7f3751deebb6072efa Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* CppEditor/CppTools: Avoid triggering garbage collector on editor close in testsNikolai Kosjar2014-01-071-0/+2
| | | | | | | | | | | Closing an editor might trigger a timer which leads to the invocation of the garbage collector. This is unfavourable for the plugin tests since a test function closing an editor might influence a subsequent test function (e.g. files get removed from the global snapshot although they were added shortly before). Change-Id: Ia80c11f99e2437fe145dc2d983b21962539b5181 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor/CppTools: Don't continue in test function on failureNikolai Kosjar2014-01-071-0/+2
| | | | | | | | | | | | | QVERIFY/QCOMPARE are meant to be called in the test function so that on failure they just can "return" and thus skip subsequent code. Since we use reusable test code in the test functions (the *TestCase classes), we need to ensure that on failure no further test code is executed. This mostly inlines the run function of the test classes into the constructor. Change-Id: I320ee032bdde0174ddfe3fdf3f9e18e19abf1d7f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor/CppTools: Introduce Test{Case,Document}Nikolai Kosjar2014-01-071-0/+98
Move common functionality of the 12 test classes into base classes. Change-Id: If64d3cec876807ac6f991151189860a99b8ff4ca Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>