From 54909088e78d128c17dc79168e75e896ed32d625 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Tue, 22 Oct 2019 14:08:24 -0700 Subject: 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 Maintainer: Bobby R. Bruce Tested-by: kokoro --- src/sim/SConscript | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sim/SConscript') diff --git a/src/sim/SConscript b/src/sim/SConscript index 72b0f3df9..aacdb341d 100644 --- a/src/sim/SConscript +++ b/src/sim/SConscript @@ -77,6 +77,8 @@ Source('dvfs_handler.cc') Source('clocked_object.cc') Source('mathexpr.cc') +GTest('byteswap.test', 'byteswap.test.cc', '../base/types.cc') + if env['TARGET_ISA'] != 'null': SimObject('InstTracer.py') SimObject('Process.py') -- cgit v1.2.3