summaryrefslogtreecommitdiffstats
path: root/tests/expected/bitops/swapbytes
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:10:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:10:49 +0000
commitcfe5e3905201349e9cf3f95d52ff4bd100bde37d (patch)
treed0baf160cbee3195249d095f85e52d20c21acf02 /tests/expected/bitops/swapbytes
parentInitial commit. (diff)
downloadutil-linux-cfe5e3905201349e9cf3f95d52ff4bd100bde37d.tar.xz
util-linux-cfe5e3905201349e9cf3f95d52ff4bd100bde37d.zip
Adding upstream version 2.39.3.upstream/2.39.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/expected/bitops/swapbytes')
-rw-r--r--tests/expected/bitops/swapbytes21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/expected/bitops/swapbytes b/tests/expected/bitops/swapbytes
new file mode 100644
index 0000000..b9468a7
--- /dev/null
+++ b/tests/expected/bitops/swapbytes
@@ -0,0 +1,21 @@
+Testing swab16
+swab16(0x0001) = 0x0100
+swab16(0x1234) = 0x3412
+swab16(0xff00) = 0x00ff
+swab16(0x4000) = 0x0040
+swab16(0xfeff) = 0xfffe
+Testing swab32
+swab32(0x00000001) = 0x01000000
+swab32(0x80000000) = 0x00000080
+swab32(0x12345678) = 0x78563412
+swab32(0xffff0000) = 0x0000ffff
+swab32(0x00ff0000) = 0x0000ff00
+swab32(0xff000000) = 0x000000ff
+Testing swab64
+swab64(0x0000000000000001) = 0x0100000000000000
+swab64(0x8000000000000000) = 0x0000000000000080
+swab64(0x1234567812345678) = 0x7856341278563412
+swab64(0xffffffff00000000) = 0x00000000ffffffff
+swab64(0x00ff000000000000) = 0x000000000000ff00
+swab64(0xff00000000000000) = 0x00000000000000ff
+No errors found in the byteswap implementation