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#ifndef TEST_CONSOLE_H
16#define TEST_CONSOLE_H
17
18#include "../console.h"
19
20namespace OHOS::JsSysModule {
21
22class ConsoleTest {
23public:
24    ConsoleTest() = default;
25    ~ConsoleTest() = default;
26    template<LogLevel LEVEL>
27    static napi_value ConsoleLog(napi_env env, napi_callback_info info);
28    static napi_value Count(napi_env env, napi_callback_info info);
29    static napi_value CountReset(napi_env env, napi_callback_info info);
30    static napi_value Dir(napi_env env, napi_callback_info info);
31    static napi_value Group(napi_env env, napi_callback_info info);
32    static napi_value GroupEnd(napi_env env, napi_callback_info info);
33    static napi_value Table(napi_env env, napi_callback_info info);
34    static napi_value Time(napi_env env, napi_callback_info info);
35    static napi_value TimeLog(napi_env env, napi_callback_info info);
36    static napi_value TimeEnd(napi_env env, napi_callback_info info);
37    static napi_value Trace(napi_env env, napi_callback_info info);
38    static napi_value TraceHybridStack(napi_env env, napi_callback_info info);
39    static napi_value Assert(napi_env env, napi_callback_info info);
40    static void PrintTime(std::string timerName, double time, std::string& log);
41    static void SetGroupIndent(const std::string& newGroupIndent);
42    static std::string GetGroupIndent();
43    static std::string ParseLogContent(const std::vector<std::string>& params);
44};
45}
46#endif // TEST_CONSOLE_H