1 /* 2 * Copyright (c) 2023 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 HUKS_HDI_TEST_UTIL_H 17 #define HUKS_HDI_TEST_UTIL_H 18 19 #define HUKS_TEST_LOG_E(fmt...) \ 20 do { \ 21 printf("[ERROR]\t[%s](%d): ", __func__, __LINE__); \ 22 printf(fmt); \ 23 printf("\r\n"); \ 24 } while (0) 25 26 #define HUKS_TEST_LOG_I(fmt...) \ 27 do { \ 28 printf("[INFO]\t[%s](%d): ", __func__, __LINE__); \ 29 printf(fmt); \ 30 printf("\r\n"); \ 31 } while (0) 32 33 #define HUKS_TEST_LOG_W(fmt...) \ 34 do { \ 35 printf("[WARN]\t[%s](%d): ", __func__, __LINE__); \ 36 printf(fmt); \ 37 printf("\r\n"); \ 38 } while (0) 39 40 #define HUKS_TEST_LOG_D(fmt...) \ 41 do { \ 42 printf("[DEBUG]\t[%s](%d): ", __func__, __LINE__); \ 43 printf(fmt); \ 44 printf("\r\n"); \ 45 } while (0) 46 47 #endif /* HUKS_HDI_TEST_UTIL_H */