Changeset View
Changeset View
Standalone View
Standalone View
autotests/parser/SqlParserTest.cpp
Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Line(s) | 249 | if (ok) { | |||
---|---|---|---|---|---|
251 | ok = !expectError; | 251 | ok = !expectError; | ||
252 | message = QString("Unexpected success in SQL statement: \"%1\"; Result: %2") | 252 | message = QString("Unexpected success in SQL statement: \"%1\"; Result: %2") | ||
253 | .arg(sql.toString(), result.toString()); | 253 | .arg(sql.toString(), result.toString()); | ||
254 | if (ok) { | 254 | if (ok) { | ||
255 | qDebug() << "Result:" << result.toString(); | 255 | qDebug() << "Result:" << result.toString(); | ||
256 | } else { | 256 | } else { | ||
257 | m_errorStream << fname << ':' << lineNum << ' ' << message << endl; | 257 | m_errorStream << fname << ':' << lineNum << ' ' << message << endl; | ||
258 | if (parser->query()) { | 258 | if (parser->query()) { | ||
259 | qDebug() << *parser->query(); | 259 | const KDbConnectionAndQuerySchema connQuery(parser->connection(), *parser->query()); | ||
260 | m_errorStream << KDbUtils::debugString(*parser->query()) << endl; | 260 | qDebug() << connQuery; | ||
261 | m_errorStream << KDbUtils::debugString(connQuery) << endl; | ||||
261 | } | 262 | } | ||
262 | } | 263 | } | ||
263 | QVERIFY2(ok, qPrintable(message)); | 264 | QVERIFY2(ok, qPrintable(message)); | ||
264 | } | 265 | } | ||
265 | else { | 266 | else { | ||
266 | // failure, so error should be expected | 267 | // failure, so error should be expected | ||
267 | ok = expectError; | 268 | ok = expectError; | ||
268 | message = QString("%1; Failed SQL Statement:\n\"%2\"\n %3^\n") | 269 | message = QString("%1; Failed SQL Statement:\n\"%2\"\n %3^\n") | ||
▲ Show 20 Lines • Show All 99 Lines • Show Last 20 Lines |