home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / stl453up.zip / stl453fx / test / regression / swap1.cpp < prev    next >
C/C++ Source or Header  |  2002-04-29  |  493b  |  24 lines

  1. // STLport regression testsuite component.
  2. // To compile as a separate example, please #define MAIN.
  3.  
  4. #include <algorithm>
  5. #include <iostream>
  6.  
  7. #ifdef MAIN 
  8. #define swap1_test main
  9. #endif
  10.  
  11. #if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
  12. using namespace std;
  13. #endif
  14. int swap1_test(int, char**)
  15. {
  16.   cout<<"Results of swap1_test:"<<endl;
  17.   int a = 42;
  18.   int b = 19;
  19.   cout << "a = " << a << " b = " << b << endl;
  20.   swap(a, b);
  21.   cout << "a = " << a << " b = " << b << endl;
  22.   return 0;
  23. }
  24.