Over the span of Psalm 17:3–5, the examination of David moves from the heart
to the mouth
to the ways and steps of David. He declares his righteousness in his thoughts, words, and deeds. Thus, his earlier claim that he prays with lips free of deceit
would be proved true by the divine examination.1
3 You have tried my heart, you have visited me by night, you have tested me, and you will find nothing; I have purposed that my mouth will not transgress.