• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ QSKIP函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中QSKIP函数的典型用法代码示例。如果您正苦于以下问题:C++ QSKIP函数的具体用法?C++ QSKIP怎么用?C++ QSKIP使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了QSKIP函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: layout

void tst_QTextScriptEngine::thaiIsolatedSaraAm()
{
    if (QFontDatabase().families(QFontDatabase::Any).contains("Waree")) {
        QString s;
        s.append(QChar(0x0e33));

        QTextLayout layout(s, QFont("Waree"));
        layout.beginLayout();
        layout.createLine();
        layout.endLayout();

        QTextEngine *e = layout.engine();
        e->itemize();
        e->shape(0);

        QCOMPARE(e->layoutData->items[0].num_glyphs, ushort(3));

        unsigned short *logClusters = e->layoutData->logClustersPtr;
        QCOMPARE(logClusters[0], ushort(0));
    } else
        QSKIP("Cannot find Waree.", SkipAll);
}
开发者ID:PNIDigitalMedia,项目名称:emscripten-qt,代码行数:22,代码来源:tst_qtextscriptengine.cpp


示例2: QSKIP

void tst_QTabBar::sizeHints()
{
    QTabBar tabBar;
	QSKIP("To be fixed on Mac (font size below not large enough) and Linux QWS (probably too large for the screen).", SkipSingle);
    tabBar.setFont(QFont("Arial", 10));
    tabBar.addTab("tab 01");
    tabBar.addTab("tab 02");
    tabBar.addTab("tab 03");
    tabBar.addTab("tab 04");
    tabBar.addTab("tab 05");
    tabBar.addTab("tab 06");
    tabBar.addTab("This is tab7");
    tabBar.addTab("This is tab8");
    tabBar.addTab("This is tab9 with a very long title");

    // No eliding and no scrolling -> tabbar becomes very wide
    tabBar.setUsesScrollButtons(false);
    tabBar.setElideMode(Qt::ElideNone);
//    qDebug() << tabBar.minimumSizeHint() << tabBar.sizeHint();
    QVERIFY(tabBar.minimumSizeHint().width() > 700);
    QVERIFY(tabBar.sizeHint().width() > 700);

    // Scrolling enabled -> no reason to become very wide
    tabBar.setUsesScrollButtons(true);
 //   qDebug() << tabBar.minimumSizeHint() << tabBar.sizeHint();
    QVERIFY(tabBar.minimumSizeHint().width() < 200);
    QVERIFY(tabBar.sizeHint().width() > 700); // unchanged

    // Eliding enabled -> no reason to become very wide
    tabBar.setUsesScrollButtons(false);
    tabBar.setElideMode(Qt::ElideRight);
//    qDebug() << tabBar.minimumSizeHint() << tabBar.sizeHint();
    QVERIFY(tabBar.minimumSizeHint().width() < 500);
    QVERIFY(tabBar.sizeHint().width() > 700); // unchanged

    tabBar.addTab("This is tab10 with a very long title");
    QVERIFY(tabBar.minimumSizeHint().width() < 600);
    QVERIFY(tabBar.sizeHint().width() > 700); // unchanged
}
开发者ID:mpvader,项目名称:qt,代码行数:39,代码来源:tst_qtabbar.cpp


示例3: CntSymbianEngine

void TestSymbianEngine::ctors()
{
    QContactManager::Error error;
    QMap<QString, QString> params;

    // Ctor
    CntSymbianEngine *ce;
    ce = new CntSymbianEngine(params, &error);
    QVERIFY(ce != NULL);
    QVERIFY(error == QContactManager::NoError);
    if (error == QContactManager::NoError) {
        QVERIFY(ce->managerName() == CNT_SYMBIAN_MANAGER_NAME);
        QVERIFY(ce->m_contactFilter != 0);
        QVERIFY(ce->m_dataBase != 0);
        QVERIFY(ce->m_relationship != 0);
        QVERIFY(ce->m_transformContact != 0);
    } else {
        QSKIP("Error creating CntSymbianEngine in ctor", SkipSingle);
    }

    delete ce;
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:22,代码来源:ut_cntsymbianengine.cpp


示例4: QSKIP

void tst_QDirModel::hidden()
{
#ifndef Q_OS_UNIX
    QSKIP("Test not implemented on non-Unixes");
#else
    QDir current;
    current.mkdir(".qtest_hidden");

    QDirModel model;
    QModelIndex index = model.index(QDir::currentPath() + "/.qtest_hidden");
    //QVERIFY(!index.isValid()); // hidden items are not listed, but if you specify a valid path, it will give a valid index

    current.mkdir(".qtest_hidden/qtest_visible");
    QModelIndex index2 = model.index(QDir::currentPath() + "/.qtest_hidden/qtest_visible");
    QVERIFY(index2.isValid());

    QDirModel model2;
    model2.setFilter(model2.filter() | QDir::Hidden);
    index = model2.index(QDir::currentPath() + "/.qtest_hidden");
    QVERIFY(index.isValid());
#endif
}
开发者ID:KDE,项目名称:android-qt5-qtbase,代码行数:22,代码来源:tst_qdirmodel.cpp


示例5: defined

// TC_ID_3_x_3 : Call requestUpdate() with same value repeatedly
void TestQGeoPositionInfoSource::requestUpdate_repeatedCalls()
{
    CHECK_SOURCE_VALID;
#if defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
    QSKIP("Real GPS not suitable for autotesting, skipping the test.", SkipAll);
#endif

    QSignalSpy spyUpdate(m_source, SIGNAL(positionUpdated(const QGeoPositionInfo&)));
    QSignalSpy spyTimeout(m_source, SIGNAL(updateTimeout()));

    m_source->requestUpdate(7000);

    EXPECT_FAIL_WINCE_SEE_MOBILITY_337;

    QTRY_VERIFY_WITH_TIMEOUT((spyUpdate.count() > 0) && (spyTimeout.count() == 0), 7000);
    spyUpdate.clear();
    m_source->requestUpdate(7000);

    EXPECT_FAIL_WINCE_SEE_MOBILITY_337;

    QTRY_VERIFY_WITH_TIMEOUT((spyUpdate.count() > 0) && (spyTimeout.count() == 0), 7000);
}
开发者ID:ionionica,项目名称:qt-mobility,代码行数:23,代码来源:testqgeopositioninfosource.cpp


示例6: QSKIP

void tst_QCameraBackend::testCameraCaptureMetadata()
{
#ifndef Q_WS_MAEMO_6
    QSKIP("Capture metadata is supported only on harmattan");
#endif

    QCamera camera;
    QCameraImageCapture imageCapture(&camera);
    camera.exposure()->setFlashMode(QCameraExposure::FlashOff);

    QSignalSpy metadataSignal(&imageCapture, SIGNAL(imageMetadataAvailable(int,QString,QVariant)));
    QSignalSpy savedSignal(&imageCapture, SIGNAL(imageSaved(int,QString)));

    camera.start();

    QTRY_VERIFY(imageCapture.isReadyForCapture());

    int id = imageCapture.capture(QString::fromLatin1("/dev/null"));
    QTRY_VERIFY(!savedSignal.isEmpty());
    QVERIFY(!metadataSignal.isEmpty());
    QCOMPARE(metadataSignal.first().first().toInt(), id);
}
开发者ID:Elleo,项目名称:qtmultimedia,代码行数:22,代码来源:tst_qcamerabackend.cpp


示例7: QSKIP

void tst_QSocketNotifier::bogusFds()
{
#ifndef Q_OS_SYMBIAN
    //behaviour of QSocketNotifier with an invalid fd is totally different across OS
    //main point of this test was to check symbian backend doesn't crash
    QSKIP("test only for symbian", SkipAll);
#else
    QTest::ignoreMessage(QtWarningMsg, "QSocketNotifier: Internal error");
    QSocketNotifier max(std::numeric_limits<int>::max(), QSocketNotifier::Read);
    QTest::ignoreMessage(QtWarningMsg, "QSocketNotifier: Invalid socket specified");
    QTest::ignoreMessage(QtWarningMsg, "QSocketNotifier: Internal error");
    QSocketNotifier min(std::numeric_limits<int>::min(), QSocketNotifier::Write);
    QTest::ignoreMessage(QtWarningMsg, "QSocketNotifier: Internal error");
    //bogus magic number is the first pseudo socket descriptor from symbian socket engine.
    QSocketNotifier bogus(0x40000000, QSocketNotifier::Exception);
    QSocketNotifier largestlegal(FD_SETSIZE - 1, QSocketNotifier::Read);

    QSignalSpy maxspy(&max, SIGNAL(activated(int)));
    QSignalSpy minspy(&min, SIGNAL(activated(int)));
    QSignalSpy bogspy(&bogus, SIGNAL(activated(int)));
    QSignalSpy llspy(&largestlegal, SIGNAL(activated(int)));

    //generate some unrelated socket activity
    QTcpServer server;
    QVERIFY(server.listen(QHostAddress::LocalHost));
    connect(&server, SIGNAL(newConnection()), &QTestEventLoop::instance(), SLOT(exitLoop()));
    QTcpSocket client;
    client.connectToHost(QHostAddress::LocalHost, server.serverPort());
    QTestEventLoop::instance().enterLoop(5);
    QVERIFY(server.hasPendingConnections());

    //check no activity on bogus notifiers
    QCOMPARE(maxspy.count(), 0);
    QCOMPARE(minspy.count(), 0);
    QCOMPARE(bogspy.count(), 0);
    QCOMPARE(llspy.count(), 0);
#endif
}
开发者ID:sjinks,项目名称:repwatch_proxy,代码行数:38,代码来源:tst_qsocketnotifier.cpp


示例8: config

void AnimenfoFetcherTest::testHachimitsu() {
  KConfig config(QFINDTESTDATA("tellicotest.config"), KConfig::SimpleConfig);
  QString groupName = QLatin1String("AnimeNfo.com");
  if(!config.hasGroup(groupName)) {
    QSKIP("This test requires a config file.", SkipAll);
  }
  KConfigGroup cg(&config, groupName);

  Tellico::Fetch::FetchRequest request(Tellico::Data::Collection::Video, Tellico::Fetch::Keyword, "Hachimitsu to Clover");
  Tellico::Fetch::Fetcher::Ptr fetcher(new Tellico::Fetch::AnimeNfoFetcher(this));
  fetcher->readConfig(cg, cg.name());

  Tellico::Data::EntryList results = DO_FETCH1(fetcher, request, 1);

  QCOMPARE(results.size(), 1);

  // the first entry had better be the right one
  Tellico::Data::EntryPtr entry = results.at(0);
  QVERIFY(entry);

  QCOMPARE(entry->field("title"), QLatin1String("Hachimitsu to Clover"));
  QCOMPARE(entry->field("year"), QLatin1String("2005"));
  QCOMPARE(entry->field("episodes"), QLatin1String("26"));
  QCOMPARE(entry->field("keyword"), QLatin1String("TV"));
  QCOMPARE(entry->field("genre"), QLatin1String("Comedy; Drama; Romance"));
  QCOMPARE(entry->field("studio"), QLatin1String("J.C.STAFF"));
  QCOMPARE(entry->field("origtitle"), QString::fromUtf8("ハチミツとクローバー"));
  QCOMPARE(entry->field("director"), QString::fromUtf8("Kasai Kenichi (カサヰ ケンイチ)"));
  QCOMPARE(entry->field("writer"), QString::fromUtf8("Kuroda Yosuke (黒田洋介)"));
  QCOMPARE(entry->field("alttitle"), QLatin1String("Honey and Clover"));
  QCOMPARE(entry->field("animenfo-rating"), QLatin1String("9"));
  QVERIFY(entry->field("plot").startsWith(QLatin1String("Takemoto, Mayama, and Morita are students")));
  QVERIFY(!entry->field("cover").isEmpty());
  QVERIFY(!entry->field("animenfo").isEmpty());
  QStringList castList = Tellico::FieldFormat::splitTable(entry->field("cast"));
  QCOMPARE(castList.count(), 7);
  QCOMPARE(castList.at(0), QString::fromUtf8("Kudo Haruka (工藤晴香)::Hanamoto Hagumi"));
}
开发者ID:KDE,项目名称:tellico,代码行数:38,代码来源:animenfofetchertest.cpp


示例9: QSKIP

// To avoid hitting the cache, we first set the icon to s_altIconUrl (ibm.com),
// then back to s_iconUrl (kde.org) (to avoid messing up the favicons for the user ;)
void FavIconTest::testSetIconForURL()
{
    if ( !checkNetworkAccess() )
        QSKIP( "no network access", SkipAll );

    QSignalSpy spy( &m_favIconModule, SIGNAL(iconChanged(bool,QString,QString)) );
    QVERIFY( spy.isValid() );
    QCOMPARE( spy.count(), 0 );

    // The call to connect() triggers qdbus initialization stuff, while QSignalSpy doesn't...
    connect(&m_favIconModule, SIGNAL(iconChanged(bool,QString,QString)), &m_eventLoop, SLOT(quit()));

    m_favIconModule.setIconForUrl( QString( s_hostUrl ), QString( s_altIconUrl ) );

    qDebug( "called first setIconForUrl, waiting" );
    if ( spy.count() < 1 ) {
        m_eventLoop.exec( QEventLoop::ExcludeUserInputEvents );
    }

    QCOMPARE( spy.count(), 1 );
    QCOMPARE( spy[0][0].toBool(), false );
    QCOMPARE( spy[0][1].toString(), QString( s_hostUrl ) );
    QCOMPARE( spy[0][2].toString(), QString( "favicons/www.ibm.com" ) );

    m_favIconModule.setIconForUrl( QString( s_hostUrl ), QString( s_iconUrl ) );

    qDebug( "called setIconForUrl again, waiting" );
    if ( spy.count() < 2 ) {
        m_eventLoop.exec( QEventLoop::ExcludeUserInputEvents );
    }

    QCOMPARE( spy.count(), 2 );
    QCOMPARE( spy[1][0].toBool(), false );
    QCOMPARE( spy[1][1].toString(), QString( s_hostUrl ) );
    QCOMPARE( spy[1][2].toString(), QString( "favicons/www.google.com" ) );

    disconnect(&m_favIconModule, SIGNAL(iconChanged(bool,QString,QString)), &m_eventLoop, SLOT(quit()));
}
开发者ID:blue-shell,项目名称:folderview,代码行数:40,代码来源:favicontest.cpp


示例10: QSKIP

void tst_QCommandLineParser::testQuoteEscaping()
{
#ifdef QT_NO_PROCESS
    QSKIP("This test requires QProcess support");
#else
    QCoreApplication app(empty_argc, empty_argv);
    QProcess process;
    process.start("testhelper/qcommandlineparser_test_helper", QStringList() <<
            QString::number(QCommandLineParser::ParseAsCompactedShortOptions) <<
            "\\\\server\\path" <<
            "-DKEY1=\"VALUE1\""
            "-DQTBUG-15379=C:\\path\\'file.ext" <<
            "-DQTBUG-30628=C:\\temp\\'file'.ext");
    QVERIFY(process.waitForFinished(5000));
    QCOMPARE(process.exitStatus(), QProcess::NormalExit);
    QString output = process.readAll();
    QVERIFY2(!output.contains("ERROR"), qPrintable(output));
    QVERIFY2(output.contains("\\\\server\\path"), qPrintable(output));
    QVERIFY2(output.contains("KEY1=\"VALUE1\""), qPrintable(output));
    QVERIFY2(output.contains("QTBUG-15379=C:\\path\\'file.ext"), qPrintable(output));
    QVERIFY2(output.contains("QTBUG-30628=C:\\temp\\'file'.ext"), qPrintable(output));
#endif // !QT_NO_PROCESS
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:23,代码来源:tst_qcommandlineparser.cpp


示例11: defined

void tst_QScriptEngineDebugger::debuggerSignals()
{
#if defined(Q_OS_WINCE) && _WIN32_WCE < 0x600
    QSKIP("skipped due to high mem usage until task 261062 is fixed", SkipAll);
#endif

    QScriptEngine engine;
    QScriptEngineDebugger debugger;
    debugger.attachTo(&engine);
    debugger.setAutoShowStandardWindow(false);
    QSignalSpy evaluationSuspendedSpy(&debugger, SIGNAL(evaluationSuspended()));
    QSignalSpy evaluationResumedSpy(&debugger, SIGNAL(evaluationResumed()));
    QObject::connect(&debugger, SIGNAL(evaluationSuspended()),
                     debugger.action(QScriptEngineDebugger::ContinueAction),
                     SLOT(trigger()));
    engine.evaluate("123");
    QCOMPARE(evaluationSuspendedSpy.count(), 0);
    QCOMPARE(evaluationResumedSpy.count(), 0);
    engine.evaluate("debugger");
    QCoreApplication::processEvents();
    QCOMPARE(evaluationSuspendedSpy.count(), 1);
    QCOMPARE(evaluationResumedSpy.count(), 1);
}
开发者ID:RS102839,项目名称:qt,代码行数:23,代码来源:tst_qscriptenginedebugger.cpp


示例12: qputenv

void FavIconTest::initTestCase()
{
    QStandardPaths::setTestModeEnabled(true);

    // To avoid a runtime dependency on klauncher
    qputenv("KDE_FORK_SLAVES", "yes");
    // To let ctest exit, we shouldn't start kio_http_cache_cleaner
    qputenv("KIO_DISABLE_CACHE_CLEANER", "yes");
    // To get KJob::errorString() in English
    qputenv("LC_ALL", "en_US.UTF-8");

    if (!checkNetworkAccess()) {
        QSKIP("no network access", SkipAll);
    }

    // Ensure we start with no cache on disk
    const QString favIconCacheDir = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QStringLiteral("/favicons");
    QDir(favIconCacheDir).removeRecursively();
    QVERIFY(!QFileInfo::exists(favIconCacheDir));

    // Enable debug output
    QLoggingCategory::setFilterRules(QStringLiteral("kde.kio.favicons.debug=true"));
}
开发者ID:KDE,项目名称:kio,代码行数:23,代码来源:favicontest.cpp


示例13: QSKIP

void MoleculeFileTest::fileFormatDetectionWithCompression()
{
    // check that gzip compression is supported
    std::vector<std::string> compressionFormats =
        chemkit::MoleculeFile::compressionFormats();

    if(std::find(compressionFormats.begin(),
                 compressionFormats.end(),
                 "gz") == compressionFormats.end()){
        QSKIP("Gzip compression not supported", SkipSingle);
    }

    // create empty file object
    chemkit::MoleculeFile file;

    // try to set an invalid file format
    bool ret = file.setFileName("ethanol.dml.gz");

    // check return code and error string
    QVERIFY(ret == false);
    QCOMPARE(file.errorString().c_str(), "File format 'dml' is not supported.");

    // check file format and compression format
    QVERIFY(file.format() == 0);
    QCOMPARE(file.compressionFormat().c_str(), "gz");

    // try to set a valid file format
    ret = file.setFileName("ethanol.cml.gz");
    QVERIFY(file.format() != 0);

    // check file format and compression format
    QVERIFY(file.format() != 0);
    QCOMPARE(file.compressionFormat().c_str(), "gz");

    // check return code
    QVERIFY(ret == true);
}
开发者ID:NabilNoaman,项目名称:chemkit,代码行数:37,代码来源:moleculefiletest.cpp


示例14: QFETCH_GLOBAL

//----------------------------------------------------------------------------------
void tst_QTcpServer::maxPendingConnections()
{
    QFETCH_GLOBAL(bool, setProxy);
    if (setProxy) {
        QFETCH_GLOBAL(int, proxyType);
        if (proxyType == QNetworkProxy::Socks5Proxy) {
            QSKIP("With socks5 only 1 connection is allowed ever", SkipAll);
        }
    }
    //### sees to fail sometimes ... a timing issue with the test on windows
    QTcpServer server;
    server.setMaxPendingConnections(2);

    QTcpSocket socket1;
    QTcpSocket socket2;
    QTcpSocket socket3;

    QVERIFY(server.listen());

    socket1.connectToHost(QHostAddress::LocalHost, server.serverPort());
    socket2.connectToHost(QHostAddress::LocalHost, server.serverPort());
    socket3.connectToHost(QHostAddress::LocalHost, server.serverPort());

    QVERIFY(server.waitForNewConnection(5000));

    QVERIFY(server.hasPendingConnections());
    QVERIFY(server.nextPendingConnection());
    QVERIFY(server.hasPendingConnections());
    QVERIFY(server.nextPendingConnection());
    QVERIFY(!server.hasPendingConnections());
    QCOMPARE(server.nextPendingConnection(), (QTcpSocket*)0);

    QVERIFY(server.waitForNewConnection(5000));

    QVERIFY(server.hasPendingConnections());
    QVERIFY(server.nextPendingConnection());
}
开发者ID:husninazer,项目名称:qt,代码行数:38,代码来源:tst_qtcpserver.cpp


示例15: QSKIP

void tst_QWebEngineView::renderHints()
{
#if !defined(QWEBENGINEVIEW_RENDERHINTS)
    QSKIP("QWEBENGINEVIEW_RENDERHINTS");
#else
    QWebEngineView webView;

    // default is only text antialiasing + smooth pixmap transform
    QVERIFY(!(webView.renderHints() & QPainter::Antialiasing));
    QVERIFY(webView.renderHints() & QPainter::TextAntialiasing);
    QVERIFY(webView.renderHints() & QPainter::SmoothPixmapTransform);
    QVERIFY(!(webView.renderHints() & QPainter::HighQualityAntialiasing));

    webView.setRenderHint(QPainter::Antialiasing, true);
    QVERIFY(webView.renderHints() & QPainter::Antialiasing);
    QVERIFY(webView.renderHints() & QPainter::TextAntialiasing);
    QVERIFY(webView.renderHints() & QPainter::SmoothPixmapTransform);
    QVERIFY(!(webView.renderHints() & QPainter::HighQualityAntialiasing));

    webView.setRenderHint(QPainter::Antialiasing, false);
    QVERIFY(!(webView.renderHints() & QPainter::Antialiasing));
    QVERIFY(webView.renderHints() & QPainter::TextAntialiasing);
    QVERIFY(webView.renderHints() & QPainter::SmoothPixmapTransform);
    QVERIFY(!(webView.renderHints() & QPainter::HighQualityAntialiasing));

    webView.setRenderHint(QPainter::SmoothPixmapTransform, true);
    QVERIFY(!(webView.renderHints() & QPainter::Antialiasing));
    QVERIFY(webView.renderHints() & QPainter::TextAntialiasing);
    QVERIFY(webView.renderHints() & QPainter::SmoothPixmapTransform);
    QVERIFY(!(webView.renderHints() & QPainter::HighQualityAntialiasing));

    webView.setRenderHint(QPainter::SmoothPixmapTransform, false);
    QVERIFY(webView.renderHints() & QPainter::TextAntialiasing);
    QVERIFY(!(webView.renderHints() & QPainter::SmoothPixmapTransform));
    QVERIFY(!(webView.renderHints() & QPainter::HighQualityAntialiasing));
#endif
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:37,代码来源:tst_qwebengineview.cpp


示例16: QSKIP

void tst_QProcessEnvironment::putenv()
{
#ifdef Q_OS_WINCE
    QSKIP("Windows CE has no environment");
#else
    static const char envname[] = "WE_RE_SETTING_THIS_ENVIRONMENT_VARIABLE";
    static bool testRan = false;

    if (testRan)
        QFAIL("You cannot run this test more than once, since we modify the environment");
    testRan = true;

    QByteArray valBefore = qgetenv(envname);
    if (!valBefore.isNull())
        QFAIL("The environment variable we set in the environment is already set! -- please correct the test environment");
    QProcessEnvironment eBefore = QProcessEnvironment::systemEnvironment();

    qputenv(envname, "Hello, World");
    QByteArray valAfter = qgetenv(envname);
    QCOMPARE(valAfter, QByteArray("Hello, World"));

    QProcessEnvironment eAfter = QProcessEnvironment::systemEnvironment();

    QVERIFY(!eBefore.contains(envname));
    QVERIFY(eAfter.contains(envname));
    QCOMPARE(eAfter.value(envname), QString("Hello, World"));

# ifdef Q_OS_WIN
    // check case-insensitive too
    QString lower = envname;
    lower = lower.toLower();
    QVERIFY(!eBefore.contains(lower));
    QVERIFY(eAfter.contains(lower));
    QCOMPARE(eAfter.value(lower), QString("Hello, World"));
# endif
#endif
}
开发者ID:KDE,项目名称:android-qt5-qtbase,代码行数:37,代码来源:tst_qprocessenvironment.cpp


示例17: loadFace

void tst_QScriptEngine::gurmukhi()
{
    {
        FT_Face face = loadFace("lohit_pa.ttf");
        if (face) {
	    const ShapeTable shape_table [] = {
		{ { 0xA15, 0xA4D, 0xa39, 0x0 },
		  { 0x3b, 0x8b, 0x0 } },
		{ {0}, {0} }
	    };


	    const ShapeTable *s = shape_table;
	    while (s->unicode[0]) {
		QVERIFY( shaping(face, s, HB_Script_Gurmukhi) );
		++s;
	    }

            FT_Done_Face(face);
	} else {
	    QSKIP("couln't find lohit.punjabi.1.1.ttf");
	}
    }
}
开发者ID:KDE,项目名称:android-qt5-qtbase,代码行数:24,代码来源:main.cpp


示例18: e

void tst_QXml::exception()
{
#ifndef QT_NO_EXCEPTIONS
    QString message = QString::fromLatin1("message");
    int column = 3;
    int line = 2;
    QString publicId = QString::fromLatin1("publicId");
    QString systemId = QString::fromLatin1("systemId");

    try {
        QXmlParseException e(message, column, line, publicId, systemId);
        throw e;
    }
    catch (QXmlParseException e) {
        QCOMPARE(e.message(), message);
        QCOMPARE(e.columnNumber(), column);
        QCOMPARE(e.lineNumber(), line);
        QCOMPARE(e.publicId(), publicId);
        QCOMPARE(e.systemId(), systemId);
    }
#else
    QSKIP("Exceptions not available", SkipAll);
#endif
}
开发者ID:husninazer,项目名称:qt,代码行数:24,代码来源:tst_qxml.cpp


示例19: QSKIP

void Ut_MListNewView::testPerformance()
{
    QSKIP("currently doesn't work", SkipSingle);
    listViewPrivate->viewportTopLeft = QPoint(0, 0);
    listViewPrivate->viewportVisibleHeight = 800;
    for (int i = 0; i < 10; i++) {
        if (i % 1 == 0)
            listViewPrivate->viewportTopLeft = QPoint(0, 0);
        else
            listViewPrivate->viewportTopLeft = QPoint(0, 800);

        QModelIndex firstVisibleRow = listViewPrivate->locateVisibleIndexAt(listViewPrivate->viewportTopLeft.y());
        listViewPrivate->updateFirstVisibleRow(firstVisibleRow);
        QModelIndex lastVisibleRow = listViewPrivate->locateVisibleIndexAt(listViewPrivate->viewportTopLeft.y() + listViewPrivate->viewportVisibleHeight);
        listViewPrivate->updateLastVisibleRow(lastVisibleRow);

        QPoint firstVisibleItemPos(0, listViewPrivate->locatePosOfItem(firstVisibleRow));
        QPoint lastVisibleItemPos(0, listViewPrivate->locatePosOfItem(lastVisibleRow));
        listViewPrivate->removeInvisibleItems(firstVisibleItemPos, lastVisibleItemPos);

        if (listViewPrivate->model->rowCount() > 0)
            listViewPrivate->createVisibleItems(firstVisibleRow, lastVisibleRow);
    }
}
开发者ID:arcean,项目名称:libmeegotouch-framework,代码行数:24,代码来源:ut_mmulticolumnlistview.cpp


示例20: QSKIP

void TestDPPlugin::test_desktops()
{
    if (!m_isKwinActive)
        QSKIP("KWin inactive, skip Destkop panel tests");

    int current = plugin->currentDesktop();
    int total = plugin->numberOfDesktops();
    QVERIFY(total != 0);
    QVERIFY(current <= total);

    int number;
    if (total == 1)
        number = current;
    else
        number = current == (total - 1) ? current - 1 : current + 1;
    QSignalSpy spy(KWindowSystem::self(), SIGNAL(currentDesktopChanged(int)));
    plugin->setCurrentDesktop(number);
    QVERIFY(spy.wait(5000));
    QCOMPARE(plugin->currentDesktop(), number);

    plugin->setCurrentDesktop(current);
    QVERIFY(spy.wait(5000));
    QCOMPARE(plugin->currentDesktop(), current);
}
开发者ID:arcan1s,项目名称:awesome-widgets,代码行数:24,代码来源:testdpplugin.cpp



注:本文中的QSKIP函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ QS_OBJ_DICTIONARY函数代码示例发布时间:2022-05-30
下一篇:
C++ QRinput_free函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap