mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 18:20:04 +00:00
!3419 add the concurrent(taskpool) test
Merge pull request !3419 from huangfeijie/concurrent_test
This commit is contained in:
commit
51be825113
@ -27,6 +27,7 @@ group("ark_js_moduletest") {
|
||||
"calltype:calltypeAction",
|
||||
"class:classAction",
|
||||
"compareobjecthclass:compareobjecthclassAction",
|
||||
"concurrent:concurrentAction",
|
||||
"container:containerAction",
|
||||
"datecase:datecaseAction",
|
||||
"dynamicimport:dynamicimportAction",
|
||||
@ -99,6 +100,7 @@ group("ark_asm_test") {
|
||||
"calltype:calltypeAsmAction",
|
||||
"class:classAsmAction",
|
||||
"compareobjecthclass:compareobjecthclassAsmAction",
|
||||
"concurrent:concurrentAsmAction",
|
||||
"container:containerAsmAction",
|
||||
"dynamicimport:dynamicimportAction",
|
||||
"dyninstruction:dyninstructionAsmAction",
|
||||
@ -161,6 +163,7 @@ group("ark_asm_single_step_test") {
|
||||
"calltype:calltypeAsmSingleStepAction",
|
||||
"class:classAsmSingleStepAction",
|
||||
"compareobjecthclass:compareobjecthclassAsmSingleStepAction",
|
||||
"concurrent:concurrentAsmSingleStepAction",
|
||||
"container:containerAsmSingleStepAction",
|
||||
"dynamicimport:dynamicimportAction",
|
||||
"dyninstruction:dyninstructionAsmSingleStepAction",
|
||||
|
18
test/moduletest/concurrent/BUILD.gn
Normal file
18
test/moduletest/concurrent/BUILD.gn
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//arkcompiler/ets_runtime/test/test_helper.gni")
|
||||
|
||||
host_moduletest_action("concurrent") {
|
||||
deps = []
|
||||
}
|
28
test/moduletest/concurrent/concurrent.js
Normal file
28
test/moduletest/concurrent/concurrent.js
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @tc.name:concurrent
|
||||
* @tc.desc:test concurrent function
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: issueI5NO8G
|
||||
*/
|
||||
function foo() {
|
||||
"use concurrent"
|
||||
var a = 1
|
||||
print(a)
|
||||
}
|
||||
|
||||
print(foo.name)
|
14
test/moduletest/concurrent/expect_output.txt
Normal file
14
test/moduletest/concurrent/expect_output.txt
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
foo
|
Loading…
Reference in New Issue
Block a user