Add a unit test for state.RunCode().