Skip to content
Permalink
Browse files
Test suite should use endianness detection built in to vstruct
  • Loading branch information
ToxicFrog committed Jun 20, 2011
1 parent abb3aea commit 1475192
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
@@ -17,10 +17,12 @@ end

function e.big()
endianness = "big"
return endianness
end

function e.little()
endianness = "little"
return endianness
end

-- select whichever endianness the host system uses
@@ -92,9 +92,9 @@ function test.report()
return allfailed
end

-- determine host endianness - HACK HACK HACK
-- determine host endianness
function test.bigendian()
return string.byte(string.dump(function() end)) == 0x00
return require "vstruct.io" ("endianness", "host") == "big"
end

return test

0 comments on commit 1475192

Please sign in to comment.