Re: trim guage or sensor?
First of all, back on the transom shield is the steering fork and helmet. Be sure the rack and the gear that turns the trim sender are both there and working. The rack is only held on by 1 small nylon screw.
If all of that is ok, then the next test would be to test the potentiometer (aka trim sender) itself.
The gauges almost never fail, and there isn't any tests for them short of remove and replace. Biggest problem I have found for failed gauge is a missing rack or a bad potentiometer.
Here is how you can test the potentiometer.