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

 here is the sample program of testing a constructor . Anyonehere is the sample program of testing a constructor .
Anyone knows how to implement this base on this( similar )
Here is my constructor,
knows how to implement this base on this( similar ) Here is
Just to test if state is=0 and face= initial state( apparently is)
Will print out passed if successful
my constructor, Just to test if state is=0 and face= initial state(

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

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 Databases Questions!