14d6c458bSopenharmony_ci/*
24d6c458bSopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
34d6c458bSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
44d6c458bSopenharmony_ci * you may not use this file except in compliance with the License.
54d6c458bSopenharmony_ci * You may obtain a copy of the License at
64d6c458bSopenharmony_ci *
74d6c458bSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
84d6c458bSopenharmony_ci *
94d6c458bSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
104d6c458bSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
114d6c458bSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
124d6c458bSopenharmony_ci * See the License for the specific language governing permissions and
134d6c458bSopenharmony_ci * limitations under the License.
144d6c458bSopenharmony_ci */
154d6c458bSopenharmony_ci#ifndef TEST_CONSOLE_H
164d6c458bSopenharmony_ci#define TEST_CONSOLE_H
174d6c458bSopenharmony_ci
184d6c458bSopenharmony_ci#include "../console.h"
194d6c458bSopenharmony_ci
204d6c458bSopenharmony_cinamespace OHOS::JsSysModule {
214d6c458bSopenharmony_ci
224d6c458bSopenharmony_ciclass ConsoleTest {
234d6c458bSopenharmony_cipublic:
244d6c458bSopenharmony_ci    ConsoleTest() = default;
254d6c458bSopenharmony_ci    ~ConsoleTest() = default;
264d6c458bSopenharmony_ci    template<LogLevel LEVEL>
274d6c458bSopenharmony_ci    static napi_value ConsoleLog(napi_env env, napi_callback_info info);
284d6c458bSopenharmony_ci    static napi_value Count(napi_env env, napi_callback_info info);
294d6c458bSopenharmony_ci    static napi_value CountReset(napi_env env, napi_callback_info info);
304d6c458bSopenharmony_ci    static napi_value Dir(napi_env env, napi_callback_info info);
314d6c458bSopenharmony_ci    static napi_value Group(napi_env env, napi_callback_info info);
324d6c458bSopenharmony_ci    static napi_value GroupEnd(napi_env env, napi_callback_info info);
334d6c458bSopenharmony_ci    static napi_value Table(napi_env env, napi_callback_info info);
344d6c458bSopenharmony_ci    static napi_value Time(napi_env env, napi_callback_info info);
354d6c458bSopenharmony_ci    static napi_value TimeLog(napi_env env, napi_callback_info info);
364d6c458bSopenharmony_ci    static napi_value TimeEnd(napi_env env, napi_callback_info info);
374d6c458bSopenharmony_ci    static napi_value Trace(napi_env env, napi_callback_info info);
384d6c458bSopenharmony_ci    static napi_value TraceHybridStack(napi_env env, napi_callback_info info);
394d6c458bSopenharmony_ci    static napi_value Assert(napi_env env, napi_callback_info info);
404d6c458bSopenharmony_ci    static void PrintTime(std::string timerName, double time, std::string& log);
414d6c458bSopenharmony_ci    static void SetGroupIndent(const std::string& newGroupIndent);
424d6c458bSopenharmony_ci    static std::string GetGroupIndent();
434d6c458bSopenharmony_ci    static std::string ParseLogContent(const std::vector<std::string>& params);
444d6c458bSopenharmony_ci};
454d6c458bSopenharmony_ci}
464d6c458bSopenharmony_ci#endif // TEST_CONSOLE_H