Hello and welcome to e health forum.
Using a public toilet or a using a razor in such toilets does not result in HIV infection.
Since the HIV test was done (though it was not needed) , and it is negative, it confirms that you do not have HIV.
You might consult with your doctor or a HIV counselor, who can counsel you and clear any doubts that you may be having.