提交 7b7284ce 编写于 作者: Y y00314596

add by yangqing3@huawei.com

Signed-off-by: Ny00314596 <yangqing3@huawei.com>
上级 9a54abe6
......@@ -75,6 +75,8 @@ describe('resMgrTest', function () {
resmgr.getResourceManager((error, mgr) => {
mgr.getString(0x1000000, (err, value) => {
expect(value !== null).assertTrue();
console.log('getString_test_001 ' + value);
expect(value).assertEqual('L2Test');
})
})
done();
......@@ -89,6 +91,8 @@ describe('resMgrTest', function () {
resmgr.getResourceManager((error, mgr) => {
mgr.getString(0x1000000).then(value => {
expect(value !== null).assertTrue();
console.log('getString_test_002 ' + value);
expect(value).assertEqual('L2Test');
})
})
done();
......@@ -103,6 +107,14 @@ describe('resMgrTest', function () {
resmgr.getResourceManager((error, mgr) => {
mgr.getStringArray(0x1000002, (err, value) => {
expect(value !== null).assertTrue();
console.log('getStringArray_test_001 ' + value);
console.log('getStringArray_test_001 ' + value.length);
console.log('getStringArray_test_001 ' + value[0]);
expect(value.length).assertEqual(4);
expect(value[0]).assertEqual('small');
expect(value[1]).assertEqual('middle');
expect(value[2]).assertEqual('large');
expect(value[3]).assertEqual('extra large');
})
})
done();
......@@ -117,6 +129,14 @@ describe('resMgrTest', function () {
resmgr.getResourceManager((error, mgr) => {
mgr.getStringArray(0x1000002).then(value => {
expect(value !== null).assertTrue();
console.log('getStringArray_test_002 ' + value);
console.log('getStringArray_test_002 ' + value.length);
console.log('getStringArray_test_002 ' + value[0]);
expect(value.length).assertEqual(4);
expect(value[0]).assertEqual('small');
expect(value[1]).assertEqual('middle');
expect(value[2]).assertEqual('large');
expect(value[3]).assertEqual('extra large');
})
})
done();
......@@ -159,6 +179,7 @@ describe('resMgrTest', function () {
resmgr.getResourceManager((error, mgr) => {
mgr.getMediaBase64(0x1000004, (err, value) => {
expect(value.length > 0).assertTrue();
console.log('getMediaBase64_test_001 ' + value);
})
})
done();
......@@ -173,6 +194,7 @@ describe('resMgrTest', function () {
resmgr.getResourceManager((error, mgr) => {
mgr.getMediaBase64(0x1000004).then(value => {
expect(value.length > 0).assertTrue();
console.log('getMediaBase64_test_002 ' + value);
})
})
done();
......@@ -260,6 +282,7 @@ describe('resMgrTest', function () {
mgr.getPluralString(0x1000003, 1, (error, value) => {
expect(value !== null).assertTrue();
console.log('getPluralString_test_001 ' + value);
expect(value).assertEqual('1 test other');
})
})
done();
......@@ -275,6 +298,7 @@ describe('resMgrTest', function () {
mgr.getPluralString(0x1000003, 1).then(value => {
expect(value !== null).assertTrue();
console.log('getPluralString_test_002 ' + value);
expect(value).assertEqual('1 test other');
})
})
done();
......@@ -287,10 +311,10 @@ describe('resMgrTest', function () {
*/
it('getString_test_003', 0, async function (done) {
resmgr.getResourceManager((error, mgr) => {
mgr.getString(0x7000000, (err, value) => {
mgr.getString(0x1000001, (err, value) => {
expect(value !== null).assertTrue();
console.log('getString_test_003 ' + value);
expect(value).assertEqual('hello world!');
expect(value).assertEqual('JS_Phone_Empty Feature Ability');
})
})
done();
......@@ -355,8 +379,8 @@ describe('resMgrTest', function () {
expect(rawfile !== null).assertTrue();
console.log('getRawFileDescriptor_test_001--'
+'fd:' + fdValue
+ 'offset:' + offsetValue
+ 'length:' + lengthValue);
+ ' offset:' + offsetValue
+ ' length:' + lengthValue);
})
})
done();
......@@ -377,8 +401,8 @@ describe('resMgrTest', function () {
console.log('getRawFileDescriptor_test_002--' + rawfile);
console.log('getRawFileDescriptor_test_002--'
+'fd:' + rawfile.fd
+ 'offset:' + rawfile.offset
+ 'length:' + rawfile.length);
+ ' offset:' + rawfile.offset
+ ' length:' + rawfile.length);
})
})
done();
......@@ -415,4 +439,4 @@ describe('resMgrTest', function () {
})
console.log('*************end ResmgrTest*************');
})
\ No newline at end of file
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册