27.5 Testing

I l @ ve RuBoard

To test this program, we came up with a small C++ program that contains every different type of possible token. The results are shown in Example 27-2.

Example 27-2. stat/test.cpp
 /********************************************************  * This is a mult-line comment                          *  *      T_COMMENT, T_NEWLINE                            *  ********************************************************/ const int LINE_MAX = 500;       // T_ID, T_OPERATOR, T_NUMBER // T_L_PAREN, T_R_PAREN static void do_file( const char *const name) {     // T_L_CURLY     char *name = "Test"         // T_STRING     // T_R_CURLY } // T_EOF 
I l @ ve RuBoard


Practical C++ Programming
Practical C Programming, 3rd Edition
ISBN: 1565923065
EAN: 2147483647
Year: 2003
Pages: 364

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net