Instructions: Read through the `giftcardreader.c` program (and its accompanying header, `giftcard.h`) to get a feel for it.
Question:
Instructions:
Read through the `giftcardreader.c` program (and its accompanying header, `giftcard.h`) to get a feel for it. You should also try building and running it with the included `examplefile.gft` file, to see what its normal output is. For this part, your job will be to find some flaws in the program, and
then create test cases (i.e., binary gift cards) that expose flaws in the program. You should write:
1. *Two* test cases, `crash1.gft` and `crash2.gft`, that cause the
program to crash; each crash should have a different root cause.
2. One test case, `hang.gft`, that causes the program to loop
infinitely. (Hint: you may want to examine the "animation" record type
to find a bug that causes the program to loop infinitely.)
3. A text file, `part2.txt` explaining the bug triggered by each of your
three test cases.
To create your own test files, you may want to refer to the `gengift.py` and `genanim.py` programs, which are Python scripts that create giftcard files of different types. Finally, fix the bugs that are triggered by your test cases, and verify that the program no longer crashes / hangs on your test cases. To make sure that these bugs don't come up again as the code evolves, have Github Actions automatically build and run the program on your test suit
giftcard.h #include
International Marketing And Export Management
ISBN: 9781292016924
8th Edition
Authors: Gerald Albaum , Alexander Josiassen , Edwin Duerr