Skip to content

Commit 26dff21

Browse files
committed
refactor test files, set text mode
1 parent 6b3e139 commit 26dff21

27 files changed

+1081
-46
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,10 @@ if (MRDOX_BUILD_TESTS)
163163
add_executable(mrdox_tests ${TEST_SOURCES})
164164
target_link_libraries(mrdox_tests PRIVATE mrdox_lib ${llvm_libs})
165165
target_include_directories(mrdox_tests PRIVATE ${PROJECT_SOURCE_DIR}/source/tests)
166-
add_test(NAME mrdox_tests COMMAND mrdox_tests "${PROJECT_SOURCE_DIR}/testfiles")
167-
#add_test(NAME mrdox_tests_bare COMMAND mrdox_tests "${PROJECT_SOURCE_DIR}/testfiles/bare")
166+
add_test(NAME mrdox_tests COMMAND mrdox_tests
167+
"${PROJECT_SOURCE_DIR}/tests/decls"
168+
"${PROJECT_SOURCE_DIR}/tests/javadoc"
169+
)
168170
source_group(TREE ${PROJECT_SOURCE_DIR} PREFIX "" FILES CMakeLists.txt)
169171
source_group(TREE ${PROJECT_SOURCE_DIR}/source/tests PREFIX "source" FILES ${TEST_SOURCES})
170172
endif()

source/lib/format/Asciidoc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ buildOne(
9898
ec,
9999
fs::CD_CreateAlways,
100100
fs::FA_Write,
101-
fs::OF_None);
101+
fs::OF_Text);
102102
if(R.error(ec, "open the stream for '", fileName, "'"))
103103
return false;
104104

source/lib/format/XML.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ buildOne(
3838
ec,
3939
fs::CD_CreateAlways,
4040
fs::FA_Write,
41-
fs::OF_None);
41+
fs::OF_Text);
4242
if(R.error(ec, "open a stream for '", fileName, "'"))
4343
return false;
4444

source/tests/Tester.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ checkOneFile(
102102
{
103103
// create the xml file and write to it
104104
R_.reportTestFailure();
105-
llvm::raw_fd_ostream os(outputPath, ec, llvm::sys::fs::OF_None);
105+
llvm::raw_fd_ostream os(outputPath, ec, llvm::sys::fs::OF_Text);
106106
if(R_.error(ec, "open the file '", outputPath, "' for writing"))
107107
return;
108108
os << xmlString;

testfiles/.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

testfiles/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
decls/*.adoc
2+
javadoc/*.adoc
File renamed without changes.

testfiles/decl-only/attributes_1.xml renamed to tests/decls/attributes_1.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</all>
88
<namespace name="">
99
<function name="f" id="s6nsa+zVhpzzrN+yUVPP5rvdXqs=">
10-
<file path="decl-only/attributes_1.cpp" line="2"/>
10+
<file path="attributes_1.cpp" line="2"/>
1111
<return name="_Bool"/>
1212
</function>
1313
</namespace>
File renamed without changes.

0 commit comments

Comments
 (0)