diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-05-11 10:34:01 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-05-11 10:34:01 +0900 |
| commit | a7c8575fe3bd1e66c74bca8815503f6d95eebb8a (patch) | |
| tree | 986819ba5c8ac52f0a8bd06949e52679141e2b7f | |
| parent | bda88bdbea748be5457fec36e70409cc2118bade (diff) | |
| parent | 0759647f06b8041a4490f82175af030d2082609c (diff) | |
| download | mruby-a7c8575fe3bd1e66c74bca8815503f6d95eebb8a.tar.gz mruby-a7c8575fe3bd1e66c74bca8815503f6d95eebb8a.zip | |
Merge pull request #4023 from iwamatsu/fix-upstream
Fix test of mruby-pack with big-endian CPUs
| -rw-r--r-- | mrbgems/mruby-pack/test/pack.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-pack/test/pack.rb b/mrbgems/mruby-pack/test/pack.rb index f518ca4fa..1788c2b72 100644 --- a/mrbgems/mruby-pack/test/pack.rb +++ b/mrbgems/mruby-pack/test/pack.rb @@ -129,7 +129,7 @@ assert 'pack/unpack "i"' do if PACK_IS_LITTLE_ENDIAN str = "\xC7\xCF" + "\xFF" * (int_size-2) else - str = "\xFF" * (int_size-2) + "\xC7\xCF" + str = "\xFF" * (int_size-2) + "\xCF\xC7" end assert_pack 'i', str, [-12345] end @@ -141,7 +141,7 @@ assert 'pack/unpack "I"' do if PACK_IS_LITTLE_ENDIAN str = "\x39\x30" + "\0" * (uint_size-2) else - str = "\0" * (uint_size-2) + "\x39\x30" + str = "\0" * (uint_size-2) + "\x30\x39" end assert_pack 'I', str, [12345] end |
