I did not think to fail in the examination.
这个句子符合英语语法吗?
你的句子没有问题:
I did not think to fail in the examination. 我没想到会考试不及格。
有关 think to do sth 的用法,可参见薄冰老师的以下解答: