View Issue Details

IDProjectCategoryView StatusLast Update
0002065Slicer4Core: MRMLpublic2012-05-23 20:11
Reporterjcfr Assigned Topinter  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.2.0 
Summary0002065: Use the concept of "_data" in qMRMLNodeAttributeTableViewTest
Description

Test currently hard code the "test case", this should be probably be revised. See [1] for an example.

[1] https://github.com/Slicer/Slicer/blob/master/Base/QTCore/Testing/Cxx/qSlicerExtensionsManagerModelTest.cxx

TagsNo tags attached.

Relationships

parent of 0002069 closedpinter Test qSlicerDataModuleWidgetsCxxTests testRemove failed with an assert in qMRMLNodeAttributeTableView 

Activities

jcfr

jcfr

2012-05-16 12:20

administrator   ~0004437

Last edited: 2012-05-16 12:30

See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=20092

jcfr

jcfr

2012-05-16 12:32

administrator   ~0004440

Jc: Seems they were multiple people editing at the same time .. re-adding the note

Julien: Partially implemented in 20093

See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=20093

jcfr

jcfr

2012-05-16 13:33

administrator   ~0004443

"test_remove" function has been updated, there is now a "testRemove_data" slot that could serve as example.

See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=20096
Note that the commit message incorrectly reference issue 2064

pinter

pinter

2012-05-17 10:42

developer   ~0004465

Fixed in http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=20104

Notes (for non self-explanatory lines):
qMRMLNodeAttributeTableViewTest.cxx:124: vtkMRMLNode::SetAttribute asserts name to be not null, this is why the test failed
qMRMLNodeAttributeTableView.cxx:348: Causes test to fail if no item is found, which is a valid case
vtkMRMLNode.cxx:356: To meet the expected result in test (row "empty empty" and "empty valid" with setOnNode turned on in testSetAttribute)

pinter

pinter

2012-05-17 10:45

developer   ~0004466

Please close it if the tests pass on your OS too.

jcfr

jcfr

2012-05-17 11:17

administrator   ~0004474

The idea is to have the following methods in the test:

void testPopulate();
void testPopulate_data();

void testSelect();
void testSelect_data();

void testSetAttribute();
void testSetAttribute_data();

void testAdd();
void testAdd_data();

void testRemove();
void testRemove_data();

whereas currently the methods are the following:

void testPopulate();

void testSelect();

void testSetAttribute();
void testSetAttribute_data();

void testAdd();

void testRemove();
void testRemove_data();

pinter

pinter

2012-05-22 15:02

developer   ~0004567

I changed all the tests to use the "_data" concept in this revision:
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=20140

Please close if satisfactory. Thanks!

jcfr

jcfr

2012-05-22 15:07

administrator   ~0004568

Reminder sent to: finetjul

Hi Julien, I think this issue could be closed. What do you think ? Thanks Jc

Issue History

Date Modified Username Field Change
2012-05-16 11:38 jcfr New Issue
2012-05-16 11:39 jcfr Assigned To => pinter
2012-05-16 11:39 jcfr Status new => assigned
2012-05-16 11:39 jcfr Target Version => Slicer 4.2.0 AHM Summer 2012
2012-05-16 12:20 jcfr Note Added: 0004437
2012-05-16 12:30 jcfr Note Edited: 0004437
2012-05-16 12:32 jcfr Note Added: 0004440
2012-05-16 13:33 jcfr Note Added: 0004443
2012-05-16 13:35 jcfr Relationship added parent of 0002069
2012-05-17 10:42 pinter Note Added: 0004465
2012-05-17 10:45 pinter Note Added: 0004466
2012-05-17 10:45 pinter Status assigned => resolved
2012-05-17 10:45 pinter Resolution open => fixed
2012-05-17 11:17 jcfr Note Added: 0004474
2012-05-17 11:17 jcfr Status resolved => assigned
2012-05-22 15:02 pinter Note Added: 0004567
2012-05-22 15:07 jcfr Note Added: 0004568
2012-05-22 15:17 finetjul Status assigned => resolved
2012-05-22 15:17 finetjul Fixed in Version => Slicer 4.2.0 - Sept 1st 2012
2012-05-23 20:11 jcfr Status resolved => closed