aaronhktan / jyut-dict

A free, open-source, offline Cantonese Dictionary for Windows, Mac, and Linux. Qt, SQLite. C++ and Python.
https://jyutdictionary.com
MIT License
126 stars 8 forks source link

#160: Write unit tests for SQLSearch #174

Closed aaronhktan closed 7 months ago

aaronhktan commented 7 months ago

Description

Part of a series of commits for #160.

Type of change

How Has This Been Tested?

Tested on all three platforms.

PASS    Executing test case TestSqlSearch
    Qt version: 5.15.12
    Qt build: Qt 5.15.12 (arm64-little_endian-lp64 shared (dynamic) release build; by Clang 15.0.0 (clang-1500.0.40.1) (Apple))
    QTest version: 5.15.12
PASS    Executing test function initTestCase
PASS    TestSqlSearch::initTestCase
    Execution took 0.038041 ms.
PASS    Executing test function searchSimplified
PASS    TestSqlSearch::searchSimplified
    Execution took 3.75446 ms.
PASS    Executing test function searchSimplifiedNoResults
PASS    TestSqlSearch::searchSimplifiedNoResults
    Execution took 1.11429 ms.
PASS    Executing test function searchTraditional
PASS    TestSqlSearch::searchTraditional
    Execution took 2.98029 ms.
PASS    Executing test function searchTraditionalNoResults
PASS    TestSqlSearch::searchTraditionalNoResults
    Execution took 0.9655 ms.
PASS    Executing test function searchJyutping
PASS    TestSqlSearch::searchJyutping
    Execution took 5.23442 ms.
PASS    Executing test function searchJyutpingNoResults
PASS    TestSqlSearch::searchJyutpingNoResults
    Execution took 1.93096 ms.
PASS    Executing test function searchPinyin
PASS    TestSqlSearch::searchPinyin
    Execution took 5.00858 ms.
PASS    Executing test function searchPinyinNoResults
PASS    TestSqlSearch::searchPinyinNoResults
    Execution took 1.70817 ms.
PASS    Executing test function searchEnglish
PASS    TestSqlSearch::searchEnglish
    Execution took 3.71446 ms.
PASS    Executing test function searchEnglishNoResults
PASS    TestSqlSearch::searchEnglishNoResults
    Execution took 0.59975 ms.
PASS    Executing test function searchAutoDetect
PASS    TestSqlSearch::searchAutoDetect
    Execution took 19.7345 ms.
PASS    Executing test function searchAutoDetectNoResults
PASS    TestSqlSearch::searchAutoDetectNoResults
    Execution took 2.96712 ms.
PASS    Executing test function searchUnique
PASS    TestSqlSearch::searchUnique
    Execution took 0.923375 ms.
PASS    Executing test function searchTraditionalSentences
PASS    TestSqlSearch::searchTraditionalSentences
    Execution took 0.373875 ms.
PASS    Executing test function cleanupTestCase
PASS    TestSqlSearch::cleanupTestCase
    Execution took 0.001458 ms.
    Test execution took 51.1339 ms.

Checklist: