/*************************************************************************** * * Copyright (c) 2009 Baidu.com, Inc. All Rights Reserved * $Id: bsl_test_memcpy.h,v 1.2 2009/04/07 06:35:53 xiaowei Exp $ * **************************************************************************/ /** * @file bsl_test_memcpy.h * @author xiaowei(com@baidu.com) * @date 2009/01/06 19:01:23 * @version $Revision: 1.2 $ * @brief * **/ #ifndef __BSL_TEST_MEMCPY_H_ #define __BSL_TEST_MEMCPY_H_ #include #include #include "bsl/utils/bsl_memcpy.h" #include #include int test1() { { char buf[1024], ds[1024]; for (int i=0; i<(int)sizeof(buf); ++i) { buf[i] = 'a'; ds[i] = 'z'-i%26; } for (int i=0; i<1024; ++i) { bsl::xmemcpy(buf, ds, i); for (int j=0; j