Skip to content

Commit

Permalink
BUG: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Punzo committed Apr 16, 2024
1 parent 00b8697 commit a8f9e5c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ int ctkDICOMSeriesItemWidgetTest1(int argc, char* argv[])
CHECK_BOOL(widget.stopJobs(), false);
CHECK_BOOL(widget.raiseJobsPriority(), false);
CHECK_BOOL(widget.isCloud(), false);
CHECK_BOOL(widget.IsLoaded(), false);
CHECK_BOOL(widget.IsVisible(), false);
CHECK_BOOL(widget.isLoaded(), false);
CHECK_BOOL(widget.isVisible(), false);
CHECK_INT(widget.thumbnailSizePixel(), 200);

// Test setting and getting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ int ctkDICOMServerNodeWidget2Test1(int argc, char* argv[])
ctkDICOMServer* server = new ctkDICOMServer();
server->setConnectionName("server");
widget.addServer(server);
CHECK_INT(widget.getNumberOfServers(), 3);
CHECK_INT(widget.serversCount(), 3);
CHECK_INT(widget.getServerIndexFromName("server"), 2);
CHECK_QSTRING(widget.getServerNameFromIndex(2), "server");
CHECK_QSTRING(widget.getServer("server")->connectionName(), server->connectionName());
widget.removeServer("server");
CHECK_INT(widget.getNumberOfServers(), 2);
CHECK_INT(widget.serversCount(), 2);
delete server;

if (!interactive)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,16 @@ int ctkDICOMVisualBrowserWidgetTest1(int argc, char* argv[])
CHECK_INT(browser.seriesAddedDuringImport(), 1);
CHECK_INT(browser.instancesAddedDuringImport(), 3);

qDebug().noquote() << "\n\n"
<< testName << ": Added to database directory: " << files;

browser.importDirectories(QStringList() << argv[1]);
browser.waitForImportFinished();

qDebug().noquote() << "\n\n"
<< testName << ": Added to database directory: " << files;

CHECK_INT(browser.patientsAddedDuringImport(), 1);
CHECK_INT(browser.studiesAddedDuringImport(), 1);
CHECK_INT(browser.seriesAddedDuringImport(), 1);
CHECK_INT(browser.instancesAddedDuringImport(), 100);
CHECK_INT(browser.patientsAddedDuringImport(), 0);
CHECK_INT(browser.studiesAddedDuringImport(), 0);
CHECK_INT(browser.seriesAddedDuringImport(), 0);
CHECK_INT(browser.instancesAddedDuringImport(), 97);

qDebug().noquote() << "\n\n"
<< testName << ": Added to database directory: " << dbDir;
Expand Down

0 comments on commit a8f9e5c

Please sign in to comment.