base: Add enum to_number tests
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 <91779fc734d358d9575ec4910de29bfcbcaf1b22@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41334
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Reviewed-by: Bobby R. Bruce <b9dba908ffb6c6d8ffe449cc88b3709c13c485c2@ucdavis.edu>
Maintainer: Bobby R. Bruce <b9dba908ffb6c6d8ffe449cc88b3709c13c485c2@ucdavis.edu>

gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5