/* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // First include (the generated) my_config.h, to get correct platform defines. #include "my_config.h" #include #include #include #include #include namespace mysys_base64_unittest { const int BASE64_LOOP_COUNT= 500; TEST(Mysys, Base64) { int i, cmp; size_t j, k, l, dst_len, needed_length; MY_INIT("base64-t"); for (i= 0; i < BASE64_LOOP_COUNT; i++) { /* Create source data */ const size_t src_len= rand() % 1000 + 1; char * src= (char *) malloc(src_len); char * s= src; char * str; char * dst; for (j= 0; j