Changeset View
Changeset View
Standalone View
Standalone View
tests/json/jsondeclarationtests.h
Show All 24 Lines | |||||
25 | #include "language/duchain/identifier.h" | 25 | #include "language/duchain/identifier.h" | ||
26 | #include "language/duchain/abstractfunctiondeclaration.h" | 26 | #include "language/duchain/abstractfunctiondeclaration.h" | ||
27 | #include "language/duchain/types/typeutils.h" | 27 | #include "language/duchain/types/typeutils.h" | ||
28 | #include "language/duchain/types/identifiedtype.h" | 28 | #include "language/duchain/types/identifiedtype.h" | ||
29 | #include <language/duchain/types/functiontype.h> | 29 | #include <language/duchain/types/functiontype.h> | ||
30 | #include "language/duchain/duchain.h" | 30 | #include "language/duchain/duchain.h" | ||
31 | #include "language/duchain/functiondefinition.h" | 31 | #include "language/duchain/functiondefinition.h" | ||
32 | #include "language/duchain/definitions.h" | 32 | #include "language/duchain/definitions.h" | ||
33 | #include <language/duchain/classmemberdeclaration.h> | 33 | #include <language/duchain/classfunctiondeclaration.h> | ||
34 | #include "jsontesthelpers.h" | 34 | #include "jsontesthelpers.h" | ||
35 | 35 | | |||
36 | /** | 36 | /** | ||
37 | * JSON Object Specification: | 37 | * JSON Object Specification: | ||
38 | * DeclTestObject: Mapping of (string) declaration test names to values | 38 | * DeclTestObject: Mapping of (string) declaration test names to values | ||
39 | * TypeTestObject: Mapping of (string) type test names to values | 39 | * TypeTestObject: Mapping of (string) type test names to values | ||
40 | * CtxtTestObject: Mapping of (string) context test names to values | 40 | * CtxtTestObject: Mapping of (string) context test names to values | ||
41 | * | 41 | * | ||
▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Line(s) | 194 | { | |||
200 | return compareValues(absFuncDecl->isVirtual(), value, QStringLiteral("Declaration's isVirtual")); | 200 | return compareValues(absFuncDecl->isVirtual(), value, QStringLiteral("Declaration's isVirtual")); | ||
201 | } | 201 | } | ||
202 | 202 | | |||
203 | ///JSON type: bool | 203 | ///JSON type: bool | ||
204 | ///@returns whether the (function) declaration's isAbstract matches the given value | 204 | ///@returns whether the (function) declaration's isAbstract matches the given value | ||
205 | DeclarationTest(isAbstract) | 205 | DeclarationTest(isAbstract) | ||
206 | { | 206 | { | ||
207 | const QString NOT_A_FUNCTION = QStringLiteral("Non-class-member declaration cannot be abstract."); | 207 | const QString NOT_A_FUNCTION = QStringLiteral("Non-class-member declaration cannot be abstract."); | ||
208 | auto *absFuncDecl = dynamic_cast<ClassMemberDeclaration*>(decl); | 208 | auto *absFuncDecl = dynamic_cast<ClassFunctionDeclaration*>(decl); | ||
209 | if (!absFuncDecl) | 209 | if (!absFuncDecl) | ||
210 | return NOT_A_FUNCTION; | 210 | return NOT_A_FUNCTION; | ||
211 | 211 | | |||
212 | return compareValues(absFuncDecl->isAbstract(), value, QStringLiteral("Declaration's isAbstract")); | 212 | return compareValues(absFuncDecl->isAbstract(), value, QStringLiteral("Declaration's isAbstract")); | ||
213 | } | 213 | } | ||
214 | ///JSON type: bool | 214 | ///JSON type: bool | ||
215 | ///@returns whether the (class-member) declaration's isStatic matches the given value | 215 | ///@returns whether the (class-member) declaration's isStatic matches the given value | ||
216 | DeclarationTest(isStatic) | 216 | DeclarationTest(isStatic) | ||
▲ Show 20 Lines • Show All 130 Lines • Show Last 20 Lines |