[memprof] Use LineLocation in a unit test (NFC) (#116917)
This patch uses LineLocation in preference to FieldsAre to improve the
readability. The change makes the unit test a little more consistent
because we already use LineLocation in other tests in the same file.