1 /* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef HC_FILE_COMMON_H 17 #define HC_FILE_COMMON_H 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 #define TEST_FILE_NAME "test" 24 #define TEST_FILE_DIR "/testDir" 25 #define DEFAULT_FILE_PERMISSION 0644 26 #define ASCII_START 32 27 #define ASCII_END 126 28 #define ONE_BYTE 1 29 #define HALF_KILOBYTE 512 30 #define ONE_KILOBYTE 1024 31 #define TEN_KILOBYTE 10240 32 #define TEST_FILE_SIZE_LIST_LEN 4 33 34 static const int testFileSizeList[TEST_FILE_SIZE_LIST_LEN] = { 35 ONE_BYTE, 36 HALF_KILOBYTE, 37 ONE_KILOBYTE, 38 TEN_KILOBYTE 39 }; 40 41 char *GenerateTestingText(int size); 42 43 #ifdef __cplusplus 44 } 45 #endif 46 #endif // HC_FILE_COMMON_H