Use result code constants in tests