Apparatus and method for scan-based testing in an object-oriented programming environment
First Claim
1. A method of testing individual objects in an object-oriented programming environment, comprising the steps, performed by a data processing system, of:
- establishing a container object that will be updated to contain a pointer to each newly instantiated object;
establishing a function for the TopObject class that places in the container object a pointer to each newly created object when each new object is created;
creating a new object that belongs to the TopObject class, thereby causing the function to add a pointer in the container object for the new object, wherein the new object contains a respective testing function; and
performing a global testing function that will traverse the object pointers in the container object and will invoke the respective testing function within each object pointed to, in accordance with the object pointers in the container object.
4 Assignments
0 Petitions
Accused Products
Abstract
An apparatus and method for testing objects in an object-oriented programming environment. The object class hierarchy is defined so that a TopObject has a constructor function that initializes a linked list when the first class in the hierarchy is instantiated to create the first object. Each time an object of a class in the TopObject class hierarchy is instantiated, the TopObject constructor adds an entry for the new object to the linked list. A TestObject accesses the list to perform a predetermined testing function on one or more of the objects in the system. The object hierarchy class can also be defined as having multiple inheritance such that a class in the program inherits program functionality from one class and inherits testing functionality from the test class.
-
Citations
18 Claims
-
1. A method of testing individual objects in an object-oriented programming environment, comprising the steps, performed by a data processing system, of:
-
establishing a container object that will be updated to contain a pointer to each newly instantiated object; establishing a function for the TopObject class that places in the container object a pointer to each newly created object when each new object is created; creating a new object that belongs to the TopObject class, thereby causing the function to add a pointer in the container object for the new object, wherein the new object contains a respective testing function; and performing a global testing function that will traverse the object pointers in the container object and will invoke the respective testing function within each object pointed to, in accordance with the object pointers in the container object. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A computer program product, including computer usable medium having computer readable code embodied therein for testing individual objects in an object-oriented programming environment, the computer program product comprising:
-
computer readable program code devices configured to cause a computer to effect establishing a container object that will be updated to contain a pointer to each newly instantiated object; computer readable program code devices configured to cause a computer to effect establishing a function for the TopObject class that places in the container object a pointer to each newly created object when each new object is created; computer readable program code devices configured to cause a computer to effect creating a new object that belongs to the TopObject class, thereby causing the function to add a pointer in the container object for the new object, wherein the new object contains a respective testing function; and computer readable program code devices configured to cause a computer to effect performing a global testing function that will traverse the object pointers in the container object and will invoke the respective testing function within each object pointed to, in accordance with the object pointers in the container object. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18)
-
Specification