Robin was sure to have done the work.
Who was sure? Was it Robin? Or was it another person who was sure that Robin had completed the work? If this was Robin, why would someone write the following sentence to say that Robin was sure?
Robin was sure that he had done the work.