-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix compilation error due to missing QSharedPointer include in genera…
…ted code (#170) * add test with compiled error code generated * fix class name * include only QTest * include QSharedPointer in header
- Loading branch information
1 parent
90eae39
commit b7182ac
Showing
7 changed files
with
131 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
set(QSharedPointer_include_SRCS test_qsharedpointer_include.cpp) | ||
|
||
set(WSDL_FILES test_qsharedpointer_include_wsdl.wsdl) | ||
|
||
add_unittest(${QSharedPointer_include_SRCS}) |
12 changes: 12 additions & 0 deletions
12
unittests/QSharedPointer_include/QSharedPointer_include.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
include( $${TOP_SOURCE_DIR}/unittests/unittests.pri ) | ||
QT += network xml | ||
SOURCES = test_qsharedpointer_include.cpp | ||
test.target = test | ||
test.commands = ./$(TARGET) | ||
test.depends = $(TARGET) | ||
QMAKE_EXTRA_TARGETS += test | ||
|
||
KDWSDL = test_qsharedpointer_include_wsdl.wsdl | ||
|
||
OTHER_FILES = $$KDWSDL | ||
LIBS += -L$${TOP_BUILD_DIR}/lib |
20 changes: 20 additions & 0 deletions
20
unittests/QSharedPointer_include/test_qsharedpointer_include.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "wsdl_test_qsharedpointer_include_wsdl.h" | ||
|
||
#include <QTest> | ||
|
||
class RightInclude: | ||
public QObject | ||
{ | ||
Q_OBJECT | ||
|
||
private Q_SLOTS: | ||
|
||
void testCompiled() | ||
{ | ||
Hello_Service service; | ||
} | ||
}; | ||
|
||
QTEST_MAIN(RightInclude) | ||
|
||
#include "test_qsharedpointer_include.moc" |
89 changes: 89 additions & 0 deletions
89
unittests/QSharedPointer_include/test_qsharedpointer_include_wsdl.wsdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
|
||
<definitions name="HelloService" | ||
targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl" | ||
xmlns="http://schemas.xmlsoap.org/wsdl/" | ||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" | ||
xmlns:tns="http://www.examples.com/wsdl/HelloService.wsdl" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
xmlns:test="urn:test"> | ||
<types> | ||
<xsd:schema targetNamespace="urn:test" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" > | ||
<xsd:import namespace="http://www.w3.org/2001/XMLSchema"/> | ||
|
||
<xsd:complexType name="trajectoryPoint"> | ||
<xsd:sequence> | ||
<xsd:element name="time" type="xsd:double"/> | ||
<xsd:element name="cv" type="xsd:double" minOccurs="6" maxOccurs="6"/> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="realTrajectoryPoint"> | ||
<xsd:complexContent> | ||
<xsd:extension base="test:trajectoryPoint"> | ||
<xsd:sequence> | ||
<xsd:element name="covMatrix" type="xsd:double" minOccurs="36" maxOccurs="36"/> | ||
</xsd:sequence> | ||
</xsd:extension> | ||
</xsd:complexContent> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="trajectory"> | ||
<xsd:sequence> | ||
<xsd:element name="id" type="xsd:long"/> | ||
<xsd:element name="category" type="xsd:string"/> | ||
<xsd:element name="coordinateSystem" type="xsd:string"/> | ||
<xsd:element name="points" type="test:trajectoryPoint" minOccurs="0" maxOccurs="unbounded"/> | ||
<xsd:element name="realPoints" type="test:realTrajectoryPoint" minOccurs="0" maxOccurs="unbounded"/> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
|
||
<xsd:element name="getTrajectoryResponse"> | ||
<xsd:complexType> | ||
<xsd:sequence> | ||
<xsd:element name="trajectoryInfo" type="test:trajectory" minOccurs="0" maxOccurs="unbounded"/> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
</xsd:element> | ||
|
||
</xsd:schema> | ||
</types> | ||
<message name="SayHelloRequest"> | ||
<part name="firstName" type="test:trajectory"/> | ||
</message> | ||
<message name="SayHelloResponse"> | ||
<part name="greeting" type="test:getTrajectoryResponse"/> | ||
</message> | ||
<portType name="Hello_PortType"> | ||
<operation name="sayHello"> | ||
<input message="tns:SayHelloRequest"/> | ||
<output message="tns:SayHelloResponse"/> | ||
</operation> | ||
</portType> | ||
<binding name="Hello_Binding" type="tns:Hello_PortType"> | ||
<soap:binding style="rpc" | ||
transport="http://schemas.xmlsoap.org/soap/http"/> | ||
<operation name="sayHello"> | ||
<soap:operation soapAction="sayHello"/> | ||
<input> | ||
<soap:body | ||
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" | ||
namespace="urn:examples:helloservice" | ||
use="encoded"/> | ||
</input> | ||
<output> | ||
<soap:body | ||
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" | ||
namespace="urn:examples:helloservice" | ||
use="encoded"/> | ||
</output> | ||
</operation> | ||
</binding> | ||
<service name="Hello_Service"> | ||
<documentation>WSDL File for HelloService</documentation> | ||
<port binding="tns:Hello_Binding" name="Hello_Port"> | ||
<soap:address | ||
location="http://www.examples.com/SayHello/"/> | ||
</port> | ||
</service> | ||
</definitions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters