소스 검색

Fix SectionPairFileReaderIT tests for Windows platform

Patrick-Christopher Mattulat 1 년 전
부모
커밋
7d90c2368b

+ 0 - 1
test/cases/io/section-pair/reader/SectionPairFileReaderIT.cpp

@@ -43,7 +43,6 @@ namespace
   {
     SectionPairFileReaderParameter parameter{};
     shared_ptr<SectionPairDocument> document = make_shared<SectionPairDocument>();
-    document->reserveNewLine(NewLine::getUnixNewLine());
     parameter.setDocument(document);
     parameter.setFilePath(SectionPairFileReaderIT::getSectionPairFileLocation());
     SectionPairFileReader reader{parameter};

+ 2 - 0
test/cases/io/section-pair/reader/SectionPairFileReaderTest.cpp

@@ -39,6 +39,7 @@ namespace
         SectionPairFileReaderParameter parameter{};
         parameter.setFileExistenceEvaluator(make_shared<MockFileExistenceEvaluator>(_fileExists));
         parameter.setReader(make_shared<MockFileReader>());
+        parameter.setDocument(make_shared<SectionPairDocument>());
 
         return parameter;
       }
@@ -87,6 +88,7 @@ namespace
   TEST_F(SectionPairFileReaderTest, read)
   {
     SectionPairFileReaderParameter parameter = SectionPairFileReaderTest::createMockParameter(true);
+    parameter.getDocument()->reserveNewLine(NewLine::getUnixNewLine());
     SectionPairFileReader reader{parameter};
     shared_ptr<MockFileReader> mockFileReader = dynamic_pointer_cast<MockFileReader>(parameter.getReader());