Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

here is the sample program of testing a constructor . Anyone knows how to implement this base on this( similar ) Here is my constructor,

image text in transcribedhere is the sample program of testing a constructor .
Anyone knows how to implement this base on this( similar )
Here is my constructor,
image text in transcribed
Just to test if state is=0 and face= initial state( apparently is)
Will print out passed if successful
image text in transcribed
Test GameofLife constructor and destr 37 evoid test game smoketest(Errorcontext &ec) f bool passi Gameof Life' my Game; A0 ec .DESC Test- Gameof Life Smoke test ec.DESC("Default constructor"); 43 pass true; 45 Construct a Default GameofLife boardsize should be set to MAX BoARD Game new GameofLife; pass yGame- getBoardsize() myGame->MAX BoARD); ec result(pass); 49 "Destruct Defualt Test Game"); ec-DESC( cleans up after previous test, destruct the object delete syGame; ec.DEsco custom constructor requesting a specific boad size"); pass true: II Construct a custom Gameoff Life boardsize should be set to what was requested yGame new Gameof Life(30); pass yare->getsoards 30); ec. ize() result (pass): 61 ec.DESCC Destruct custom Test Game"); 63 Cleans up after previous test, destruct the object elete Games Game rules test output from Debug Test GameofLife constructor and destr 37 evoid test game smoketest(Errorcontext &ec) f bool passi Gameof Life' my Game; A0 ec .DESC Test- Gameof Life Smoke test ec.DESC("Default constructor"); 43 pass true; 45 Construct a Default GameofLife boardsize should be set to MAX BoARD Game new GameofLife; pass yGame- getBoardsize() myGame->MAX BoARD); ec result(pass); 49 "Destruct Defualt Test Game"); ec-DESC( cleans up after previous test, destruct the object delete syGame; ec.DEsco custom constructor requesting a specific boad size"); pass true: II Construct a custom Gameoff Life boardsize should be set to what was requested yGame new Gameof Life(30); pass yare->getsoards 30); ec. ize() result (pass): 61 ec.DESCC Destruct custom Test Game"); 63 Cleans up after previous test, destruct the object elete Games Game rules test output from Debug

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions