Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/testOutput/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.csv
*.txt
*.xml
*.musicxml
4 changes: 2 additions & 2 deletions src/private/mx/examples/Write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ int main(int argc, const char *argv[])
#endif

// write to a file
mgr.writeToFile(documentID, "./example.musicxml");
mgr.writeToFile(documentID, "./data/testOutput/example.musicxml");

// we need to explicitly delete the object held by the manager
mgr.destroyDocument(documentID);

return 0;
}
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot

Suggested change
}
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/private/mx/examples/Write.cpp already ends with a trailing newline. I verified this locally and re-ran make check; there is no remaining diff to apply for this suggestion.

4 changes: 3 additions & 1 deletion src/private/mxtest/api/DocumentManagerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ TEST( sillyTest, DocumentManager )
score.encoding.encodingDate.day = 30;
score.copyright = "© 2016 by Matthew James Briggs";
auto documentId = DocumentManager::getInstance().createFromScore( score );
DocumentManager::getInstance().writeToFile( documentId, "./sillytest.xml" );
const std::string outputPath = std::string{mxtest::getResourcesDirectoryPath()} + "testOutput" +
FILE_PATH_SEPARATOR + "sillytest.xml";
DocumentManager::getInstance().writeToFile( documentId, outputPath );
DocumentManager::getInstance().destroyDocument( documentId );
}
T_END
Expand Down
5 changes: 4 additions & 1 deletion src/private/mxtest/api/RoundTrip.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "mx/api/DocumentManager.h"
#include "mxtest/control/CompileControl.h"
#include "mxtest/file/MxFileRepository.h"
#include "mxtest/file/Path.h"
#include <sstream>

namespace mxtest
Expand All @@ -21,7 +22,9 @@ inline void roundTrip()
auto scoreData = docMgr.getData(docId);
docMgr.destroyDocument(docId);
docId = docMgr.createFromScore(scoreData);
docMgr.writeToFile(docId, "./output.xml");
const std::string outputPath =
std::string{mxtest::getResourcesDirectoryPath()} + "testOutput" + FILE_PATH_SEPARATOR + "output.xml";
docMgr.writeToFile(docId, outputPath);
docMgr.destroyDocument(docId);
}

Expand Down