Skip to content

Fix DoubleArray tests

Sam Horvath requested to merge github/fork/agirault/fix-doublearray-tests into master

Created by: agirault

Corrects typo returning wrong value at the end of vtkMRMLDoubleArrayStorageNode::ReadDataInternal.

It is now returning 0 if the DoubleArray is empty. This is not a usual behavior as we should allow reading an empty node, but we are doing this for backward compatibility [1].

[1] https://github.com/jcfr/Slicer/commit/96afb52#diff-8f3fa951eccab26a6d68e04cb1488da0L200

This fixes those two failing tests:

  • vtkSlicerDoubleArraysLogicAddFileTest : the error was shown by improving the test in commit d36d5ba9
  • vtkMRMLDoubleArrayNodeTest1 : error discovered by @jcfr in #392

Merge request reports