Browse Source

Merge pull request #743 from DonLakeFlyer/FTPUnitTestFix

FTP Unit Test fix
QGC4.4
Don Gagne 11 years ago
parent
commit
d5e79d3a79
  1. 5
      src/qgcunittest/QGCUASFileManagerTest.cc
  2. 1
      src/ui/QGCUASFileView.cc

5
src/qgcunittest/QGCUASFileManagerTest.cc

@ -146,15 +146,12 @@ void QGCUASFileManagerUnitTest::_listTest(void)
fileList << "Ddir" << "Ffoo" << "Fbar"; fileList << "Ddir" << "Ffoo" << "Fbar";
_mockFileServer.setFileList(fileList); _mockFileServer.setFileList(fileList);
QStringList fileListExpected;
fileListExpected << "dir/" << "foo" << "bar";
_fileListReceived.clear(); _fileListReceived.clear();
_fileManager->listDirectory("/"); _fileManager->listDirectory("/");
QCOMPARE(_multiSpy->checkSignalByMask(resetStatusMessagesSignalMask), true); // We should be told to reset status messages QCOMPARE(_multiSpy->checkSignalByMask(resetStatusMessagesSignalMask), true); // We should be told to reset status messages
QCOMPARE(_multiSpy->checkNoSignalByMask(errorMessageSignalMask), true); // We should not get an error signals QCOMPARE(_multiSpy->checkNoSignalByMask(errorMessageSignalMask), true); // We should not get an error signals
QVERIFY(_fileListReceived == fileListExpected); QVERIFY(_fileListReceived == fileList);
} }
void QGCUASFileManagerUnitTest::_validateFileContents(const QString& filePath, uint8_t length) void QGCUASFileManagerUnitTest::_validateFileContents(const QString& filePath, uint8_t length)

1
src/ui/QGCUASFileView.cc

@ -106,6 +106,7 @@ void QGCUASFileView::_treeStatusMessage(const QString& msg)
} }
} else { } else {
Q_ASSERT(false); Q_ASSERT(false);
return; // Silence maybe-unitialized on type below
} }
QTreeWidgetItem* item; QTreeWidgetItem* item;

Loading…
Cancel
Save