stdcpp/tsrc/Stdcpp_test/stlport/auto/stlport_copy/src/copy1.cpp
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:36:54 +0100
branchRCL_3
changeset 57 2efc27d87e1c
parent 0 e4d67989cc36
child 18 47c74d1534e1
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201021 Kit: 201035


 
// STLport regression testsuite component.
// To compile as a separate example, please #define MAIN.

#include <algorithm>
#include <iostream>
#include <cstring>


#ifdef MAIN
#define copy1_test main
#endif

#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
using namespace std;
#endif
int copy1_test(int, char**)
{
	cout<<"Results of copy1_test:"<<endl;
	char string[23] = "A string to be copied.";

	char result[23];
	copy(string, string + 23, result);
	cout << " Src: " << string << "\nDest: " << result << endl;

	if (!strcmp(string, result))
 		return 0;
  	else
  	   return 1;
}