Question: Step 1. Write Unit Tests for 1.0adLeve'L( . . .) 1. Refer to Appendix A: Input Map Text File 2. Consider all the ways in

 Step 1. Write Unit Tests for 1.0adLeve'L( . . .) 1.

Step 1. Write Unit Tests for 1.0adLeve'L( . . .) 1. Refer to Appendix A: Input Map Text File 2. Consider all the ways in which reading the dungeon map from the file could go wrong and make tests (dungeon map files + code) that cause those things to happen. 3. Consider what values are created or updated and make tests that verify the values are correct. a. A test for load Level means creating a dungeon map file and directing the function to load the level from the file. b. You should end up with many different dungeon maps that exhibit different kinds of flaws and some that are valid. 4. Deallocate the map (if it was successfully created). Step 2. Write Unit Tests for getD'i rect'ion( . . .) 1. Consider all possible inputs and verify that the next row and column are correct. Step 3. Write Unit Tests for deleteMap( . . .) 1. Be honest with the function: it expects to get a pointer to a 2D array and a number of rows, you should tell it the correct number of rows (otherwise, there will be a memory leak and it will be your fault). 2. Don't double free/delete (don't re-deallocate memory that has already been deallocated)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!