ClangStaticAnalyzer: Tests: Add simple-library

Change-Id: I4d7043fe86f003011ac799184bf7aaa2f0a48b64
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2016-04-21 11:56:14 +02:00
parent bfba953b41
commit 43aef556d3
6 changed files with 38 additions and 0 deletions

View File

@@ -107,6 +107,11 @@ void ClangStaticAnalyzerUnitTests::testProject_data()
QTest::newRow("simple qmake project") QTest::newRow("simple qmake project")
<< QString(m_tmpDir->absolutePath("simple/simple.pro")) << 1; << QString(m_tmpDir->absolutePath("simple/simple.pro")) << 1;
QTest::newRow("simple qbs library project")
<< QString(m_tmpDir->absolutePath("simple-library/simple-library.qbs")) << 0;
QTest::newRow("simple qmake library project")
<< QString(m_tmpDir->absolutePath("simple-library/simple-library.pro")) << 0;
QTest::newRow("qt-widgets-app qbs project") QTest::newRow("qt-widgets-app qbs project")
<< QString(m_tmpDir->absolutePath("qt-widgets-app/qt-widgets-app.qbs")) << 0; << QString(m_tmpDir->absolutePath("qt-widgets-app/qt-widgets-app.qbs")) << 0;
QTest::newRow("qt-widgets-app qmake project") QTest::newRow("qt-widgets-app qmake project")

View File

@@ -12,5 +12,9 @@
<file>unit-tests/qt-essential-includes/main.cpp</file> <file>unit-tests/qt-essential-includes/main.cpp</file>
<file>unit-tests/qt-essential-includes/qt-essential-includes.pro</file> <file>unit-tests/qt-essential-includes/qt-essential-includes.pro</file>
<file>unit-tests/qt-essential-includes/qt-essential-includes.qbs</file> <file>unit-tests/qt-essential-includes/qt-essential-includes.qbs</file>
<file>unit-tests/simple-library/simple-library.cpp</file>
<file>unit-tests/simple-library/simple-library.h</file>
<file>unit-tests/simple-library/simple-library.pro</file>
<file>unit-tests/simple-library/simple-library.qbs</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@@ -0,0 +1,5 @@
#include "simple-library.h"
void foo()
{
}

View File

@@ -0,0 +1,6 @@
#ifndef SIMPLELIBRARY_H
#define SIMPLELIBRARY_H
void foo();
#endif // SIMPLELIBRARY_H

View File

@@ -0,0 +1,5 @@
CONFIG -= QT
TEMPLATE = lib
SOURCES += simple-library.cpp
HEADERS += simple-library.h

View File

@@ -0,0 +1,13 @@
import qbs 1.0
DynamicLibrary {
name: "Simple Library"
Depends { name: 'cpp' }
files: [
"simple-library.cpp",
"simple-library.h",
]
}