home *** CD-ROM | disk | FTP | other *** search
- /////////////////////////////////////////////////////////////////////
- // Main program used for testing shape construction and destruction
- // Copyright(c) 1993 Azarona Software.
- /////////////////////////////////////////////////////////////////////
-
- main()
- {
- // Record how many global Shapes were constructed
- int global_objects = Shape::objects_needing_destruction;
- test();
- // Check that ctor/dtor calls balance out
- if (Shape::objects_needing_destruction == global_objects) {
- cout << "\nConstructors and destructors balance.\n";
- }
- else {
- cout << "\nConstructors/destructors out of balance.\n"
- << "Number of objects left undestructed: "
- << Shape::objects_needing_destruction << '\n';
- }
- cout << "Should be " << global_objects
- << " global objects left to destroy:\n";
- return 0;
- }
-
-