File indexing completed on 2024-05-12 04:37:34
0001 {% load kdev_filters %} 0002 {% include "license_header_cpp.txt" %} 0003 0004 0005 #include "{{ output_file_header }}" 0006 0007 0008 #include <tests/testcore.h> 0009 #include <tests/autotestshell.h> 0010 0011 0012 QTEST_{% if test_nogui %}GUILESS_{% endif %}MAIN({{ name }}); 0013 0014 0015 using namespace KDevelop; 0016 0017 0018 void {{ name }}::initTestCase() 0019 { 0020 AutoTestShell::init(); 0021 TestCore::initialize(Core::{% if test_nogui %}NoUi{% else %}Default{% endif %}); 0022 } 0023 0024 0025 void {{ name }}::cleanupTestCase() 0026 { 0027 TestCore::shutdown(); 0028 } 0029 0030 0031 {% if test_initAndCleanup %} 0032 void {{name}}::init() 0033 { 0034 // Called before each testfunction is executed 0035 } 0036 0037 0038 void {{name}}::cleanup() 0039 { 0040 // Called after every testfunction 0041 } 0042 0043 0044 {% endif %} 0045 {% for case in testCases %} 0046 0047 void {{ name }}::{% if test_prefixMethods %}test{{ case|upper_first }}{% else %}{{ case }}{% endif %}() 0048 { 0049 0050 0051 } 0052 0053 {% endfor %}