tests, base: Added GTests for base/intmath.cc

Testing intmath.hh and intmath.cc. Here is the
list of the functions that are tested.
intmath.isPowerOf2, intmath.power, intmath.floorLog2,
intmath.ceilLog2, intmath.divCeil, intmath.roundUp,
intmath.roundDown. Other functions are not tested,
because they are not currently used and are dead code.

Change-Id: I150ac1b5cead93c6698a8c9e9cec80bd87ef181a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22081
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Mahyar Samani <msamani@ucdavis.edu>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
This commit is contained in:
Bobby R. Bruce
2019-10-22 14:35:29 -07:00
committed by Mahyar Samani
parent 92d04b102a
commit a37b8279af
3 changed files with 104 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ Source('hostinfo.cc')
Source('inet.cc')
Source('inifile.cc')
GTest('inifile.test', 'inifile.test.cc', 'inifile.cc', 'str.cc')
GTest('intmath.test', 'intmath.test.cc')
Source('logging.cc')
Source('match.cc')
GTest('match.test', 'match.test.cc', 'match.cc', 'str.cc')