1 /** 2 * Copyright (c) 2024 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 PANDA_ANNOTATIONS_EMIT_TEST_H 17 #define PANDA_ANNOTATIONS_EMIT_TEST_H 18 19 #include <gtest/gtest.h> 20 #include "annotation.h" 21 #include "macros.h" 22 #include "util/options.h" 23 #include <cstddef> 24 #include <iostream> 25 #include <ostream> 26 #include <string> 27 #include <utility> 28 #include <variant> 29 #include <vector> 30 #include "assembly-program.h" 31 #include "test/utils/asm_test.h" 32 33 namespace ark::es2panda::compiler::test { 34 35 class AnnotationEmitTest : public ::test::utils::AsmTest { 36 public: 37 AnnotationEmitTest() = default; 38 39 ~AnnotationEmitTest() override = default; 40 41 protected: 42 static constexpr uint32_t COLOR_OPTION_0 = 0; 43 static constexpr uint32_t COLOR_OPTION_1 = 1; 44 static constexpr double AGE_18 = 18.0; 45 static constexpr double AGE_21 = 21.0; 46 static constexpr double AGE_32 = 32.0; 47 static constexpr double VALUE_1 = 1.0; 48 static constexpr double VALUE_2 = 2.0; 49 static constexpr double VALUE_3 = 3.0; 50 static constexpr double VALUE_4 = 4.0; 51 static constexpr double VALUE_5 = 5.0; 52 static constexpr double VALUE_6 = 6.0; 53 static constexpr double VALUE_7 = 7.0; 54 static constexpr double VALUE_8 = 8.0; 55 static constexpr double VALUE_9 = 9.0; 56 static constexpr uint32_t COLOR_0 = 0; 57 static constexpr uint32_t COLOR_1 = 1; 58 static constexpr double REVIEWER_AGE_19 = 19.0; 59 static constexpr double REVIEWER_AGE_20 = 20.0; 60 static constexpr double REVIEWER_AGE_24 = 24.0; 61 62 private: 63 NO_COPY_SEMANTIC(AnnotationEmitTest); 64 NO_MOVE_SEMANTIC(AnnotationEmitTest); 65 }; 66 67 } // namespace ark::es2panda::compiler::test 68 69 #endif // PANDA_ANNOTATIONS_EMIT_TEST_H 70