Skip to content

Commit

Permalink
A Data3D section is allowed to have 0 points (#263)
Browse files Browse the repository at this point in the history
See ASTM standard Table 9: "recordCount" shall be in the interval [0, 2^63).

Part of #262
  • Loading branch information
asmaloney authored Oct 20, 2023
1 parent e30d652 commit f1c3940
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
6 changes: 0 additions & 6 deletions src/E57SimpleData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ namespace e57
/// Validates a Data3D and throws on error.
void _validateData3D( const Data3D &inData3D )
{
if ( inData3D.pointCount < 1 )
{
throw E57_EXCEPTION2( ErrorValueOutOfBounds,
"pointCount=" + toString( inData3D.pointCount ) + " minimum=1" );
}

if ( inData3D.pointFields.pointRangeNodeType == NumericalNodeType::Integer )
{
throw E57_EXCEPTION2( ErrorInvalidNodeType, "pointRangeNodeType cannot be Integer" );
Expand Down
7 changes: 0 additions & 7 deletions test/src/test_SimpleData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@
#include "Helpers.h"
#include "TestData.h"

TEST( SimpleDataHeader, InvalidPointCount )
{
e57::Data3D dataHeader;

E57_ASSERT_THROW( e57::Data3DPointsFloat pointsData( dataHeader ) );
}

TEST( SimpleDataHeader, InvalidPointRangeNodeType )
{
e57::Data3D dataHeader;
Expand Down

0 comments on commit f1c3940

Please sign in to comment.