1# Copyright (c) 2021-2025 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14panda_ets_interop_js_checked_test( 15 FILE ${CMAKE_CURRENT_LIST_DIR}/example/strings.ets 16 JS_SOURCES ${CMAKE_CURRENT_LIST_DIR}/example/strings.js 17) 18 19panda_ets_interop_js_checked_test( 20 FILE ${CMAKE_CURRENT_LIST_DIR}/js_call/js_call.ets 21 JS_SOURCES ${CMAKE_CURRENT_LIST_DIR}/js_call/js_call.js 22) 23 24panda_ets_interop_js_checked_test( 25 FILE ${CMAKE_CURRENT_LIST_DIR}/obj_call/obj_call.ets 26 JS_SOURCES ${CMAKE_CURRENT_LIST_DIR}/obj_call/obj_call.js 27) 28 29panda_ets_interop_js_checked_test( 30 FILE ${CMAKE_CURRENT_LIST_DIR}/../class_operations/class_operations_frontend.ets 31 TS_SOURCES ${CMAKE_CURRENT_LIST_DIR}/../class_operations/module.ts 32 DYNAMIC_ABC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/interop_class_operations_frontend.checked/ 33) 34 35# NOTE(gogabr): needs investigation by compiler guys #25999 36# panda_ets_interop_js_checked_test( 37# FILE ${CMAKE_CURRENT_LIST_DIR}/merge_local_scopes/merge_local_scopes.ets 38# JS_SOURCES ${CMAKE_CURRENT_LIST_DIR}/js_call/js_call.js 39# ) 40 41panda_ets_interop_js_checked_test( 42 FILE ${CMAKE_CURRENT_LIST_DIR}/peepholes/peepholes.ets 43 JS_SOURCES ${CMAKE_CURRENT_LIST_DIR}/js_call/js_call.js 44) 45 46# NOTE(gogabr): needs investigation by compiler guys #25999 47# panda_ets_interop_js_checked_test( 48# FILE ${CMAKE_CURRENT_LIST_DIR}/qualified_call/qualified_call.ets 49# JS_SOURCES ${CMAKE_CURRENT_LIST_DIR}/qualified_call/qualified_call.js 50# ) 51 52set(INTEROP_TESTS_GENERATED_DIR "${PANDA_BINARY_ROOT}/plugins/ets/tests/ets_interop_js/generated") 53 54panda_ets_interop_js_checked_test( 55 FILE ${INTEROP_TESTS_GENERATED_DIR}/number_subtypes_frontend.ets 56 TS_SOURCES ${CMAKE_CURRENT_LIST_DIR}/../number_subtypes/ts_to_sts/module.ts 57 DYNAMIC_ABC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/interop_number_subtypes_frontend.checked/ 58) 59 60gen_file(TARGET test_convert_gen_ets 61 TEMPLATE ${CMAKE_CURRENT_LIST_DIR}/convert/convert.ets.erb 62 OUTPUT ${INTEROP_TESTS_GENERATED_DIR}/convert.ets 63 REQUIRES ${CMAKE_CURRENT_LIST_DIR}/convert/convert.rb 64) 65gen_file(TARGET test_convert_gen_js 66 TEMPLATE ${CMAKE_CURRENT_LIST_DIR}/convert/convert.js.erb 67 OUTPUT ${INTEROP_TESTS_GENERATED_DIR}/convert.js 68 REQUIRES ${CMAKE_CURRENT_LIST_DIR}/convert/convert.rb 69) 70panda_ets_interop_js_checked_test( 71 FILE ${INTEROP_TESTS_GENERATED_DIR}/convert.ets 72 JS_SOURCES ${INTEROP_TESTS_GENERATED_DIR}/convert.js 73 DYNAMIC_ABC_OUTPUT_DIR ${INTEROP_TESTS_GENERATED_DIR} 74) 75add_dependencies(interop_convert.checked test_convert_gen_ets) 76add_dependencies(interop_convert.checked test_convert_gen_js) 77