  This paper describes the development and testing of a general relativistic
magnetohydrodynamic (GRMHD) code to study ideal MHD in the fixed background of
a Kerr black hole. The code is a direct extension of the hydrodynamic code of
Hawley, Smarr, and Wilson, and uses Evans and Hawley constrained transport (CT)
to evolve the magnetic fields. Two categories of test cases were undertaken. A
one dimensional version of the code (Minkowski metric) was used to verify code
performance in the special relativistic limit. The tests include Alfv\'en wave
propagation, fast and slow magnetosonic shocks, rarefaction waves, and both
relativistic and non-relativistic shock tubes. A series of one- and
two-dimensional tests were also carried out in the Kerr metric: magnetized
Bondi inflow, a magnetized inflow test due to Gammie, and two-dimensional
magnetized constant-$l$ tori that are subject to the magnetorotational
instability.
