I am not sure, which sūtra this quote is taken from, but this is quoted in Śāntarakṣita’s Tattvasaṅgraha and Kamalaśīla’s commentary Tattvasaṅgrahapañjikā, as Buddhavacana.
tāpācchedācca nikaṣāt suvarṇamiva paṇḍitaiḥ /
parīkṣya bhikṣavo grāhyaṁ madvaco na tu gauravāt //
~ Tattvasaṅgraha (3587) ; Tattvasaṅgrahapañjikā (v.1-6)
Transl. : ‘O Bhikṣus, my words should be accepted by the wise, not out of regard for me, but after due investigation,—just as gold is accepted as true only after heating, cutting and rubbing’.
The same idea appears also at Tattvasaṅgraha (3343)
tāpācchedānnikaṣādvā kaladhautamivāmalam /
parīkṣyamāṇaṁ yannaiva vikriyāṁ pratipadyate //
Transl. : [The words of Buddha] are free from impurities, like gold tested by ‘heating’, ‘cutting’ and ‘touching’; and, like the gold, they do not undergo any change in the process of testing and investigation.
Kamalaśīla’s comm. on this śloka, which explains (3587) too, is as follows
ata eva “viśuddhasuvarṇavat parīkṣya grāhyabhetadvicakṣaṇeḥ” iti bhagavatoktam : ityetat śucayannāha- tāpādityādi / yathākaladhautaṁ suvarṇam amalaṁ sarvadoṣarahitaṁ parīkṣyamāṇaṁ tāpādibhir na vikriyāṁ pratipadyate tathā bhagavadvacoratnaṁ pratyakṣeṇa tāpasadr̥śena vastubalapravr̥ttānumānena nikaṣaprakhyeṇāgamāpekṣānumānāpi chedadr̥ṣṭāntasūcitena na vikriyate // ataḥ prekṣāpūrvakāriṇa evambhūtādevāgamāt pravr̥ttiryuktā nānyat ityabhiprāyaḥ //
Transl. : Just as gold, which is free from all impurities, pure, when tested by ‘Heating’, etc., does not undergo any change,—so also the jewel-like words of the Blessed Lord,—when tested—(a) by ‘Perception’, which is like ‘Heating’—(b) by ‘Inference’ based on the capacity of things, which is like ‘Touching—and (c) by Inference based on the Reliable Word, which is like ‘cutting’,—do not undergo any change. It is thus only right that the activity of intelligent men should proceed on the basis of such Reliable Word only,—not of any other. This is the purport of the Test.