Skip to content

Commit

Permalink
COMP: Fix compilation of tests to account for API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfr committed Jan 13, 2024
1 parent 76597aa commit 4cf075e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ int ctkDICOMPatientItemWidgetTest1( int argc, char * argv [] )
CHECK_QSTRING(widget.filteringSeriesDescription(), "");
CHECK_INT(widget.filteringDate(), ctkDICOMPatientItemWidget::DateType::Any);
CHECK_INT(widget.numberOfStudiesPerPatient(), 2);
CHECK_INT(widget.numberOfSeriesPerRow(), 6);
CHECK_INT(widget.minimumThumbnailSize(), 300);
CHECK_INT(widget.thumbnailSize(), ctkDICOMStudyItemWidget::ThumbnailSizeOption::Medium);

// Test setting and getting
widget.setPatientItem("1");
Expand All @@ -61,10 +60,8 @@ int ctkDICOMPatientItemWidgetTest1( int argc, char * argv [] )
CHECK_INT(widget.filteringDate(), ctkDICOMPatientItemWidget::DateType::LastYear);
widget.setNumberOfStudiesPerPatient(6);
CHECK_INT(widget.numberOfStudiesPerPatient(), 6);
widget.setNumberOfSeriesPerRow(12);
CHECK_INT(widget.numberOfSeriesPerRow(), 12);
widget.setMinimumThumbnailSize(150);
CHECK_INT(widget.minimumThumbnailSize(), 150);
widget.setThumbnailSize(ctkDICOMStudyItemWidget::ThumbnailSizeOption::Small);
CHECK_INT(widget.thumbnailSize(), ctkDICOMStudyItemWidget::ThumbnailSizeOption::Small);

if (argc <= 2 || QString(argv[argc - 1]) != "-I")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int ctkDICOMSeriesItemWidgetTest1( int argc, char * argv [] )
CHECK_BOOL(widget.isCloud(), false);
CHECK_BOOL(widget.IsLoaded(), false);
CHECK_BOOL(widget.IsVisible(), false);
CHECK_INT(widget.thumbnailSize(), 300);
CHECK_INT(widget.thumbnailSizePixel(), 200);

// Test setting and getting
widget.setSeriesItem("1");
Expand All @@ -72,8 +72,8 @@ int ctkDICOMSeriesItemWidgetTest1( int argc, char * argv [] )
CHECK_BOOL(widget.stopJobs(), true);
widget.setRaiseJobsPriority(true);
CHECK_BOOL(widget.raiseJobsPriority(), true);
widget.setThumbnailSize(150);
CHECK_INT(widget.thumbnailSize(), 150);
widget.setThumbnailSizePixel(100);
CHECK_INT(widget.thumbnailSizePixel(), 100);

if (argc <= 2 || QString(argv[argc - 1]) != "-I")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ int ctkDICOMStudyItemWidgetTest1( int argc, char * argv [] )
CHECK_QSTRING(widget.filteringSeriesDescription(), "");
CHECK_BOOL(widget.collapsed(), false)
CHECK_BOOL(widget.selection(), false)
CHECK_INT(widget.numberOfSeriesPerRow(), 6);
CHECK_INT(widget.thumbnailSize(), 300);
CHECK_INT(widget.thumbnailSize(), ctkDICOMStudyItemWidget::ThumbnailSizeOption::Medium);

// Test setting and getting
widget.setStudyItem("1");
Expand All @@ -67,10 +66,8 @@ int ctkDICOMStudyItemWidgetTest1( int argc, char * argv [] )
CHECK_BOOL(widget.collapsed(), true);
widget.setSelection(true);
CHECK_BOOL(widget.selection(), true);
widget.setNumberOfSeriesPerRow(12);
CHECK_INT(widget.numberOfSeriesPerRow(), 12);
widget.setThumbnailSize(150);
CHECK_INT(widget.thumbnailSize(), 150);
widget.setThumbnailSize(ctkDICOMStudyItemWidget::ThumbnailSizeOption::Small);
CHECK_INT(widget.thumbnailSize(), ctkDICOMStudyItemWidget::ThumbnailSizeOption::Small);

if (argc <= 2 || QString(argv[argc - 1]) != "-I")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ int ctkDICOMVisualBrowserWidgetTest1( int argc, char * argv [] )
CHECK_QSTRING(browser.filteringModalities()[0], "Any");
CHECK_INT(browser.filteringDate(), ctkDICOMPatientItemWidget::DateType::Any);
CHECK_INT(browser.numberOfStudiesPerPatient(), 2);
CHECK_INT(browser.numberOfSeriesPerRow(), 6);
CHECK_INT(browser.minimumThumbnailSize(), 300);
CHECK_INT(browser.thumbnailSize(), ctkDICOMStudyItemWidget::ThumbnailSizeOption::Medium);
CHECK_BOOL(browser.isSendActionVisible(), false);
CHECK_BOOL(browser.isDeleteActionVisible(), true);

Expand Down Expand Up @@ -133,10 +132,8 @@ int ctkDICOMVisualBrowserWidgetTest1( int argc, char * argv [] )
CHECK_INT(browser.filteringDate(), ctkDICOMPatientItemWidget::DateType::LastYear);
browser.setNumberOfStudiesPerPatient(6);
CHECK_INT(browser.numberOfStudiesPerPatient(), 6);
browser.setNumberOfSeriesPerRow(12);
CHECK_INT(browser.numberOfSeriesPerRow(), 12);
browser.setMinimumThumbnailSize(150);
CHECK_INT(browser.minimumThumbnailSize(), 150);
browser.setThumbnailSize(ctkDICOMStudyItemWidget::ThumbnailSizeOption::Small);
CHECK_INT(browser.thumbnailSize(), ctkDICOMStudyItemWidget::ThumbnailSizeOption::Small);
browser.setSendActionVisible(true);
CHECK_BOOL(browser.isSendActionVisible(), true);
browser.setDeleteActionVisible(false);
Expand Down

0 comments on commit 4cf075e

Please sign in to comment.