base: Add enum to_number tests
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Fri, 12 Feb 2021 14:55:46 +0000 (11:55 -0300)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Mon, 15 Feb 2021 03:05:29 +0000 (03:05 +0000)
commit5a47a830d38388c6bd3721c12f253a3a90cf2cf4
tree94b20dd75c5053fa4037ed841fdfcbaea38eefce
parentde4487f848cc62c6c527707f87efd3ccbb8872a2
base: Add enum to_number tests

Add a test to convert a string containing a number into enums.

One of the tests has been disabled to highlight an error-prone
situation where a number that is not a valid enum manages to
be converted to an enum.

Change-Id: I7967c62feea335f3ffda40d8bf0334c20b53ee6c
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41334
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
src/base/str.test.cc