/////////////////////////////////////////////////////////////////// // // // qlpage2.cpp - qualification test #2 // // // // make_header process // // // /////////////////////////////////////////////////////////////////// // // // Process Description: // // Once, for each file selected, the make_header process // // extracts the file's name, time, and date of last modif- // // ication to place in a text line of w characters and // // return as a header. // // // /////////////////////////////////////////////////////////////////// // // // Requirements: // // // // A-Specification Requirement - none // // // // B-Specification Requirement - 3.4.2.a.1 // // The make_header process shall build a line of characters // // with the file name at its far left, file time and date // // of last modification at the line center, and page number // // at the far right end of the line. All other characters // // in the line shall be blanks. // // // /////////////////////////////////////////////////////////////////// // // // Test Description: // // The attached test driver creates a text buffer and, using // // the fileItem structure declared in CMDLINE.HPP, passes // // file information to LINES module makeHeader() function. // // The function returns the text buffer and it is examined // // to show that the required information is returned. // // // /////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////// // // // Preconditions: // // - cmdline.hpp, cmdline.cpp, lines.hpp, and lines.cpp must // // be in the default directory // // // /////////////////////////////////////////////////////////////////// // // // Test Procedure - LINES module test // // // // 1. run test stub with no command line arguments // // // // qlpage2 // // // // Expected test results: // // // // The test driver prints out data from the fileItem and the // // resulting line which contains identical information in // // the required format. // // // /////////////////////////////////////////////////////////////////// // // // Signature: Date: // // ---------------------------- ------------- // // // /////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////// // // // qlpage2.cpp - qualification test #2 // // // // make_header process // // // /////////////////////////////////////////////////////////////////// #define NO_MAIN #include "cmdline.hpp" #include "cmdline.cpp" #undef NO_MAIN #include "lines.hpp" #include "lines.cpp" void main() { cout << "\nTesting make_header process\n\n"; char* filename = "foo.txt"; fileItem fi; int i; for(i=0; i