McuSupport: Test Qt MCUs package legacy creation

Change-Id: I8e724e11f8342ef02a8ee7246fbf35e65e0166a1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Piotr Mućko
2022-06-17 16:12:33 +02:00
parent 73a0929bba
commit bc2aee1af5
4 changed files with 19 additions and 2 deletions

View File

@@ -874,4 +874,18 @@ void McuSupportTest::test_createBoardSdk()
verifyBoardSdk(boardSdk, environmentVariable, versions);
}
void McuSupportTest::test_legacy_createQtMCUsPackage()
{
EXPECT_CALL(*settingsMockPtr,
getPath(QString{Constants::SETTINGS_KEY_PACKAGE_QT_FOR_MCUS_SDK}, _, _))
.WillRepeatedly(Return(FilePath::fromString(qtForMcuSdkPath)));
McuPackagePtr qtForMCUsSDK = Sdk::createQtForMCUsPackage(settingsMockPtr);
QVERIFY(qtForMCUsSDK);
QCOMPARE(qtForMCUsSDK->settingsKey(), Constants::SETTINGS_KEY_PACKAGE_QT_FOR_MCUS_SDK);
QCOMPARE(qtForMCUsSDK->detectionPath(), Constants::QT_FOR_MCUS_SDK_PACKAGE_VALIDATION_PATH);
QCOMPARE(qtForMCUsSDK->path().toString(), qtForMcuSdkPath);
}
} // namespace McuSupport::Internal::Test