Remove useless functions in test5
Format the PrintTrace coding style
Replace the record type with scoped enumeration

The named enumeration is more robust than the static const variables.