1b1994897Sopenharmony_ci#!/usr/bin/env python3
2b1994897Sopenharmony_ci# -*- coding: utf-8 -*-
3b1994897Sopenharmony_ci#
4b1994897Sopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd.
5b1994897Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
6b1994897Sopenharmony_ci# you may not use this file except in compliance with the License.
7b1994897Sopenharmony_ci# You may obtain a copy of the License at
8b1994897Sopenharmony_ci#
9b1994897Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0
10b1994897Sopenharmony_ci#
11b1994897Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
12b1994897Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
13b1994897Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14b1994897Sopenharmony_ci# See the License for the specific language governing permissions and
15b1994897Sopenharmony_ci# limitations under the License.
16b1994897Sopenharmony_ci
17b1994897Sopenharmony_cifrom enum import Enum
18b1994897Sopenharmony_ci
19b1994897Sopenharmony_ciJS_FILE = "test_constant_pool_content.js"
20b1994897Sopenharmony_ci
21b1994897Sopenharmony_ciAPI_VERSION_MAP = {
22b1994897Sopenharmony_ci    "API9": "9.0.0.0",
23b1994897Sopenharmony_ci    "API10": "9.0.0.0",
24b1994897Sopenharmony_ci    "API11": "11.0.2.0",
25b1994897Sopenharmony_ci    "API12beta1": "12.0.2.0",
26b1994897Sopenharmony_ci    "API12beta2": "12.0.2.0",
27b1994897Sopenharmony_ci    "API12beta3": "12.0.6.0",
28b1994897Sopenharmony_ci    "API13": "12.0.6.0",
29b1994897Sopenharmony_ci}
30b1994897Sopenharmony_ci
31b1994897Sopenharmony_ci
32b1994897Sopenharmony_ci# ANSI color codes for terminal output
33b1994897Sopenharmony_ciclass Color(Enum):
34b1994897Sopenharmony_ci    WHITE = "\033[37m"
35b1994897Sopenharmony_ci    GREEN = "\033[92m"
36b1994897Sopenharmony_ci    RED = "\033[91m"
37b1994897Sopenharmony_ci    RESET = "\033[0m"
38b1994897Sopenharmony_ci
39b1994897Sopenharmony_ci    @staticmethod
40b1994897Sopenharmony_ci    def apply(color, text):
41b1994897Sopenharmony_ci        return f"{color.value}{text}{Color.RESET.value}"