Skip to content

Commit

Permalink
Allow empty delimiters.
Browse files Browse the repository at this point in the history
Signed-off-by: Joey Kleingers <[email protected]>
  • Loading branch information
joeykleingers committed Oct 11, 2023
1 parent 28930ec commit fd7e5f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ enum class IssueCodes
HEADER_LINE_OUT_OF_RANGE = -120,
START_IMPORT_ROW_OUT_OF_RANGE = -121,
EMPTY_HEADERS = -122,
EMPTY_DELIMITERS = -123,
IGNORED_TUPLE_DIMS = -200
};

Expand Down Expand Up @@ -417,11 +416,6 @@ IFilter::PreflightResult ImportTextDataFilter::preflightImpl(const DataStructure
return {ConvertResultTo<OutputActions>(std::move(ConvertResult(std::move(csvResult))), {}), {}};
}

if(textImporterData.delimiters.empty())
{
return {MakeErrorResult<OutputActions>(to_underlying(IssueCodes::EMPTY_DELIMITERS), "No delimiters have been chosen. Please choose at least one delimiter."), {}};
}

StringVector headers;
if(textImporterData.inputFilePath != s_HeaderCache[s_InstanceId].FilePath)
{
Expand Down
5 changes: 0 additions & 5 deletions src/Plugins/ComplexCore/test/ImportTextDataTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ constexpr int32 k_EmptyNames = -116;
constexpr int32 k_HeaderLineOutOfRange = -120;
constexpr int32 k_StartImportRowOutOfRange = -121;
constexpr int32 k_EmptyHeaders = -122;
constexpr int32 k_EmptyDelimiters = -123;
constexpr int32 k_FileDoesNotExist = -300;
} // namespace

Expand Down Expand Up @@ -473,10 +472,6 @@ TEST_CASE("ComplexCore::ImportTextDataFilter (Case 5): Invalid filter execution
// Inconsistent Columns
TestCase_TestImporterData_Error(k_TestInput.string(), 2, TextImporterData::HeaderMode::CUSTOM, 1, {','}, {"Custom Array", "Custom Array2"}, {DataType::int8, DataType::int8}, {false, false},
tupleDims, v, k_InconsistentCols);

// Empty Delimiters
TestCase_TestImporterData_Error(k_TestInput.string(), 2, TextImporterData::HeaderMode::CUSTOM, 1, {}, {"Custom Array", "Custom Array2"}, {DataType::int8, DataType::int8}, {false, false}, tupleDims,
v, k_EmptyDelimiters);
}

TEST_CASE("ComplexCore::ImportTextDataFilter (Case 6): Invalid filter execution - Blank Lines")
Expand Down

0 comments on commit fd7e5f0

Please sign in to comment.