提交 7c9398f9 编写于 作者: L Lotol

回退:delete entryDir and moduleSourceDir

Signed-off-by: NLotol <linxiangzhi@huawei.com>
上级 676d6b70
...@@ -239,10 +239,12 @@ export default function actsBmsJsUnPermissionTest() { ...@@ -239,10 +239,12 @@ export default function actsBmsJsUnPermissionTest() {
expect(info.label).assertEqual("$string:entry_MainAbility"); expect(info.label).assertEqual("$string:entry_MainAbility");
expect(info.labelId > 0).assertTrue(); expect(info.labelId > 0).assertTrue();
expect(info.systemApp).assertEqual(false); expect(info.systemApp).assertEqual(false);
expect(info.entryDir).assertEqual(""); expect(info.entryDir).assertEqual(
"/data/app/el1/bundle/public/com.example.actsbmsetsunpermissiontest/com.example.actsbmsetsunpermissiontest");
expect(info.supportedModes).assertEqual(0); expect(info.supportedModes).assertEqual(0);
expect(info.process).assertEqual("com.example.actsbmsetsunpermissiontest"); expect(info.process).assertEqual("com.example.actsbmsetsunpermissiontest");
expect(info.moduleSourceDirs.length).assertEqual(0); expect(info.moduleSourceDirs[0]).assertEqual(
"/data/app/el1/bundle/public/com.example.actsbmsetsunpermissiontest/com.example.actsbmsetsunpermissiontest");
expect(info.enabled).assertEqual(true); expect(info.enabled).assertEqual(true);
expect(info.uid).assertLarger(0); expect(info.uid).assertLarger(0);
expect(info.entityType).assertEqual("unspecified"); expect(info.entityType).assertEqual("unspecified");
......
...@@ -264,13 +264,13 @@ export default function GetabilityInfo() { ...@@ -264,13 +264,13 @@ export default function GetabilityInfo() {
expect(info.labelId > 0).assertTrue(); expect(info.labelId > 0).assertTrue();
expect(info.systemApp).assertEqual(false); expect(info.systemApp).assertEqual(false);
expect(typeof (info.entryDir)).assertEqual("string"); expect(typeof (info.entryDir)).assertEqual("string");
expect(info.entryDir).assertEqual(""); expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag/com.open.harmony.packagemag");
expect(typeof (info.supportedModes)).assertEqual("number"); expect(typeof (info.supportedModes)).assertEqual("number");
expect(info.supportedModes).assertEqual(0); expect(info.supportedModes).assertEqual(0);
expect(typeof (info.process)).assertEqual("string"); expect(typeof (info.process)).assertEqual("string");
expect(info.process).assertEqual("com.open.harmony.packagemag"); expect(info.process).assertEqual("com.open.harmony.packagemag");
expect(Array.isArray(info.moduleSourceDirs)).assertEqual(true); expect(Array.isArray(info.moduleSourceDirs)).assertEqual(true);
expect(info.moduleSourceDirs.length).assertEqual(0); expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag/com.open.harmony.packagemag");
expect(Array.isArray(info.permissions)).assertEqual(true); expect(Array.isArray(info.permissions)).assertEqual(true);
} }
...@@ -314,10 +314,10 @@ export default function GetabilityInfo() { ...@@ -314,10 +314,10 @@ export default function GetabilityInfo() {
expect(info.label).assertEqual("$string:app_name"); expect(info.label).assertEqual("$string:app_name");
expect(info.labelId > 0).assertTrue(); expect(info.labelId > 0).assertTrue();
expect(info.systemApp).assertEqual(false); expect(info.systemApp).assertEqual(false);
expect(info.entryDir).assertEqual(""); expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.example.third1/com.example.third1.entry");
expect(info.supportedModes).assertEqual(0); expect(info.supportedModes).assertEqual(0);
expect(info.process).assertEqual("com.example.third1"); expect(info.process).assertEqual("com.example.third1");
expect(info.moduleSourceDirs.length).assertEqual(0); expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.example.third1/com.example.third1.entry");
expect(JSON.stringify(info.metaData)).assertEqual("{}"); expect(JSON.stringify(info.metaData)).assertEqual("{}");
expect(info.enabled).assertEqual(true); expect(info.enabled).assertEqual(true);
expect(info.uid).assertLarger(0); expect(info.uid).assertLarger(0);
......
...@@ -375,13 +375,16 @@ export default function getAllApplicationBundleTest() { ...@@ -375,13 +375,16 @@ export default function getAllApplicationBundleTest() {
expect(data[i].systemApp).assertEqual(false); expect(data[i].systemApp).assertEqual(false);
expect(data[i].supportedModes).assertEqual(0); expect(data[i].supportedModes).assertEqual(0);
expect(data[i].process).assertEqual('com.open.harmony.packagemag'); expect(data[i].process).assertEqual('com.open.harmony.packagemag');
expect(data[i].entryDir).assertEqual(''); expect(data[i].entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' +
'/com.open.harmony.packagemag');
expect(data[i].enabled).assertEqual(true); expect(data[i].enabled).assertEqual(true);
expect(data[i].entityType).assertEqual('unspecified'); expect(data[i].entityType).assertEqual('unspecified');
expect(data[i].removable).assertEqual(true); expect(data[i].removable).assertEqual(true);
expect(data[i].moduleInfos[0].moduleName).assertEqual('entry'); expect(data[i].moduleInfos[0].moduleName).assertEqual('entry');
expect(data[i].moduleInfos[0].moduleSourceDir).assertEqual(''); expect(data[i].moduleInfos[0].moduleSourceDir).assertEqual('/data/app/el1/bundle/public/' +
expect(data[i].moduleSourceDirs.length).assertEqual(0); 'com.open.harmony.packagemag/com.open.harmony.packagemag');
expect(data[i].moduleSourceDirs[0]).assertEqual('/data/app/el1/bundle/public/' +
'com.open.harmony.packagemag/com.open.harmony.packagemag');
} }
} }
} }
...@@ -399,12 +402,14 @@ export default function getAllApplicationBundleTest() { ...@@ -399,12 +402,14 @@ export default function getAllApplicationBundleTest() {
expect(data.systemApp).assertFalse(); expect(data.systemApp).assertFalse();
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual(BUNDLE_OTHER); expect(data.process).assertEqual(BUNDLE_OTHER);
expect(data.entryDir).assertEqual(''); expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.permissions.length).assertEqual(0); expect(data.permissions.length).assertEqual(0);
expect(data.moduleSourceDirs.length).assertEqual(0); expect(data.moduleSourceDirs.length).assertEqual(1);
expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.moduleInfos.length).assertEqual(1); expect(data.moduleInfos.length).assertEqual(1);
expect(data.moduleInfos[0].moduleName).assertEqual('entry'); expect(data.moduleInfos[0].moduleName).assertEqual('entry');
expect(data.moduleInfos[0].moduleSourceDir).assertEqual(''); expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' +
BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(JSON.stringify(data.metaData)).assertEqual("{}"); expect(JSON.stringify(data.metaData)).assertEqual("{}");
expect(data.enabled).assertTrue(); expect(data.enabled).assertTrue();
expect(data.uid).assertLarger(0); expect(data.uid).assertLarger(0);
...@@ -426,12 +431,14 @@ export default function getAllApplicationBundleTest() { ...@@ -426,12 +431,14 @@ export default function getAllApplicationBundleTest() {
expect(data.systemApp).assertFalse(); expect(data.systemApp).assertFalse();
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual(BUNDLE_OTHER); expect(data.process).assertEqual(BUNDLE_OTHER);
expect(data.entryDir).assertEqual(''); expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.permissions.length).assertEqual(0); expect(data.permissions.length).assertEqual(0);
expect(data.moduleSourceDirs.length).assertEqual(0); expect(data.moduleSourceDirs.length).assertEqual(1);
expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.moduleInfos.length).assertEqual(1); expect(data.moduleInfos.length).assertEqual(1);
expect(data.moduleInfos[0].moduleName).assertEqual('entry'); expect(data.moduleInfos[0].moduleName).assertEqual('entry');
expect(data.moduleInfos[0].moduleSourceDir).assertEqual(''); expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' +
BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.enabled).assertTrue(); expect(data.enabled).assertTrue();
expect(data.uid).assertLarger(0); expect(data.uid).assertLarger(0);
expect(data.entityType).assertEqual('unspecified'); expect(data.entityType).assertEqual('unspecified');
......
...@@ -446,13 +446,13 @@ export default function applicationBundleJsunit() { ...@@ -446,13 +446,13 @@ export default function applicationBundleJsunit() {
expect(data.systemApp).assertEqual(false); expect(data.systemApp).assertEqual(false);
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual(BUNDLE_NAME); expect(data.process).assertEqual(BUNDLE_NAME);
expect(data.entryDir).assertEqual(''); expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME);
expect(data.enabled).assertEqual(true); expect(data.enabled).assertEqual(true);
expect(data.entityType).assertEqual('unspecified'); expect(data.entityType).assertEqual('unspecified');
expect(data.removable).assertEqual(true); expect(data.removable).assertEqual(true);
expect(data.moduleInfos[0].moduleName).assertEqual('entry'); expect(data.moduleInfos[0].moduleName).assertEqual('entry');
expect(data.moduleInfos[0].moduleSourceDir).assertEqual(''); expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME);
expect(data.moduleSourceDirs.length).assertEqual(0); expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME);
expect(data.permissions[0]).assertEqual("ohos.permission.GET_BUNDLE_INFO"); expect(data.permissions[0]).assertEqual("ohos.permission.GET_BUNDLE_INFO");
expect(data.permissions[1]).assertEqual("ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"); expect(data.permissions[1]).assertEqual("ohos.permission.GET_BUNDLE_INFO_PRIVILEGED");
expect(data.permissions[2]).assertEqual("ohos.permission.USE_BLUETOOTH"); expect(data.permissions[2]).assertEqual("ohos.permission.USE_BLUETOOTH");
...@@ -472,12 +472,14 @@ export default function applicationBundleJsunit() { ...@@ -472,12 +472,14 @@ export default function applicationBundleJsunit() {
expect(data.systemApp).assertFalse(); expect(data.systemApp).assertFalse();
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual(BUNDLE_NAME); expect(data.process).assertEqual(BUNDLE_NAME);
expect(data.entryDir).assertEqual(''); expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME);
expect(data.permissions.length).assertEqual(0); expect(data.permissions.length).assertEqual(0);
expect(data.moduleSourceDirs.length).assertEqual(0); expect(data.moduleSourceDirs.length).assertEqual(1);
expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_NAME + '/' + BUNDLE_NAME);
expect(data.moduleInfos.length).assertEqual(1); expect(data.moduleInfos.length).assertEqual(1);
expect(data.moduleInfos[0].moduleName).assertEqual('entry'); expect(data.moduleInfos[0].moduleName).assertEqual('entry');
expect(data.moduleInfos[0].moduleSourceDir).assertEqual(''); expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' +
BUNDLE_NAME + '/' + BUNDLE_NAME);
expect(JSON.stringify(data.metaData)).assertEqual("{}"); expect(JSON.stringify(data.metaData)).assertEqual("{}");
expect(data.enabled).assertTrue(); expect(data.enabled).assertTrue();
expect(data.uid).assertLarger(0); expect(data.uid).assertLarger(0);
...@@ -501,12 +503,14 @@ export default function applicationBundleJsunit() { ...@@ -501,12 +503,14 @@ export default function applicationBundleJsunit() {
expect(data.systemApp).assertFalse(); expect(data.systemApp).assertFalse();
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual(BUNDLE_OTHER); expect(data.process).assertEqual(BUNDLE_OTHER);
expect(data.entryDir).assertEqual(''); expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.permissions.length).assertEqual(0); expect(data.permissions.length).assertEqual(0);
expect(data.moduleSourceDirs.length).assertEqual(0); expect(data.moduleSourceDirs.length).assertEqual(1);
expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.moduleInfos.length).assertEqual(1); expect(data.moduleInfos.length).assertEqual(1);
expect(data.moduleInfos[0].moduleName).assertEqual('entry'); expect(data.moduleInfos[0].moduleName).assertEqual('entry');
expect(data.moduleInfos[0].moduleSourceDir).assertEqual(''); expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' +
BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(JSON.stringify(data.metaData)).assertEqual("{}"); expect(JSON.stringify(data.metaData)).assertEqual("{}");
expect(data.enabled).assertTrue(); expect(data.enabled).assertTrue();
expect(data.uid).assertLarger(0); expect(data.uid).assertLarger(0);
...@@ -528,12 +532,14 @@ export default function applicationBundleJsunit() { ...@@ -528,12 +532,14 @@ export default function applicationBundleJsunit() {
expect(data.systemApp).assertFalse(); expect(data.systemApp).assertFalse();
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.process).assertEqual(BUNDLE_OTHER); expect(data.process).assertEqual(BUNDLE_OTHER);
expect(data.entryDir).assertEqual(''); expect(data.entryDir).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.permissions.length).assertEqual(0); expect(data.permissions.length).assertEqual(0);
expect(data.moduleSourceDirs.length).assertEqual(0); expect(data.moduleSourceDirs.length).assertEqual(1);
expect(data.moduleSourceDirs[0]).assertEqual(PATH + '/' + BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.moduleInfos.length).assertEqual(1); expect(data.moduleInfos.length).assertEqual(1);
expect(data.moduleInfos[0].moduleName).assertEqual('entry'); expect(data.moduleInfos[0].moduleName).assertEqual('entry');
expect(data.moduleInfos[0].moduleSourceDir).assertEqual(''); expect(data.moduleInfos[0].moduleSourceDir).assertEqual(PATH + '/' +
BUNDLE_OTHER + '/' + BUNDLE_OTHER + '.entry');
expect(data.enabled).assertTrue(); expect(data.enabled).assertTrue();
expect(data.uid).assertLarger(0); expect(data.uid).assertLarger(0);
expect(data.entityType).assertEqual('unspecified'); expect(data.entityType).assertEqual('unspecified');
......
...@@ -96,7 +96,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -96,7 +96,7 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.entryInstallationFree).assertEqual(false); expect(datainfo.entryInstallationFree).assertEqual(false);
for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) {
expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1);
} }
expect(datainfo.appInfo.enabled).assertEqual(true); expect(datainfo.appInfo.enabled).assertEqual(true);
done(); done();
...@@ -160,7 +160,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -160,7 +160,7 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.entryInstallationFree).assertEqual(false); expect(datainfo.entryInstallationFree).assertEqual(false);
for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) {
expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1);
} }
expect(datainfo.appInfo.enabled).assertEqual(true); expect(datainfo.appInfo.enabled).assertEqual(true);
} }
...@@ -251,7 +251,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -251,7 +251,7 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.appInfo.supportedModes).assertEqual(0); expect(datainfo.appInfo.supportedModes).assertEqual(0);
for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) {
expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1);
} }
expect(datainfo.appInfo.enabled).assertEqual(true); expect(datainfo.appInfo.enabled).assertEqual(true);
done(); done();
...@@ -295,7 +295,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -295,7 +295,7 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.appInfo.supportedModes).assertEqual(0); expect(datainfo.appInfo.supportedModes).assertEqual(0);
for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) {
expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1);
} }
expect(datainfo.appInfo.enabled).assertEqual(true); expect(datainfo.appInfo.enabled).assertEqual(true);
done(); done();
...@@ -427,7 +427,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -427,7 +427,7 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.appInfo.supportedModes).assertEqual(0); expect(datainfo.appInfo.supportedModes).assertEqual(0);
for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.appInfo.moduleInfos.length; j++) {
expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1);
} }
expect(datainfo.appInfo.enabled).assertEqual(true); expect(datainfo.appInfo.enabled).assertEqual(true);
done(); done();
...@@ -508,7 +508,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -508,7 +508,7 @@ describe('ActsBundleManagerTest', function () {
expect(dataInfo.entryInstallationFree).assertEqual(false); expect(dataInfo.entryInstallationFree).assertEqual(false);
for (let j = 0; j < dataInfo.appInfo.moduleInfos.length; j++) { for (let j = 0; j < dataInfo.appInfo.moduleInfos.length; j++) {
expect(dataInfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(dataInfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1);
} }
expect(dataInfo.appInfo.enabled).assertEqual(true); expect(dataInfo.appInfo.enabled).assertEqual(true);
console.info("testGetBundleInfoCurrentUserIdPromise end --------"); console.info("testGetBundleInfoCurrentUserIdPromise end --------");
...@@ -557,7 +557,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -557,7 +557,7 @@ describe('ActsBundleManagerTest', function () {
expect(dataInfo.entryInstallationFree).assertEqual(false); expect(dataInfo.entryInstallationFree).assertEqual(false);
for (let j = 0; j < dataInfo.appInfo.moduleInfos.length; j++) { for (let j = 0; j < dataInfo.appInfo.moduleInfos.length; j++) {
expect(dataInfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(dataInfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1);
} }
console.info("testGetBundleInfoCurrentUserIdCallback end --------"); console.info("testGetBundleInfoCurrentUserIdCallback end --------");
done(); done();
...@@ -626,12 +626,12 @@ describe('ActsBundleManagerTest', function () { ...@@ -626,12 +626,12 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo[i].icon.length).assertLarger(0); expect(datainfo[i].icon.length).assertLarger(0);
expect(datainfo[i].label.length).assertLarger(0); expect(datainfo[i].label.length).assertLarger(0);
} }
expect(datainfo[i].moduleSourceDirs.length).assertEqual(0); expect(datainfo[i].moduleSourceDirs.length).assertLarger(0);
expect(datainfo[i].moduleInfos.length).assertLarger(0); expect(datainfo[i].moduleInfos.length).assertLarger(0);
expect(datainfo[i].supportedModes).assertEqual(0); expect(datainfo[i].supportedModes).assertEqual(0);
for (let j = 0; j < datainfo[i].moduleInfos.length; j++) { for (let j = 0; j < datainfo[i].moduleInfos.length; j++) {
expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0);
expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertEqual(0); expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0);
} }
} }
...@@ -648,12 +648,12 @@ describe('ActsBundleManagerTest', function () { ...@@ -648,12 +648,12 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.length).assertLarger(0); expect(datainfo.length).assertLarger(0);
for (let i = 0; i < datainfo.length; i++) { for (let i = 0; i < datainfo.length; i++) {
expect(datainfo[i].name.length).assertLarger(0); expect(datainfo[i].name.length).assertLarger(0);
expect(datainfo[i].moduleSourceDirs.length).assertEqual(0); expect(datainfo[i].moduleSourceDirs.length).assertLarger(0);
expect(datainfo[i].moduleInfos.length).assertLarger(0); expect(datainfo[i].moduleInfos.length).assertLarger(0);
expect(datainfo[i].supportedModes).assertEqual(0); expect(datainfo[i].supportedModes).assertEqual(0);
for (let j = 0; j < datainfo[i].moduleInfos.length; j++) { for (let j = 0; j < datainfo[i].moduleInfos.length; j++) {
expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0);
expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertEqual(0); expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0);
} }
} }
done(); done();
...@@ -695,7 +695,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -695,7 +695,7 @@ describe('ActsBundleManagerTest', function () {
userId).then(datainfo => { userId).then(datainfo => {
expect(typeof datainfo).assertEqual(OBJECT); expect(typeof datainfo).assertEqual(OBJECT);
console.info("getApplicationInfo success:" + JSON.stringify(datainfo)); console.info("getApplicationInfo success:" + JSON.stringify(datainfo));
expect(datainfo.moduleSourceDirs.length).assertEqual(0); expect(datainfo.moduleSourceDirs.length).assertLarger(0);
expect(datainfo.moduleInfos.length).assertLarger(0); expect(datainfo.moduleInfos.length).assertLarger(0);
expect(datainfo.name).assertEqual(NAME1); expect(datainfo.name).assertEqual(NAME1);
expect(datainfo.description).assertEqual(APPLICATION_DESCRIPTION); expect(datainfo.description).assertEqual(APPLICATION_DESCRIPTION);
...@@ -711,10 +711,10 @@ describe('ActsBundleManagerTest', function () { ...@@ -711,10 +711,10 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.metaData.entry[0].name).assertEqual("metaDataName"); expect(datainfo.metaData.entry[0].name).assertEqual("metaDataName");
expect(datainfo.metaData.entry[0].value).assertEqual("metaDataValue"); expect(datainfo.metaData.entry[0].value).assertEqual("metaDataValue");
expect(datainfo.metaData.entry[0].extra).assertEqual("$string:app_name"); expect(datainfo.metaData.entry[0].extra).assertEqual("$string:app_name");
expect(datainfo.moduleSourceDirs.length).assertEqual(0); expect(datainfo.moduleSourceDirs.length).assertLarger(0);
for (let j = 0; j < datainfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.moduleInfos.length; j++) {
expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertEqual(0); expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertLarger(0);
} }
done(); done();
}).catch(err => { }).catch(err => {
...@@ -741,7 +741,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -741,7 +741,7 @@ describe('ActsBundleManagerTest', function () {
} }
expect(typeof datainfo).assertEqual(OBJECT); expect(typeof datainfo).assertEqual(OBJECT);
console.info("testGetApplicationInfoMetaDataCallback success:" + JSON.stringify(datainfo)); console.info("testGetApplicationInfoMetaDataCallback success:" + JSON.stringify(datainfo));
expect(datainfo.moduleSourceDirs.length).assertEqual(0); expect(datainfo.moduleSourceDirs.length).assertLarger(0);
expect(datainfo.moduleInfos.length).assertLarger(0); expect(datainfo.moduleInfos.length).assertLarger(0);
expect(datainfo.name).assertEqual(NAME1); expect(datainfo.name).assertEqual(NAME1);
expect(datainfo.description).assertEqual(APPLICATION_DESCRIPTION); expect(datainfo.description).assertEqual(APPLICATION_DESCRIPTION);
...@@ -757,10 +757,10 @@ describe('ActsBundleManagerTest', function () { ...@@ -757,10 +757,10 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.metaData.entry[0].name).assertEqual("metaDataName"); expect(datainfo.metaData.entry[0].name).assertEqual("metaDataName");
expect(datainfo.metaData.entry[0].value).assertEqual("metaDataValue"); expect(datainfo.metaData.entry[0].value).assertEqual("metaDataValue");
expect(datainfo.metaData.entry[0].extra).assertEqual("$string:app_name"); expect(datainfo.metaData.entry[0].extra).assertEqual("$string:app_name");
expect(datainfo.moduleSourceDirs.length).assertEqual(0); expect(datainfo.moduleSourceDirs.length).assertLarger(0);
for (let j = 0; j < datainfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.moduleInfos.length; j++) {
expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertEqual(0); expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertLarger(0);
} }
done(); done();
}) })
...@@ -780,7 +780,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -780,7 +780,7 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.description.length).assertLarger(0); expect(datainfo.description.length).assertLarger(0);
expect(datainfo.icon.length).assertLarger(0); expect(datainfo.icon.length).assertLarger(0);
expect(datainfo.label.length).assertLarger(0); expect(datainfo.label.length).assertLarger(0);
expect(datainfo.moduleSourceDirs.length).assertEqual(0); expect(datainfo.moduleSourceDirs.length).assertLarger(0);
expect(datainfo.moduleInfos.length).assertLarger(0); expect(datainfo.moduleInfos.length).assertLarger(0);
expect(datainfo.name).assertEqual(NAME2); expect(datainfo.name).assertEqual(NAME2);
expect(datainfo.description).assertEqual(APPLICATION_DESCRIPTION); expect(datainfo.description).assertEqual(APPLICATION_DESCRIPTION);
...@@ -793,12 +793,12 @@ describe('ActsBundleManagerTest', function () { ...@@ -793,12 +793,12 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.supportedModes).assertEqual(0); expect(datainfo.supportedModes).assertEqual(0);
expect(datainfo.process).assertEqual(NAME2); expect(datainfo.process).assertEqual(NAME2);
expect(datainfo.enabled).assertEqual(true); expect(datainfo.enabled).assertEqual(true);
expect(datainfo.moduleSourceDirs.length).assertEqual(0); expect(datainfo.moduleSourceDirs.length).assertLarger(0);
expect(datainfo.moduleInfos.length).assertEqual(2); expect(datainfo.moduleInfos.length).assertEqual(2);
expect(datainfo.moduleInfos[0].moduleName).assertEqual("entry"); expect(datainfo.moduleInfos[0].moduleName).assertEqual("entry");
expect(datainfo.moduleInfos[1].moduleName).assertEqual("feature"); expect(datainfo.moduleInfos[1].moduleName).assertEqual("feature");
for (let j = 0; j < datainfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.moduleInfos.length; j++) {
expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertEqual(0); expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertLarger(0);
} }
done(); done();
}) })
...@@ -817,7 +817,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -817,7 +817,7 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.description.length).assertLarger(0); expect(datainfo.description.length).assertLarger(0);
expect(datainfo.icon.length).assertLarger(0); expect(datainfo.icon.length).assertLarger(0);
expect(datainfo.label.length).assertLarger(0); expect(datainfo.label.length).assertLarger(0);
expect(datainfo.moduleSourceDirs.length).assertEqual(0); expect(datainfo.moduleSourceDirs.length).assertLarger(0);
expect(datainfo.moduleInfos.length).assertLarger(0); expect(datainfo.moduleInfos.length).assertLarger(0);
expect(datainfo.name).assertEqual(NAME2); expect(datainfo.name).assertEqual(NAME2);
expect(datainfo.description).assertEqual(APPLICATION_DESCRIPTION); expect(datainfo.description).assertEqual(APPLICATION_DESCRIPTION);
...@@ -830,12 +830,12 @@ describe('ActsBundleManagerTest', function () { ...@@ -830,12 +830,12 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.supportedModes).assertEqual(0); expect(datainfo.supportedModes).assertEqual(0);
expect(datainfo.process).assertEqual(NAME2); expect(datainfo.process).assertEqual(NAME2);
expect(datainfo.enabled).assertEqual(true); expect(datainfo.enabled).assertEqual(true);
expect(datainfo.moduleSourceDirs.length).assertEqual(0); expect(datainfo.moduleSourceDirs.length).assertLarger(0);
expect(datainfo.moduleInfos.length).assertEqual(2); expect(datainfo.moduleInfos.length).assertEqual(2);
expect(datainfo.moduleInfos[0].moduleName).assertEqual("entry"); expect(datainfo.moduleInfos[0].moduleName).assertEqual("entry");
expect(datainfo.moduleInfos[1].moduleName).assertEqual("feature"); expect(datainfo.moduleInfos[1].moduleName).assertEqual("feature");
for (let j = 0; j < datainfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.moduleInfos.length; j++) {
expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertEqual(0); expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertLarger(0);
} }
done(); done();
}) })
...@@ -1042,7 +1042,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -1042,7 +1042,7 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.enabled).assertEqual(true); expect(datainfo.enabled).assertEqual(true);
for (let j = 0; j < datainfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.moduleInfos.length; j++) {
expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(datainfo.moduleInfos[j].moduleSourceDir).assertEqual(''); expect(datainfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1);
} }
done(); done();
}).catch(error => { }).catch(error => {
...@@ -1080,7 +1080,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -1080,7 +1080,7 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.enabled).assertEqual(true); expect(datainfo.enabled).assertEqual(true);
for (let j = 0; j < datainfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.moduleInfos.length; j++) {
expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(datainfo.moduleInfos[j].moduleSourceDir).assertEqual(''); expect(datainfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1);
} }
done(); done();
}) })
...@@ -1150,12 +1150,12 @@ describe('ActsBundleManagerTest', function () { ...@@ -1150,12 +1150,12 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo[i].icon.length).assertLarger(0); expect(datainfo[i].icon.length).assertLarger(0);
expect(datainfo[i].label.length).assertLarger(0); expect(datainfo[i].label.length).assertLarger(0);
} }
expect(datainfo[i].moduleSourceDirs.length).assertEqual(0); expect(datainfo[i].moduleSourceDirs.length).assertLarger(0);
expect(datainfo[i].moduleInfos.length).assertLarger(0); expect(datainfo[i].moduleInfos.length).assertLarger(0);
expect(datainfo[i].supportedModes).assertEqual(0); expect(datainfo[i].supportedModes).assertEqual(0);
for (let j = 0; j < datainfo[i].moduleInfos.length; j++) { for (let j = 0; j < datainfo[i].moduleInfos.length; j++) {
expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0);
expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertEqual(0); expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0);
} }
} }
done(); done();
...@@ -1177,12 +1177,12 @@ describe('ActsBundleManagerTest', function () { ...@@ -1177,12 +1177,12 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo[i].icon.length).assertLarger(0); expect(datainfo[i].icon.length).assertLarger(0);
expect(datainfo[i].label.length).assertLarger(0); expect(datainfo[i].label.length).assertLarger(0);
} }
expect(datainfo[i].moduleSourceDirs.length).assertEqual(0); expect(datainfo[i].moduleSourceDirs.length).assertLarger(0);
expect(datainfo[i].moduleInfos.length).assertLarger(0); expect(datainfo[i].moduleInfos.length).assertLarger(0);
expect(datainfo[i].supportedModes).assertEqual(0); expect(datainfo[i].supportedModes).assertEqual(0);
for (let j = 0; j < datainfo[i].moduleInfos.length; j++) { for (let j = 0; j < datainfo[i].moduleInfos.length; j++) {
expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0);
expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertEqual(0); expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0);
} }
} }
done(); done();
...@@ -1204,12 +1204,12 @@ describe('ActsBundleManagerTest', function () { ...@@ -1204,12 +1204,12 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo[i].icon.length).assertLarger(0); expect(datainfo[i].icon.length).assertLarger(0);
expect(datainfo[i].label.length).assertLarger(0); expect(datainfo[i].label.length).assertLarger(0);
} }
expect(datainfo[i].moduleSourceDirs.length).assertEqual(0); expect(datainfo[i].moduleSourceDirs.length).assertLarger(0);
expect(datainfo[i].moduleInfos.length).assertLarger(0); expect(datainfo[i].moduleInfos.length).assertLarger(0);
expect(datainfo[i].supportedModes).assertEqual(0); expect(datainfo[i].supportedModes).assertEqual(0);
for (let j = 0; j < datainfo[i].moduleInfos.length; j++) { for (let j = 0; j < datainfo[i].moduleInfos.length; j++) {
expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0);
expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertEqual(0); expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0);
} }
} }
done(); done();
...@@ -1421,7 +1421,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -1421,7 +1421,7 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.metaData.length).assertLarger(0); expect(datainfo.metaData.length).assertLarger(0);
for (let j = 0; j < datainfo.applicationInfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.applicationInfo.moduleInfos.length; j++) {
expect(datainfo.applicationInfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(datainfo.applicationInfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(datainfo.applicationInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); expect(datainfo.applicationInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1);
} }
} }
done(); done();
...@@ -1480,7 +1480,7 @@ describe('ActsBundleManagerTest', function () { ...@@ -1480,7 +1480,7 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.metaData.length).assertLarger(0); expect(datainfo.metaData.length).assertLarger(0);
for (let j = 0; j < datainfo.applicationInfo.moduleInfos.length; j++) { for (let j = 0; j < datainfo.applicationInfo.moduleInfos.length; j++) {
expect(datainfo.applicationInfo.moduleInfos[j].moduleName).assertEqual("entry"); expect(datainfo.applicationInfo.moduleInfos[j].moduleName).assertEqual("entry");
expect(datainfo.applicationInfo.moduleInfos[j].moduleSourceDir).assertEqual(''); expect(datainfo.applicationInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1);
} }
} }
done(); done();
...@@ -1521,9 +1521,9 @@ describe('ActsBundleManagerTest', function () { ...@@ -1521,9 +1521,9 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.applicationInfo.supportedModes).assertEqual(0); expect(datainfo.applicationInfo.supportedModes).assertEqual(0);
expect(datainfo.applicationInfo.enabled).assertEqual(true); expect(datainfo.applicationInfo.enabled).assertEqual(true);
expect(datainfo.applicationInfo.moduleInfos[0].moduleName).assertEqual("entry"); expect(datainfo.applicationInfo.moduleInfos[0].moduleName).assertEqual("entry");
expect(datainfo.applicationInfo.moduleInfos[0].moduleSourceDir).assertEqual(''); expect(datainfo.applicationInfo.moduleInfos[0].moduleSourceDir).assertEqual(DIR3);
expect(datainfo.applicationInfo.moduleInfos[1].moduleName).assertEqual("feature"); expect(datainfo.applicationInfo.moduleInfos[1].moduleName).assertEqual("feature");
expect(datainfo.applicationInfo.moduleInfos[1].moduleSourceDir).assertEqual(''); expect(datainfo.applicationInfo.moduleInfos[1].moduleSourceDir).assertEqual(DIR2);
} }
done(); done();
}) })
...@@ -1562,9 +1562,9 @@ describe('ActsBundleManagerTest', function () { ...@@ -1562,9 +1562,9 @@ describe('ActsBundleManagerTest', function () {
expect(datainfo.applicationInfo.supportedModes).assertEqual(0); expect(datainfo.applicationInfo.supportedModes).assertEqual(0);
expect(datainfo.applicationInfo.enabled).assertEqual(true); expect(datainfo.applicationInfo.enabled).assertEqual(true);
expect(datainfo.applicationInfo.moduleInfos[0].moduleName).assertEqual("entry"); expect(datainfo.applicationInfo.moduleInfos[0].moduleName).assertEqual("entry");
expect(datainfo.applicationInfo.moduleInfos[0].moduleSourceDir).assertEqual(''); expect(datainfo.applicationInfo.moduleInfos[0].moduleSourceDir).assertEqual(DIR3);
expect(datainfo.applicationInfo.moduleInfos[1].moduleName).assertEqual("feature"); expect(datainfo.applicationInfo.moduleInfos[1].moduleName).assertEqual("feature");
expect(datainfo.applicationInfo.moduleInfos[1].moduleSourceDir).assertEqual(''); expect(datainfo.applicationInfo.moduleInfos[1].moduleSourceDir).assertEqual(DIR2);
} }
done(); done();
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册