tests: Added GTests for byteswap.hh
authorBobby R. Bruce <bbruce@ucdavis.edu>
Tue, 22 Oct 2019 21:08:24 +0000 (14:08 -0700)
committerMahyar Samani <msamani@ucdavis.edu>
Sat, 16 Nov 2019 07:25:58 +0000 (07:25 +0000)
commit54909088e78d128c17dc79168e75e896ed32d625
tree3ce3efb9ead011a4c392e1b9af6bbe9bb24d266e
parent1fd1d2ed267757e4ea50faeaf9c6d784aa1f0049
tests: Added GTests for byteswap.hh

In addition to the test, "#include base/logging.hh" was added to the
"byteswap.hh". It is is required to compile the header.

Added tests ByteswapTest.swap_byte64, ByteswapTest.swap_byte32,
ByteswapTest.swap_byte16, ByteswapTest.swap_byte, ByteswapTest.htog,
and ByteswapTest.gtoh. The file byteswap.hh is mostly templates.

Added test for BigEndianGuest and LittleEndianGuest namespaces.

Change-Id: I8870a55594ed439fe9e1fb333384f73261d1b1b8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22080
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
src/sim/SConscript
src/sim/byteswap.hh
src/sim/byteswap.test.cc [new file with mode: 0644]