For the Translator:

Branch and Invocation Coverage Plan:

The only branching that occurs within the parser is to allow flow to 'branch' from one function to another. In consideration of this intra-functional branching these two conditions can be combined into a single test case that will address both cases in the same light.

The Parser has four sets of data for testing that each procedure has been used. Since Each procedure has the same path flow up to the procedure 'getToken' these test cases can be placed within the same file. These test conditions are for the areas of:

1.) Seeing if the input infile exists and then allowing the parser to proceed if this condition exists.

2.) Adding the M_Class import section to the import section of the file.

3.) Adding the Control Panel HotKey to the event handler.

4.) Translating the supported tokens into the appropriate M_<tokens>.

INPUT

/* This should generate an import statement */

import java.util.*;

/* This should generate a M_<token> */

Button SampleButton = new Button;

/* This should generate the insertion of the HotKey for the */

/* control panel. */

public boolean handleEvent( Event e )

{

/* The HotKey code should be added just above this line. */

if ( (e.id == Event.ACTION_EVENT) && (e.target instanceof Choice) )

{

// do stuff

}

}


Page 10

Document Index

Page 12