提交 ac21e147 编写于 作者: H huyunhui1

Merge branch 'master' of gitee.com:huyunhui1/xts_acts

Signed-off-by: Nhuyunhui1 <huyunhui1@huawei.com>
# Copyright (C) 2023 Huawei Device Co., Ltd. # Copyright (C) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import("//build/ohos_var.gni") import("//build/ohos_var.gni")
group("arkcompiler") { group("arkcompiler") {
testonly = true testonly = true
if (is_standard_system) { if (is_standard_system) {
deps = [ "esmodule:esmodule" ] deps = [ "esmodule:esmodule" ]
} }
} }
\ No newline at end of file
# Copyright (C) 2023 Huawei Device Co., Ltd. # Copyright (C) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import("//build/ohos_var.gni") import("//build/ohos_var.gni")
group("esmodule") { group("esmodule") {
testonly = true testonly = true
if (is_standard_system) { if (is_standard_system) {
deps = [ deps = [
"esmodule_entry:ActsEsmoduleEntryTest", "esmodule_entry:ActsEsmoduleEntryTest",
"esmodule_ohostest:ActsEsmoduleOhostestTest" "esmodule_ohostest:ActsEsmoduleOhostestTest",
] ]
} }
} }
\ No newline at end of file
# Copyright (C) 2023 Huawei Device Co., Ltd. # Copyright (C) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_app_suite("ActsEsmoduleEntryTest") { ohos_js_app_suite("ActsEsmoduleEntryTest") {
hap_name = "ActsEsmoduleEntryTest" hap_name = "ActsEsmoduleEntryTest"
testonly = true testonly = true
part_name = "ets_frontend" part_name = "ets_frontend"
subsystem_name = "arkcompiler" subsystem_name = "arkcompiler"
certificate_profile = "./signature/auto_ohos_default_esmodule_entry_com.esmodule.acts.p7b" certificate_profile =
} "./signature/auto_ohos_default_esmodule_entry_com.esmodule.acts.p7b"
\ No newline at end of file }
...@@ -18,9 +18,9 @@ import worker from '@ohos.worker'; ...@@ -18,9 +18,9 @@ import worker from '@ohos.worker';
const ADDEND_FIRST = 2; const ADDEND_FIRST = 2;
const ADDEND_SECOND = 3; const ADDEND_SECOND = 3;
const SUM = 5; const SUM = 5;
var workerPort = worker.workerPort; let workerPort = worker.workerPort;
workerPort.onmessage = function(): void { workerPort.onmessage = function(): void {
if (add(ADDEND_FIRST, ADD_SECOND) === SUM) { if (add(ADDEND_FIRST, ADDEND_SECOND) === SUM) {
workerPort.postMessage('ModuleTest receive data from main thread'); workerPort.postMessage('ModuleTest receive data from main thread');
} }
}; };
\ No newline at end of file
...@@ -20,7 +20,7 @@ const ADDEND_SECOND = 3; ...@@ -20,7 +20,7 @@ const ADDEND_SECOND = 3;
const SUM = 5; const SUM = 5;
let workerPort = worker.workerPort; let workerPort = worker.workerPort;
workerPort.onmessage = function(): void { workerPort.onmessage = function(): void {
if (add(ADDEND_FIRST, ADD_SECOND) === SUM) { if (add(ADDEND_FIRST, ADDEND_SECOND) === SUM) {
workerPort.postMessage('ModuleTest receive data from main thread'); workerPort.postMessage('ModuleTest receive data from main thread');
} }
}; };
\ No newline at end of file
# Copyright (C) 2023 Huawei Device Co., Ltd. # Copyright (C) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_app_suite("ActsEsmoduleOhostestTest") { ohos_js_app_suite("ActsEsmoduleOhostestTest") {
hap_name = "ActsEsmoduleOhostestTest" hap_name = "ActsEsmoduleOhostestTest"
test_hap = true test_hap = true
testonly = true testonly = true
part_name = "ets_frontend" part_name = "ets_frontend"
subsystem_name = "arkcompiler" subsystem_name = "arkcompiler"
certificate_profile = "./signature/auto_ohos_default_esmodule_ohosTest_com.esmodule.acts.p7b" certificate_profile =
} "./signature/auto_ohos_default_esmodule_ohosTest_com.esmodule.acts.p7b"
\ No newline at end of file }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册