Skip to content

Commit

Permalink
Read/write test gtirb in binary mode
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjseitz committed Aug 26, 2024
1 parent 3b5766f commit 2e62c7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test/Main.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const gtirb::IR* getTestIr() { return TestIr; }

static void loadTestIr(std::string Filename) {
std::ifstream GtirbFile;
GtirbFile.open(Filename, std::ifstream::in);
GtirbFile.open(Filename, std::ifstream::in | std::ifstream::binary);

if (GtirbFile) {
auto MaybeTestIr = gtirb::IR::load(Ctx, GtirbFile);
Expand Down
2 changes: 1 addition & 1 deletion src/test/PrepTestGTIRB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main(int argc, char* argv[]) {
}

std::ofstream GtirbFile;
GtirbFile.open(GtirbFilename, std::ifstream::out);
GtirbFile.open(GtirbFilename, std::ifstream::out | std::ifstream::binary);

if (!GtirbFile) {
std::cerr << "*\n* Failed to create GTIRB file: " << GtirbFilename
Expand Down

0 comments on commit 2e62c7f

Please sign in to comment.