Skip to content

Commit

Permalink
- Fix Unit test failure
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Nov 24, 2024
1 parent fef0e30 commit edb355f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Plugins/SimplnxCore/test/ComputeTriangleGeomVolumesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,20 @@ TEST_CASE("SimplnxCore::ComputeTriangleGeomSizes", "[SimplnxCore][ComputeTriangl
const DataPath kNxArrayPath = k_FeatureAttributeMatrixPath.createChildPath(k_VolumesArrayName);

const auto& kExemplarsArray = dataStructure.getDataRefAs<IDataArray>(kExemplarArrayPath);
const auto& kNxArray = dataStructure.getDataRefAs<IDataArray>(kNxArrayPath);

// The corrected version of the filter ensures there are no negative values. instead of
// uploading a new test file, we can just safely ensure the same applies to the
// exemplar data.
auto& exemplarData = dataStructure.getDataRefAs<Float32Array>(kExemplarArrayPath);
auto& resultStore = exemplarData.getIDataStoreRefAs<AbstractDataStore<float32>>();
for(auto& value : resultStore)
{
if(value < 0)
{
value = std::abs(value);
}
}
const auto& kNxArray = dataStructure.getDataRefAs<IDataArray>(kNxArrayPath);
CompareDataArrays<float32>(kExemplarsArray, kNxArray);
}

Expand Down
1 change: 1 addition & 0 deletions src/simplnx/Utilities/GeometryUtilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "simplnx/DataStructure/Geometry/INodeGeometry3D.hpp"
#include "simplnx/DataStructure/Geometry/ImageGeom.hpp"
#include "simplnx/DataStructure/Geometry/RectGridGeom.hpp"
#include "simplnx/DataStructure/Geometry/TriangleGeom.hpp"
#include "simplnx/Filter/IFilter.hpp"
#include "simplnx/Utilities/ParallelDataAlgorithm.hpp"

Expand Down

0 comments on commit edb355f

Please sign in to comment.