Module Testing and Integration

Designed by: Johan Raffin

Version: 1.0

Previous Versions: None.

Last Updated: 04/29/98

Note: Certain methods have not tested because they either are not supported by the program or they are incomplete. The Loop object is not tested since it is incomplete (earliest update of this document before testing started is April 15, 1998). The Undo object is not tested as certain variables, that should be in some other objects, do not exists. Those variables are necessary in order to test the Undo() object.

 

Testing the Command and Parser Object: Tested by Kunal Mittal

Note: Make sure that the graphical representation of each nodes(null, uninitialized) and pointer (color for next/prev) are correct during the different testing phases. Make sure that the String Buffer Executed variable in the Command Line object holds the proper commands you have typed in for all the tests described below.

 

Test I:

Note: if the Error object is not working, then simply make sure that the appropriate error call is sent to the Error object.

1) Disable the Evaluate() method. Create a routine that will generate proper C++ syntax to create several small singly linked list of int nodes from p, q , r and s initial pointers. Make sure that your code will involve all the tokens mentioned in the the Command object class under the enumerated type TokenType.

2) Use the Parse() method to parse the code you have typed. Test the appearance of all the tokens (i.e.: make sure that the commands are translated in the corresponding token) passed in except for NODE_VALUE and BOOLEAN_LITERAL. Make sure that the function Parse() returns true.

3) Also check that all the tokens are properly stored in the Tokens[] array and that the numberOfTokens variables contains the right value. Make sure that the String Buffer Executed variable in the Command Line object holds the proper commands you have typed in.

4) Repeat step 1 to 3 but decrease the size of the Tokens[] array to 5 instead of 50. Make sure that your routine that generates code that will be evaluated to more than 5 tokens. Make sure that an error message is sent to the error object and that it is displayed properly. When done with this step make sure that you set the array size of Tokens back to 50.

3) Repeat step 1 to 2 using the standard input interface.

 

Test II:

1) Repeat step 1 and 2 of Test I but this time make sure that you have thrown several syntax error in your code. Some syntax error example: "t - > nexte = ney IntNod," (This should be "p->next = new IntNode;"). Try "r->next->data;". This should not generate an error even if it is not a complete line of code. Also try some syntax such as : "p->data= Hello" when you have an int node. Make sure that all the errors are correctly displayed or sent to the Error object. Check that this method checks if we are using a singly, doubly or tree node. Make sure that the function Parse() returns false.

2) Check that all the errors have properly been reported and that the correct error message is sent/displayed.

3) Additionally try to pass in: delete p->next->prev; . This should generate an error since you are using a singly linked list. Check that the appropriate error message is displayed.

4) Alter your code again to generate a parenthesis mismatched.

 

Test III:

1) Repeat step 1 of Test I but throw in a few blank lines in your code.

2) Check that the Parse() method returns true.

3) Repeat step 1 and 2 using the standard interface.

 

Test IV:

1) enable the Evaluate() method. Create a routine that will generate proper C++ syntax to create several small singly linked list of int nodes from p, q , r and s initial pointers. Make sure that your code will involve all the tokens mentioned in the the Command object class under the enumerated type TokenType (except the BOOLEAN_LITERAL and NODE_VALUE).

2) Use the Parse() method to parse the code you have typed. Test the translation of all code into the tokens (i.e.: make sure that the commands are translated in the corresponding token. Pay special attention that the arrow is properly translated) passed in except for NODE_VALUE and BOOLEAN_LITERAL. Make sure that the function Parse() returns true.

3) Also check that all the tokens are properly stored in theTokens[] array and that the numberOfTokens variables contains the right value.

4) Call the Evaluate() method and make sure that every lines of code is evaluated properly. Check that all the tokens are pushed/popped from the stack in logical order. You will have to refer to the algorithm description in Command::Evaluate() design to see the different cases.

5) For every line of code being parsed and the evaluated make sure that the proper calls to all the methods in the MasterNode object, MasterLine object, MasterLink object, and Node::GetLoc().

6) Make sure that the proper nodes, and links are drawn on the screen at the correct place. Check for correctness of merged links too.

 

Test V:

1) Repeat step 1 and 2 of Test I but this time make sure that you have thrown several syntax error in your code. Some syntax error example: "t - > nexte = ney IntNod," (This should be "p->next = new IntNode;") Make sure that the line containing "- > " is reported as an error as we do not have a MINUS token. Try "r->next->data;". This should generate an error as the line of code is not complete. Also try some syntax such as : "p->data= Hello" when you have an int node. Make sure that all the errors are correctly displayed or sent to the Error object. Check that this method checks if we are using a singly, doubly or tree node. Make sure that the function Parse() returns false.

2) Check that all the errors have properly been reported and that the correct error message is sent/displayed.

3) Additionally try to pass in: delete p->next->prev; . This should generate an error since you are using a singly linked list. Check that the appropriate error message is displayed.

4) Alter your code again to generate a parenthesis mismatched.

 

 

Testing the Node Object: Tested by Joe Squire

Note: Make sure that the graphical representation of each nodes(null, uninitialized) and pointer (color for next/prev) are correct during the different testing phases.

Test I:

1) Create three int nodes of type singly linked using the standard java syntax t(repeat the steps below creating a node of type char). Use the standard input interface to create three node of type int if the command obecjt and parser work (i.e.: have already been tested).

2) Set the node type to Singly using the appropriate function (also try using the interface making sure that the right function is called). Make sure the node type was set properly. Also try using a character else than S, D or T and check to see if nothing happens. Theoretically this could never happen since the user has a limited choice. However, we need to make sure that the program should not go on with a different node type.

3) Use the appropriate functions in the Node class to set the data fields in the nodes and the next pointers.

4) Check to see if the next pointers are set properly using the class functions. Also check the data stored in the data field using the appropriate function. Also try to get the prev pointer. This should not be possible.

5) Repeat step 1- 4 but create a Doubly linked list. Test if the correct pointers and data a set properly.

 

Test II:

1) Create a singly linked node of type string . Call the SetDimensions() method using any of the given dimensions.

2) Call the DrawMe() method and check to see if the appropriate (i.e.: singly here) node is drawn on the screen. Specially check if the correct node type is correctly set in the Type field.

3) Use the GetLoc() methods to return the coordinates of the node on the screen. Make sure that it returned the appropriate coordinates.

3) Repeat step 1 and 2 using a doubly link list and then a Tree node.

 

Test III:

1) Create a node of type int using the standard interface.

2) Store the data in the node with a number greater than 3 digits. Check that the appropriate error message is displayed.

3) Repeat step 1 and 2 using characters instead of integers.

4) Create another node of type int and insert some characters/symbols in the data field. Check that the appropriate error message is displayed.

5) Create a node of type int and leave the data field blank. Make sure the right error message is displayed

6) Repeat step 5 using characters for the data field.

 

 

Testing the Master Node Object: Tested by Tom Walcott

Note: Make sure that the graphical representation of each nodes(null, uninitialized) and pointer (color for next/prev) are correct during the different testing phases.

Test I:

1) Create two nodes using the constructor (Node1 and Node2). You can also use the command interface, but you need to check if the constructor is called properly. The nodes should be of type char. Use a doubly linked list ( assume the constructor should call the 2 dimensional array to store the nodes). Both nodes should be leaving the p pointer.

2) Check to see if all the set functions from the Node object have been called. Also check to see that the data and pointer fields are set correctly as well as the node type. The 2 dimensional array containing the two new nodes should have an entry in the array at position 0 for first index and then the name of the array (e.g.:[0][Node1] and [0][Node2]).

3) See that MasterNode::DrawNodes() calls Node::DrawMe() two times since we created 2 nodes. Check that the GetNodeType() method returned the correct node type.

4) Check to see if the appropriate nodes have been displayed on the screen (at the correct location) with the correct data field.

5) Repeat step 1 but using some starting nodes different than p, q ,r and s. Check that the correct error message is passed on to the Error object.

 

Test II:

1) Create two tree nodes of type int. Check that they are properly displayed on the screen.

2) Create a third tree node that is stored at the location of the second node. Check to see if the data is updated in the node array and that the 3rd node has been drawn over the second node. The second node should not exist anymore. Check that all the information regarding the second node has been replaced by the third one.

3) Create 33 tree nodes (char type) starting at the q pointer. Make sure that the appropriate error message is displayed since we can only have a maximum of 32 nodes. You can also reduce the maximum size of nodes allowed to 5 and create 6 nodes. This will avoid creating 33 nodes.

 

Test III:

1) Create a doubly linked list of type int with two nodes (Node1 and Node2) linked together without using the standard command line interface. When creating the node make sure they are leaving from either p, q ,r and s initial pointers that you would have previously created. Node1 should have prev pointer set to p, and its next set to Node2. Node2 should have its next pointer set to NULL and its prev going to Node2.

2) Call the LeakCheck() method . Make sure that the methods check the node type correctly. The return value for both nodes from the method should be true. Make sure that the Node:SetReachable() is called for both nodes.

3) Check that the isReachable field in both nodes has been set to true by calling Node::IsReachable() and the boolean value true has been returned for each nodes.

4) Set the next pointer of Node1 to NULL. Call LeakCheck() again. The method should give an error as the node is not reachable.

5) Now, set the prev pointer of Node2 to NULL. Call LeakCheck(). An error message should be displayed stating that we have a memory leak. Check that the message is displayed correctly and that it is the correct message too.

6) Make the next pointer of Node1 point to Node2; but set the prev pointer of Node1 and next pointer of p to NULL. Call LeakCheck(). You should obtain the same error as in step 5.

 

Test IV:

1) Using the standard interface (the command line) create 2 char nodes of tree type.

2) Change the node type to singly linked list (parameter S) once using the interface and the other time using the appropriate method (SetNodeType()). Make sure that an error message is appropriately displayed.

 

Test V:  ( Testing the DeleteNode() )

1) Create a doubly linked list with 5 int nodes (Node1 to Node5) using standard Java syntax.

2) Delete Node2 to Node4. Make sure that the Node::GetLoc() has been called appropriately for each node and returned the correct node location on the screen. Check that the DeleteNode() has called the MasterLink::DeleteLinkTo() and DeleteLinkFrom() 3 times. Check that the nodeArray entries do not contains those nodes anymore (i.e.: no node names, nest/prev/data fields). Also check that Node1 next pointer = NULL and Node5 prev pointer = NULL. Make sure that an error message for leakages is displayed on the screen.

3) Also check that the prevLink[][] and nextLink[][] in the MasterLink have been cleared of their entries related to Node2 to Node4.

4) Check that the nodes and links have been correctly erased on the screen.

5) Set the next pointer of node1 to Node5. The error message for leakage should disappear.

6) Check that both the nodeArray (in MasterNode) and the nextLink array (in MasterLink) have been updated accordingly. Check that the links have been properly drawn on the screen to the appropriate nodes.

7) Call the DeleteNode() on a node that does not exist. Make sure that the appropriate error message is displayed.

8) Repeat step 1 to 7 using a singly linked list and a tree. Do not perform any of the instructions in step 1-7 regarding the prev pointer when using a singly linked list.

 

Testing the Error Object: Tested by Dave Sager

(Note that we do not require heavy testing on the Error object as it is tested throughout the testing of other objects and methods).

Test I:

1) Use the DrawError() method and type in any error messages of different length.

2) Check that a pop up window appears with the message correctly displayed. Also check to see if the "exit" button works properly. Check that the error window in the center of the screen.

3) See that the isError variable is set to true.

4) Call the isError() method and check that the isError variable is now set to false.

 

Test II:

1) Try sending an error message from an other object to see if the error message is acknowledged by the error object and displayed accordingly.

2) Check that the isError variable is set to true.

3) Correct the error and make sure that the IsError() has been called. Confirm that the isError var is now set back to false.

 

Testing the Lesson Object:

Note: Make sure that the StringBuffer Executed variable in the Command Line object remains empty at all time since we are not logging the commands called when opening a lesson.

(Note: CheckDone() is not tested since we are not supporting this feature in this version)

Test I: (Manually calling the functions (i.e.: not using the standard interface) assuming that the parser and command object have been tested)

1) Store a set of instruction of fairly large size in the lessonInstruction variable.

2) Call the ShowInstruction() method and check that the instructions type are displayed properly. Also check that the lesson window is at its proper location and can be moved around.

 

Test II:

1) Using the standard interface store a set of instruction of fairly large size in the lessonInstruction variable.

2) Under the Lesson menu go to the "Show Lesson Instructions..." option. This option should be disabled at the time since we have not opened a lesson yet.

3) Open one of our lesson. Now make sure you can view the correct lesson instructions (The option should be enabled).

 

Test III:

1) Using the standard interface, open a lesson and give it a valid URL where one of our lessons (that is a lesson we have created - one where there is no loops involved in the starting code - also make sure that there is no end state) is stored. Check that the selected lesson is properly displayed on the screen and that the correct instructions are displayed.

2) Check that the startCode variable does contain the current code for the start state of a lesson.

3) Make sure that the lesson instructions are saved in the lessonInstructions variable.

4) Check that all the "code" lines in the lesson file are fed through the parser and that the correct nodes and links are displayed properly on the screen.

5) Check that the nodeArray in MasterNode contains the right nodes (and that the other indexes are initialized - same for link and line arrays). Also check that the line and link object also contains the correct information (i.e: proper next/prev pointer, correct data and node locations,...). Check that the methods to draw the links and nodes have been called with the correct parameters. Also make sure that the log file (StringBuffer Executed in the Command Line object) contains the correct information (commands from the current lesson).

6) Repeat step 1 to 5 but this time load a lesson ( selecting a lesson under either the singly linked lesson, doubly linked lesson, or tree lesson headers) with an end state and make sure that the information is stored correctly in the Node, Link and Line object and that the right nodes and links are drawn on the screen.Make sure that the previous lesson has been overwritten correctly and that all the objects contain the new information. Make sure that the log file contains the new commands from the current lesson.

7) Repeat step 1 to 6 but choose a lesson with a loop (i.e: the code in the lesson calls a loop to draw the start state and/or the end state). Choose a lesson under a different header than in step 6. Check that everything is correct (see step 6 and 5 for detail).

8) Restart the lesson by selecting the "start lesson over..." menu. Make sure that the right nodes are displayed on the screen and that all the object contain the correct information.

9) Close the lesson in step 9 and re-open a new lesson. After closing the lesson make sure that all objects have been initialized as well as the log file. This time pass in an invalid URL and make sure that the correct error message is displayed. Check to see that the isError variable is set to true.

 

Test III:

1) Create a small lesson , its starting state (e.g.: a singly linked list starting at q with int nodes) and save it in the startCode variable.

2) Call the LoadStartState() method making sure that the Command::Parse() and Command::Evaluate() methods are called properly. Check that each line is send to the parer one line at a time and that they are parsed correctly. Make sure that the nodes and links are drawn appropriately. Check the log file (StringBuffer Executed) in the Command line object. This file should be empty.

3) Repeat step 1 and 2, but this time create the start sate using a for loop. Make sure that the method detected the for loop and stored all the lines pertaining to the for loop (i.e.: when reach a "}" character) in a temporary string which is sent to the loop object.

 4) Repeat step 3 but this time using a while loop.

 

 

Testing the Command Line Object:

Test I:

1) Without using the standard input interface save a proper C++ syntax line of code to create a node. Store that line of code in the command variable (which is of type string).

2) Call the AddText() method. Make sure that the GetTextInProgress() is called. At this point GetTextInProgress() should return an empty string since the InProgress variable (which is of type StringBuffer) is empty. Therefore, check that an empty string (or blank line) is added in the Executed variable.

3) Check that the SetTextInProgress() is called and that it properly stored what is in the command variable in the InProgress variable.

4) Make sure the runCommand() method is called. Check that Command::Parse() is called with the proper input parameter. Make sure that the line of codes have been parsed properly.

5) Create an other proper C++ syntax line of code to add a node to the one previously created. Repeat step 1 to 4 paying special attention that the GetTextInProgess() method return the string entered in step 1. Make sure that the new line of code is stored/passed properly amongst the different methods.

 

Test II:

1) Write a few lines of correct code to create a doubly linked list starting at q pointer (Nodes are of type char).

2) Make sure that the GetTextExecuted() method is called and that the code you have typed in is properly displayed.

 

 

Testing the CPMenu Object: Tested by Jennifer Wasserstrass

Note: CheckDone() is not tested as we do not support it in this program version. Furthermore, the test below are testing specific menu functions which should also be tested using the standard user interface (e.g.: if the loadLesson() method is tested try to go to the menu and select the load lesson option...).

 

Test I:

1) Create an array of boolean value set to TRUE and call it enabled[]. Refer to the Menu.Java file to find out which cell represents which module.

2) Call the FlipEnabled() method in a for loop such that it will change all the indexes in the enabled[] array to FALSE. Make sure that this happens.

3) Call the InvokeForLoop(). Make sure that this method check that the index 7 is set to TRUE (that is the forLoop index) by calling the IsEnabled() with input parameter 7. This should return TRUE. Make sure that the Loop::SetLoopType i s called and then that the Loop::DrawMe() is set.

4) Now call the function FlipEnabled() with input parameter 7. Make sure that the cell 7 is now set to FALSE by calling IsEnabled() with input parameter 7. The function should return FALSE.

5) Now call InvokeForLoop() again. Make sure that nothing happens since the loop index is set to FALSE.

6) Repeat step 3 to 5 using the InvokeWhileLoop() method instead of InvokeForLoop().

 

Test II:

1) Create an array of boolean value set to TRUE and call it enabled[]. Refer to the Menu.Java file to find out which cell represents which module.

2) Call the LoadLesson() method with input parameter one of our created lesson's URL. Make sure that Lesson::LoadLesson() gets called properly with the URL you have passed in.

3) Close the lesson and repeat step 2 but this time make sure that the URL does not end with extension .les. Make sure that an error is sent to the Error object and that the correct error is passed in.

4) Now call FlipEnabled() with input parameter 2. This should set the index 2 to FALSE and disable load lesson option.

5) Call the LoadLesson() method with input parameter one of our created lesson's URL. Make sure that nothing happens has the option is disabled.

6) Call the RestartLesson(). Make sure that the enable flag has been reset to FALSE. Check that the lesson is saved properly.

7) Call SaveLesson(). Make sure that Lesson::SaveLesson() is called properly. and that the user is prompted for an email address.

Test III:

1) Create an array of boolean value set to TRUE and call it enabled[]. Refer to the Menu.Java file to find out which cell represents which module.

2) Call Undo() method. Make sure that the Undo::Undo() method is called.

3) Call the FlipEnabled() with input parameter 4. Make sure that cell for of the enabled[] array is now FALSE.

4) Call Undo() again. Make sure that nothing happens.

 

Test IV:

Note: The method tested below will always have the enable flag set to TRUE. Therefore there is no need to test their enable flag or alter them in e enabled[] array.

1) Call the ShowHelp() method with the URL to the help menu/browser window. Make sure that the new help browser windows is opened correctly with the proper help text.

2) Call UserManualScreen() method. Make sure that the ShowHelp() method is called appropriately with input parameter the URL to the user manual html file.

3) Repeat step 1 and 2 replacing UserManualScreen() by AboutScreen() method.

3) Repeat step 1 and 2 replacing AboutScreen() by HelpKeyScreen() method.

 

Testing the Line Object:

 

Test I:

1) Create a Line XLine[] array and a Line YLine[] array (Size of 4 for each arrays).

2) Using the Line constructor from the Line object construct a vertical line (called VLine) and a horizontal line (called HLine) and store it in the appropriate array mentioned above. Check that the pointers to the line objects are assigned properly. Make sure that the objects are properly stored in the correct array cells.

3) Call the GetStart() method on the VLine object (an instance of the Line object) and check that the right start coordinates are returned. Repeat this procedure on the HLine object.

4) Repeat step 3 but this time replace the GetStart() method with the GetEnd() method.

5) Call the GetAxis() method on the VLine and HLine variables. Make sure that the proper boolean value is returned for each variables.

6) Call the GetFixedAxis() method on VLine and HLine making sure that the proper value is returned. As for step 5, please refer to coding as to what this value is supposed to be as it is unclear at this stage.

7) Call the GetLineCount() method on VLine and HLine and make sure that the returned value is 1, since they theoretically belong to one distinct link.

8) Call the Paint() method on the VLine and HLine objects. Check to see that 2 lines segments are drawn on the screen.

 

Testing the Master Line Object:

 

Test I:

1) Using the Link constructor create a series (4 of each) of vertical and horizontal lines and store them in XLine[] and YLine[] arrays appropriately (make them of size 4). Call the AddLine() method with input parameters the Line objects you have created. In your construction of line object make sure that certain lines merge together. We will refer to those lines object as mergeLine. Make sure that each Line object is stored in the proper array and cell with the proper parameters you have passed in. Also make sure that the pointers to line objects are assigned correctly.

2) Use the AddLine() method to add one more line to of each type (vertical and horizontal). Make sure that you do not get an error message but rather that the array size has increased. Check that the new line object is stored properly in the corresponding arrays.

3) Call the Line::CheckMerge() method on the mergeLine object passing the proper LineType. Make sure that the variable lineType is changed to the proper int that determines the correct merge color. Call this method on a Line object that has no merging lines and make sure that nothing happens.

4) Call the Line::SetLineCount() with input parameter 1 and another one to indicate a next pointer on a line object of your choice. Make sure that the proper changes have been made inside your line object. Repeat this step and making sure you cover all 4 possibilities of different inputs. Make sure that the proper changes are made.

5) Call ClearLine() on a line object (of both vertical and horizontal type) that is not a mergeLine. Make sure that the line object is properly removed from the correct array. Make sure that pointer reassignement is correct.

6) Try to call ClearLine() on a line object (of both vertical and horizontal type) that does not exist (a NULL cell). Make sure that an error message sent to the Error object and displayed properly.

7) Repeat step 5 but this time on a line object that is a mergeLine. In this case make sure that the proper line is deleted. That is, the index/pointer in the array should not be set to NULL. Rather, the line (the one we want to remove) private's variables (i.e.: lineType, lineCount,...) should be altered in the Line object and the color should also be set appropriately.

8) Call PaintAll() on the line arrays you have created. You should have 6 line objects at this point. Therefore make sure that the Line::Paint() method is called 6 times. Check the appearance, location and colors of the lines drawn on the screen.

 

Test II:

1) Without using the standard interface create a tree of int nodes starting at p. Creates a series of lines amongst the nodes such that they will be linked together and that the some rivers between them are full, empty, semi full, and almost full.

2) Call the CostRoute() method with input parameter the intersection where a river is empty. Make sure that a new link object is created and that the 2 dimensional intersection array is cleared. Check that the first line object associated with this link is created. Please refer to the MasterLine::CostRoute() for additional detail on the algorithm used to determine the destination node and the shortest path algorithm (Dijkstra).

3) Check that the return value is 1.

4) Repeat step 2 with a river that is semi full. Check that the return value is 3.

5) Repeat step 2 with a river that is almost full. Check that the return value is 5.

6) Repeat step 2 with a river that is full. Check that the return value is 99.

 

 

Testing the Link Object:

 

Test I:

1) Using the Line constructor creates a series of line to form several link. Make the links are of type next and prev. this should automatically call the link constructor and create a series of linkComponent arrays to store the lines objects you ahve created (which form a link).

2) Make sure that the line objects are stored/dereferenced properly in the linkComponent array so the collection of lines form several links.

3) Call GetLastLine() and make sure that is returned the last line segment you created and that it is the last line segment in the linkCollection array.

4) Create an other line object.

5) Use the AddLine() method with a line object (that you have just created in step 5) as an input parameter to add one more line in the LinkComponent array. Make sure that this line object is properly stored (i.e.: properly referenced by a pointer in the cell after the last insertion).

6) Make sure that the variable numLines is incremented by one.

7 ) Now call the DeleteLink() method on one of the linkComponent array you have just created. Make sure that this linlComponent array is deleted.

 

 

Testing the Master Link Object:

 

Test I:

1) Create an int node using the node constructor. The node should be of singly linked type.

2) Call the AddLink() method with input parameter the pointer to the node you have just created. Also, pass in the direction of the link which is next.

3) Make sure that the link is now stored in the nextLink[][] array at the coordinates passed in from the Node object (i.e.: if the coordinates of the node object were 3,4 then the index that the link object is stored at in the nextLink[x][y] is repectively 3 and 4).

4) Check that the MasterLine::MakeLink() method is called and that the correct link (i.e: direction and color) is drawn on the screen.

5) Repeat step 2 to 4. Make sure that the new link will overwrite the old link in the array.

 

Test II:

1) Store several link objects (both next and prev links) in both 2 dimensional arrays nextLink[][] and prevLink[][].

2) Call the DeleteLink() method with input parameter a link from the nexLink[][]. Make sure that the proper link type is obtained from the link object so DeleteLink() will delete the link in the proper array. Here it is the nextLink array.

3) Check that the method Link::GetFirstLine() is called and that the proper parameters are returned.

4) Check that the Link::DeleteLink() method is also called.

5) Make sure that the given link object has been deleted from the nextLink[][] array.

 

Test III:

1) Create 3 int nodes of type doubly linked list starting at initial pointer 's' using the constructor from the Node object.

2) Associates a series of next and prev pointers to those nodes are linked together. Make sure that the nodes, lines and links objects are stored in the proper locations.

3) Call the function LinkFrom() with input parameter one of the node you have created (and which contains a next link) and next for the linked type.

4) Make sure that the LinkForm() function returns the correct link associated with the node passed in as a parameter. Make sure that this link is a next link too.

5) Repeat step 4 but this time with a node that does not exist. Make sure that an error message is sent to the Error object.

6) Repeat step 5 on a node that does not contain a prev link. Make sure that the LinkFrom() method returns NULL.

 

Search engine sitemap created by AutoSitemap.com