Fix tests compilation

Change-Id: If8c5f6ca040cdcdee883b91e1909acbd5dfc4922
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Orgad Shaneh
2013-12-10 20:18:39 +02:00
committed by Eike Ziller
parent 6f6e09211c
commit 0be7ab1af2
2 changed files with 14 additions and 1 deletions

View File

@@ -116,6 +116,12 @@
#define USE_SHARED_POINTER 0
#endif
#if QT_VERSION >= 0x050200
#define USE_TIMEZONE 1
#else
#define USE_TIMEZONE 0
#endif
void dummyStatement(...) {}
#if USE_CXX11 && defined(__GNUC__) && defined(__STRICT_ANSI__)
@@ -146,6 +152,10 @@ void dummyStatement(...) {}
#include <QSharedPointer>
#endif
#if USE_TIMEZONE
#include <QTimeZone>
#endif
#if USE_GUILIB
#include <QAction>
#include <QApplication> // QWidgets: Separate module as of Qt 5
@@ -5475,6 +5485,7 @@ namespace basic {
void testLongEvaluation1()
{
#if USE_TIMEZONE
QTimeZone tz("UTC+05:00");
QDateTime time = QDateTime::currentDateTime();
const int N = 10000;
@@ -5495,6 +5506,7 @@ namespace basic {
// Continue.
// Note: This is expected to _not_ take up to a minute.
dummyStatement(&bigv);
#endif
}
void testLongEvaluation2()
@@ -7039,6 +7051,7 @@ template <class X> int ffff(X x)
int main(int argc, char *argv[])
{
int z = ffff(3) + ffff(2.0);
Q_UNUSED(z);
#if USE_GUILIB
QApplication app(argc, argv);

View File

@@ -253,7 +253,7 @@ protected: // visiting functions:
virtual bool visit(ObjectLiteral *ast) { terminal(ast->lbraceToken); nonterminal(ast->properties); terminal(ast->rbraceToken); return false; }
virtual bool visit(ElementList *ast) { nonterminal(ast->next); terminal(ast->commaToken); nonterminal(ast->elision); nonterminal(ast->expression); return false; }
virtual bool visit(Elision *ast) { nonterminal(ast->next); terminal(ast->commaToken); return false; }
virtual bool visit(PropertyNameAndValueList *ast) { nonterminal(ast->name); terminal(ast->colonToken); nonterminal(ast->value); terminal(ast->commaToken); nonterminal(ast->next); return false; }
virtual bool visit(PropertyAssignmentList *ast) { nonterminal(ast->assignment); nonterminal(ast->next); terminal(ast->commaToken); return false; }
virtual bool visit(IdentifierPropertyName *ast) { terminal(ast->propertyNameToken); return false; }
virtual bool visit(StringLiteralPropertyName *ast) { terminal(ast->propertyNameToken); return false; }
virtual bool visit(NumericLiteralPropertyName *ast) { terminal(ast->propertyNameToken); return false; }