If you mean the black and white are reversed then it won't know. If you mean the line and load connection are reversed then some of them will know and not reset.
Even the newer GFCIs that have wiring fault detection built in would not detect a reversing of the load side conductors. If the line side conductors were reversed then the newer type would not close until the reversal was corrected.
Nope, it would not have tripped. However, in the future, do it right the first time. I mean, how hard is it ? Black to black, white to white, ground is typically bare copper.
One of the skills for electrical (and life) is attention to detail and checking your work. I have wired hot to neutral by mistake initially ... but caught myself and made the correction before energizing the circuit.
Keep at it, you'll remember this little event as a 'teaching moment."