diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-02-04 15:19:30 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-02-09 16:48:26 +0200 |
commit | 2946364ce6ad760f732d1042e3206a0fe0a456d6 (patch) | |
tree | dab96a6e578d00d1a749a332cc2bdad7e208687c /plugins/clangstaticanalyzer/unit-tests | |
parent | c632be5c924bbef9619e79af645edadca88e0b94 (diff) | |
download | qt-creator-2946364ce6ad760f732d1042e3206a0fe0a456d6.tar.gz |
Add unit tests.
These test the complete workflow as the user experiences it when
clicking "Start".
Intended usage:
(1) Run sdktool to set up a kit with the toolchain you want
to test against (using a temporary directory).
The tests assume exactly one Kit to be present.
(2) Start Creator with a matching settings path and
"-load ClangStaticAnalyzer -test ClangStaticAnalyzer".
(3) Repeat until all toolchains have been tested.
The initial implementation tests one trivial source file
with both qbs and qmake.
Change-Id: I810f23e2990a789a4dd9f1dd16335fbcf5c5f39f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'plugins/clangstaticanalyzer/unit-tests')
3 files changed, 13 insertions, 0 deletions
diff --git a/plugins/clangstaticanalyzer/unit-tests/simple/main.cpp b/plugins/clangstaticanalyzer/unit-tests/simple/main.cpp new file mode 100644 index 0000000000..af917a3a33 --- /dev/null +++ b/plugins/clangstaticanalyzer/unit-tests/simple/main.cpp @@ -0,0 +1,5 @@ +int main() +{ + int *i = 0; + *i = 42; +} diff --git a/plugins/clangstaticanalyzer/unit-tests/simple/simple.pro b/plugins/clangstaticanalyzer/unit-tests/simple/simple.pro new file mode 100644 index 0000000000..fb560c2af6 --- /dev/null +++ b/plugins/clangstaticanalyzer/unit-tests/simple/simple.pro @@ -0,0 +1,3 @@ +CONFIG -= QT + +SOURCES = main.cpp diff --git a/plugins/clangstaticanalyzer/unit-tests/simple/simple.qbs b/plugins/clangstaticanalyzer/unit-tests/simple/simple.qbs new file mode 100644 index 0000000000..f6ae698a0c --- /dev/null +++ b/plugins/clangstaticanalyzer/unit-tests/simple/simple.qbs @@ -0,0 +1,5 @@ +import qbs + +CppApplication { + files: ["main.cpp"] +} |