Skip to content

Commit

Permalink
Tentatively fix s390x test
Browse files Browse the repository at this point in the history
  • Loading branch information
SoniEx2 committed Mar 7, 2023
1 parent 4cd0ff1 commit a8005a6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test-interp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,13 @@ TEST_F(InterpTest, Rot13) {

EXPECT_LT(ptr + size, memory->ByteSize());

#if WABT_BIG_ENDIAN
std::copy(string_data.rbegin(), string_data.rbegin() + size,
memory->UnsafeData() + memory->ByteSize() - ptr - size);
#else
std::copy(string_data.begin(), string_data.begin() + size,
memory->UnsafeData() + ptr);
#endif

results[0].Set(size);
return Result::Ok;
Expand All @@ -527,8 +532,14 @@ TEST_F(InterpTest, Rot13) {
EXPECT_LT(ptr + size, memory->ByteSize());

string_data.resize(size);
#if WABT_BIG_ENDIAN
std::copy(memory->UnsafeData() + memory->ByteSize() - ptr - size,
memory->UnsafeData() + memory->ByteSize() - ptr,
string_data.rbegin());
#else
std::copy(memory->UnsafeData() + ptr, memory->UnsafeData() + ptr + size,
string_data.begin());
#endif

return Result::Ok;
};
Expand Down

0 comments on commit a8005a6

Please sign in to comment.