Skip to content

Instantly share code, notes, and snippets.

@nixeagle
Created July 23, 2010 22:03
Show Gist options
  • Save nixeagle/488104 to your computer and use it in GitHub Desktop.
Save nixeagle/488104 to your computer and use it in GitHub Desktop.
(test (integer->little-octets :suite root)
(is
(equals '(10) (nass.x86oid.opcodes::integer->little-octets 10))))
(is
(equals '(0 1) (nass.x86oid.opcodes::integer->little-octets 256))
"reverse of what is expected as this is for writing to disk.")
(is
(equals '(0 0) (nass.x86oid.opcodes::integer->little-octets 0 :size 2))
"reverse of what is expected as this is for writing to disk.")
(is (equals '(0 1 0 0) (nass.x86oid.opcodes::integer->little-octets 256 :size
4))
"reverse of what is expected as this is for writing to disk.")
(signals (simple-type-error
"reverse of what is expected as this is for writing to disk.")
(nass.x86oid.opcodes::integer->little-octets 0 :size 0))
(signals (error "vectorp is not yet implemented, so should error.")
(nass.x86oid.opcodes::integer->little-octets 0 :vectorp t))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment