Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

\f

Answered: 1 week ago