提交 d1c261ed 编写于 作者: L lixinyi

xts_acts-crossplatform

Signed-off-by: Nlixinyi <lixinyi38@huawei.com>
上级 cef5d3ad
......@@ -98,7 +98,7 @@ export default function preferencesCallbackWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. Need 2 or 3 parameters!").assertTrue();
expect(err.code === "401").assertTrue();
done();
console.log("testMpreferencesGet0000 end.");
}
......@@ -126,7 +126,7 @@ export default function preferencesCallbackWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -203,7 +203,7 @@ export default function preferencesCallbackWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
console.log("testMpreferencesHas0001 end.");
}
......@@ -252,7 +252,7 @@ export default function preferencesCallbackWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. Need 2 or 3 parameters!").assertTrue();
expect(err.code === "401").assertTrue();
done();
console.log("testMpreferencesPut0001 end.");
}
......@@ -339,7 +339,7 @@ export default function preferencesCallbackWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -367,7 +367,7 @@ export default function preferencesCallbackWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be ValueType.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -389,7 +389,7 @@ export default function preferencesCallbackWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
console.log("testMpreferencesDelete0001 end.");
}
......
......@@ -58,7 +58,7 @@ export default function preferencesIgnoreTest() {
});
} catch (err) {
console.info("testPreferencesGetPreferences001 fail: " + err.message + "code: " + err.code);
expect(err.code === "401" && err.message == "Parameter error. The type of 'name' must be a without path non empty string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -90,7 +90,7 @@ export default function preferencesIgnoreTest() {
});
} catch (err) {
console.info("testPreferencesDeletePreferences002 fail: " + err.message + "code: " + err.code);
expect(err.code === "401" && err.message === "Parameter error. The type of 'name' must be a without path non empty string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
}
......@@ -124,7 +124,7 @@ export default function preferencesIgnoreTest() {
});
} catch (err) {
console.info("testRemovePreferencesFromCache002 fail: " + err.message + "code: " + err.code);
expect(err.code === "401" && err.message === "Parameter error. The type of 'name' must be a without path non empty string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
}
......@@ -145,7 +145,7 @@ export default function preferencesIgnoreTest() {
await dataPreferences.getPreferences(context, -1);
} catch (err) {
console.info("testGetPreferencesHelper0003 fail: " + err.message + "code: " + err.code);
expect(err.code === "401" && err.message === "Parameter error. The type of 'name' must be a without path non empty string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -164,7 +164,7 @@ export default function preferencesIgnoreTest() {
await dataPreferences.getPreferences(context);
} catch (err) {
console.info("testGetPreferencesHelper0004 fail: " + err.message + "code: " + err.code);
expect(err.code === "401" && err.message === "Parameter error. Need 2 or 3 parameters!").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -184,7 +184,7 @@ export default function preferencesIgnoreTest() {
await dataPreferences.removePreferencesFromCache(context);
} catch (err) {
console.info("testRemovePreferencesFromCacheHelper0002 fail: " + err.message + "code: " + err.code);
expect(err.code === "401" && err.message === "Parameter error. Need 2 or 3 parameters!").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -204,7 +204,7 @@ export default function preferencesIgnoreTest() {
await dataPreferences.removePreferencesFromCache(context, -1);
} catch (err) {
console.info("testRemovePreferencesFromCacheHelper0003 fail: " + err.message + "code: " + err.code);
expect(err.code === "401" && err.message === "Parameter error. The type of 'name' must be a without path non empty string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -224,7 +224,7 @@ export default function preferencesIgnoreTest() {
await dataPreferences.deletePreferences(context);
} catch (err) {
console.info("testPreferencesDeleteHelper0002 fail: " + err.message + "code: " + err.code);
expect(err.code === "401" && err.message === "Parameter error. Need 2 or 3 parameters!").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -244,7 +244,7 @@ export default function preferencesIgnoreTest() {
await dataPreferences.deletePreferences(context, -1);
} catch (err) {
console.info("testPreferencesDeleteHelper0003 fail: " + err.message + "code: " + err.code);
expect(err.code === "401" && err.message === "Parameter error. The type of 'name' must be a without path non empty string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......
......@@ -127,7 +127,7 @@ export default function preferencesPromiseWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. Need 2 or 3 parameters!").assertTrue();
expect(err.code === "401").assertTrue();
done();
console.log("testMpreferencesGetPromise0001 end.");
}
......@@ -157,7 +157,7 @@ export default function preferencesPromiseWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -205,7 +205,7 @@ export default function preferencesPromiseWithErrorTest() {
mPreference.getSync(1233);
} catch (err) {
console.log("trycatch1 err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. Need 2 parameters!").assertTrue();
expect(err.code === "401").assertTrue();
done();
console.log("testMpreferencesGetSyncWithError0001 end.");
}
......@@ -226,7 +226,7 @@ export default function preferencesPromiseWithErrorTest() {
mPreference.getSync(-1, KEY_TEST_INT_ELEMENT);
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -303,7 +303,7 @@ export default function preferencesPromiseWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
console.log("testMpreferencesHasPromise0001 end.");
}
......@@ -358,7 +358,7 @@ export default function preferencesPromiseWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. Need 2 or 3 parameters!").assertTrue();
expect(err.code === "401").assertTrue();
done();
console.log("testMpreferencesPutPromise0001 end.");
}
......@@ -451,7 +451,7 @@ export default function preferencesPromiseWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -480,7 +480,7 @@ export default function preferencesPromiseWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be ValueType.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -499,7 +499,7 @@ export default function preferencesPromiseWithErrorTest() {
mPreference.putSync(1233);
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. Need 2 parameters!").assertTrue();
expect(err.code === "401").assertTrue();
done();
console.log("testMpreferencesPutSyncWithError0001 end.");
}
......@@ -565,7 +565,7 @@ export default function preferencesPromiseWithErrorTest() {
mPreference.putSync(-1, 123);
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -584,7 +584,7 @@ export default function preferencesPromiseWithErrorTest() {
mPreference.putSync(KEY_TEST_STRING_ELEMENT, null);
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be ValueType.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -611,7 +611,7 @@ export default function preferencesPromiseWithErrorTest() {
});
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401" && err.message === "Parameter error. The type of 'value' must be string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
console.log("testMpreferencesDeletePromise0001 end.");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册