Add more tests for enum constants.

These have consts defined both before and after their uses in order to
prevent bugs that depend on the order in which they are translated.