mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-15 22:59:57 +00:00
port library
This commit is contained in:
@ -13,16 +13,16 @@ include_directories(
|
||||
${PROJECT_TRDPARTY_DIR}
|
||||
${Qt_INCLUDE}
|
||||
${Qt5Test_INCLUDE_DIRS}
|
||||
${Kf5_INCLUDE}
|
||||
${Kf6_INCLUDE}
|
||||
)
|
||||
|
||||
# library
|
||||
set(AWTESTLIBRARY_HEADERS awtestlibrary.h)
|
||||
set(AWTESTLIBRARY_SOURCES awtestlibrary.cpp)
|
||||
add_library(${SUBPROJECT}-awtest STATIC ${AWTESTLIBRARY_SOURCES} ${AWTESTLIBRARY_HEADERS})
|
||||
target_link_libraries(${SUBPROJECT}-awtest ${Qt_LIBRARIES} ${Qt5Test_LIBRARIES} ${Kf5_LIBRARIES})
|
||||
target_link_libraries(${SUBPROJECT}-awtest ${Qt_LIBRARIES} ${Qt5Test_LIBRARIES} ${Kf6_LIBRARIES})
|
||||
set(LIBRARY_TEST_SET ${SUBPROJECT}-awtest ${PROJECT_LIBRARY} ${PROJECT_MONITORSOURCES}
|
||||
${Qt_LIBRARIES} ${Kf5_LIBRARIES} ${Qt5Test_LIBRARIES})
|
||||
${Qt_LIBRARIES} ${Kf6_LIBRARIES} ${Qt5Test_LIBRARIES})
|
||||
|
||||
# modules
|
||||
set(TEST_MODULES
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "testawpatternfunctions.h"
|
||||
|
||||
#include <QRegularExpression>
|
||||
#include <QtTest>
|
||||
|
||||
#include "awpatternfunctions.h"
|
||||
@ -57,7 +58,7 @@ void TestAWPatternFunctions::test_findKeys()
|
||||
QStringList allKeys;
|
||||
for (int i = 0; i < count; i++) {
|
||||
auto key = AWTestLibrary::randomString(1, 20);
|
||||
while (allKeys.indexOf(QRegExp(QString("^%1.*").arg(key))) != -1)
|
||||
while (allKeys.indexOf(QRegularExpression(QString("^%1.*").arg(key))) != -1)
|
||||
key = AWTestLibrary::randomString(1, 20);
|
||||
allKeys.append(key);
|
||||
}
|
||||
|
Reference in New Issue
Block a user