提交 a0e9e53e 编写于 作者: C chengxingzhen

xts编译报错整改

Signed-off-by: Nchengxingzhen <chengxingzhen@huawei.com>
上级 66fc06df
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 AbilityStage from "@ohos.application.AbilityStage" import AbilityStage from "@ohos.app.ability.AbilityStage"
var onAcceptWantCalledSeq; var onAcceptWantCalledSeq;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
class MySequenceable { class MySequenceable {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
class MySequenceable { class MySequenceable {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
class MySequenceable { class MySequenceable {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 AbilityStage from "@ohos.application.AbilityStage" import AbilityStage from "@ohos.app.ability.AbilityStage"
var onAcceptWantCalledSeq; var onAcceptWantCalledSeq;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
var bundleNameCallee = "com.example.systemcalltest"; var bundleNameCallee = "com.example.systemcalltest";
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
class MySequenceable { class MySequenceable {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
class MySequenceable { class MySequenceable {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 AbilityStage from "@ohos.application.AbilityStage" import AbilityStage from "@ohos.app.ability.AbilityStage"
var onAcceptWantCalledSeq; var onAcceptWantCalledSeq;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
var bundleNameCallee = "com.example.systemcalltest"; var bundleNameCallee = "com.example.systemcalltest";
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 AbilityStage from "@ohos.application.AbilityStage" import AbilityStage from "@ohos.app.ability.AbilityStage"
var onAcceptWantCalledSeq; var onAcceptWantCalledSeq;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
var bundleNameCallee = "com.example.systemcalltest"; var bundleNameCallee = "com.example.systemcalltest";
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 AbilityStage from "@ohos.application.AbilityStage" import AbilityStage from "@ohos.app.ability.AbilityStage"
var onAcceptWantCalledSeq; var onAcceptWantCalledSeq;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
class MySequenceable { class MySequenceable {
num: number = 0; num: number = 0;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
var callerA = "SystemAppCallerA" var callerA = "SystemAppCallerA"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
export default class TestAbility extends Ability { export default class TestAbility extends Ability {
onCreate(want, launchParam) { onCreate(want, launchParam) {
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
import { describe, afterEach, it, expect } from "@ohos/hypium" import { describe, afterEach, it, expect } from "@ohos/hypium"
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
import missionManager from '@ohos.application.missionManager'
var sysABundleName = "com.example.systemcalltest"; var sysABundleName = "com.example.systemcalltest";
var sysASecondAbilityName = "com.example.systemcalltest.SecondAbility"; var sysASecondAbilityName = "com.example.systemcalltest.SecondAbility";
...@@ -520,7 +521,7 @@ export default function abilityTest() { ...@@ -520,7 +521,7 @@ export default function abilityTest() {
done(); done();
}).catch(err => { }).catch(err => {
console.log('ACTS_CommonComponent_Call_1700 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_1700 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_TYPE_ERROR); expect(err.code).assertEqual(ERROR_CODE_TYPE_ERROR);
exceptionFlag = true; exceptionFlag = true;
}); });
...@@ -546,7 +547,7 @@ export default function abilityTest() { ...@@ -546,7 +547,7 @@ export default function abilityTest() {
globalThis.callee.on('', onTest); globalThis.callee.on('', onTest);
} catch (err) { } catch (err) {
console.log('ACTS_CommonComponent_Call_3100 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_3100 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM); expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM);
finishFlag = 1; finishFlag = 1;
} }
...@@ -572,7 +573,7 @@ export default function abilityTest() { ...@@ -572,7 +573,7 @@ export default function abilityTest() {
globalThis.callee.on(null, onTest); globalThis.callee.on(null, onTest);
} catch (err) { } catch (err) {
console.log('ACTS_CommonComponent_Call_3200 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_3200 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM); expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM);
finishFlag = 1; finishFlag = 1;
} }
...@@ -598,7 +599,7 @@ export default function abilityTest() { ...@@ -598,7 +599,7 @@ export default function abilityTest() {
globalThis.callee.on(undefined, onTest); globalThis.callee.on(undefined, onTest);
} catch (err) { } catch (err) {
console.log('ACTS_CommonComponent_Call_3300 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_3300 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM); expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM);
finishFlag = 1; finishFlag = 1;
} }
...@@ -620,7 +621,7 @@ export default function abilityTest() { ...@@ -620,7 +621,7 @@ export default function abilityTest() {
globalThis.callee.off(''); globalThis.callee.off('');
} catch (err) { } catch (err) {
console.log('ACTS_CommonComponent_Call_3400 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_3400 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM); expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM);
finishFlag = 1; finishFlag = 1;
} }
...@@ -642,7 +643,7 @@ export default function abilityTest() { ...@@ -642,7 +643,7 @@ export default function abilityTest() {
globalThis.callee.off(null); globalThis.callee.off(null);
} catch (err) { } catch (err) {
console.log('ACTS_CommonComponent_Call_3500 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_3500 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM); expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM);
finishFlag = 1; finishFlag = 1;
} }
...@@ -664,7 +665,7 @@ export default function abilityTest() { ...@@ -664,7 +665,7 @@ export default function abilityTest() {
globalThis.callee.off(undefined); globalThis.callee.off(undefined);
} catch (err) { } catch (err) {
console.log('ACTS_CommonComponent_Call_3600 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_3600 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM); expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM);
finishFlag = 1; finishFlag = 1;
} }
...@@ -685,7 +686,7 @@ export default function abilityTest() { ...@@ -685,7 +686,7 @@ export default function abilityTest() {
globalThis.callee.on('testCall', ""); globalThis.callee.on('testCall', "");
} catch (err) { } catch (err) {
console.log('ACTS_CommonComponent_Call_4300 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_4300 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM); expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM);
finishFlag = 1; finishFlag = 1;
} }
...@@ -727,7 +728,7 @@ export default function abilityTest() { ...@@ -727,7 +728,7 @@ export default function abilityTest() {
globalThis.callee.on('testCall', undefined); globalThis.callee.on('testCall', undefined);
} catch (err) { } catch (err) {
console.log('ACTS_CommonComponent_Call_4500 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_4500 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM); expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM);
finishFlag = 1; finishFlag = 1;
} }
...@@ -761,7 +762,7 @@ export default function abilityTest() { ...@@ -761,7 +762,7 @@ export default function abilityTest() {
globalThis.callee.on('ACTS_CommonComponent_Call_5000', testCallback_5100); globalThis.callee.on('ACTS_CommonComponent_Call_5000', testCallback_5100);
} catch (err) { } catch (err) {
console.log('ACTS_CommonComponent_Call_5000 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_5000 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_FUNC_REGISTERED); expect(err.code).assertEqual(ERROR_CODE_FUNC_REGISTERED);
finishFlag = 1; finishFlag = 1;
} }
...@@ -798,7 +799,7 @@ export default function abilityTest() { ...@@ -798,7 +799,7 @@ export default function abilityTest() {
globalThis.callee.off('ACTS_CommonComponent_Call_5100'); globalThis.callee.off('ACTS_CommonComponent_Call_5100');
} catch (err) { } catch (err) {
console.log('ACTS_CommonComponent_Call_5100 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_5100 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_FUNC_NOT_EXIST); expect(err.code).assertEqual(ERROR_CODE_FUNC_NOT_EXIST);
finishFlag = 1; finishFlag = 1;
} }
...@@ -818,12 +819,12 @@ export default function abilityTest() { ...@@ -818,12 +819,12 @@ export default function abilityTest() {
let exceptionFlag = false; let exceptionFlag = false;
await globalThis.globalThis.abilityContext.startAbilityByCall(null) await globalThis.globalThis.abilityContext.startAbilityByCall(null)
.then(data => { .then(data => {
expect().assertFail(); expect().assertFail();
done(); done();
}).catch(err => { }).catch(err => {
console.log('ACTS_CommonComponent_Call_5200 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_5200 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM); expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM);
exceptionFlag = true; exceptionFlag = true;
...@@ -850,7 +851,7 @@ export default function abilityTest() { ...@@ -850,7 +851,7 @@ export default function abilityTest() {
done(); done();
}).catch(err => { }).catch(err => {
console.log('ACTS_CommonComponent_Call_5300 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_5300 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_INNER_ERROR); expect(err.code).assertEqual(ERROR_CODE_INNER_ERROR);
exceptionFlag = true; exceptionFlag = true;
}); });
...@@ -872,12 +873,12 @@ export default function abilityTest() { ...@@ -872,12 +873,12 @@ export default function abilityTest() {
.then(data => { .then(data => {
expect().assertFail(); expect().assertFail();
done(); done();
}).catch(err => { }).catch(err => {
console.log('ACTS_CommonComponent_Call_5400 call err.code: ' + JSON.stringify(err.code) + console.log('ACTS_CommonComponent_Call_5400 call err.code: ' + JSON.stringify(err.code) +
' err.msg: ' + JSON.stringify(err.message)); ' err.msg: ' + JSON.stringify(err.message));
expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM); expect(err.code).assertEqual(ERROR_CODE_INVALID_PARAM);
exceptionFlag = true; exceptionFlag = true;
}); });
expect(exceptionFlag).assertEqual(true); expect(exceptionFlag).assertEqual(true);
done(); done();
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 AbilityStage from "@ohos.application.AbilityStage" import AbilityStage from "@ohos.app.ability.AbilityStage"
var onAcceptWantCalledSeq; var onAcceptWantCalledSeq;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
class MySequenceable { class MySequenceable {
num: number = 0; num: number = 0;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 AbilityStage from "@ohos.application.AbilityStage" import AbilityStage from "@ohos.app.ability.AbilityStage"
var onAcceptWantCalledSeq; var onAcceptWantCalledSeq;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
class MySequenceable { class MySequenceable {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 AbilityStage from "@ohos.application.AbilityStage" import AbilityStage from "@ohos.app.ability.AbilityStage"
var onAcceptWantCalledSeq; var onAcceptWantCalledSeq;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
class MySequenceable { class MySequenceable {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
class MySequenceable { class MySequenceable {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
export default class MainAbility extends Ability { export default class MainAbility extends Ability {
onCreate(want, launchParam) { onCreate(want, launchParam) {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
class MySequenceable { class MySequenceable {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
export default class TestAbility extends Ability { export default class TestAbility extends Ability {
onCreate(want, launchParam) { onCreate(want, launchParam) {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* 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 Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import commonEvent from '@ohos.commonEvent' import commonEvent from '@ohos.commonEvent'
class MySequenceable { class MySequenceable {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册