Yes a Buddhist will not give up on faith even in the face of death. How do i know? Well it happened in my country (Sri Lanka).
When the English invaded and captured my country they forced christianity. Not at just gunpoint they were much artistic.
They took the Babies from their mothers and ordered my people to be converted but they did not. So then they impaled Babies and move on to children & then to men and later women. Whole villages were slaughtered this way by the so called "Religion of love & peace". Some people by the way accepted Christianity and received government jobs and other favors as presents. They & their children are to this day Christian.
No, It does not generate bad karma to accept death instead of conversion, actually every Buddhist should look forward to that. Our "Martyrs" do not take live they just lay their innocent lives with Mettha (Kindness) towards the killers themselves.
If you are wondering why it does not become a bad Karma. Because it does not include Hate. We die with kindness towards these foolish ones who force faith on to others.