diff --git a/storage/storagefileiov9jstest/src/main/js/test/members/filerw.test.js b/storage/storagefileiov9jstest/src/main/js/test/members/filerw.test.js index ae44398c40f0e117b04b2c8ee68a75f1755f1b87..bae4d14be3bfbca886571cd43e96398f70120748 100644 --- a/storage/storagefileiov9jstest/src/main/js/test/members/filerw.test.js +++ b/storage/storagefileiov9jstest/src/main/js/test/members/filerw.test.js @@ -40,15 +40,15 @@ export default function FileIOFilerw_test() { if (promise) { if (read) { fileIO.read(file.fd, array, { length: bf, offset: offset }).then((readLen) => { - console.log('fileIO_test_read_promise succeed' + readLen); }).catch((e) => { console.log('fileIO_test_read_promise has failed for ' + e.message + ', code: ' + e.code); + return -1; }); } else { fileIO.write(file.fd, array, { length: bf, offset: offset, encoding: 'utf-8' }).then((writeLen) => { - console.log('fileIO_test_write_promise succeed' + writeLen); }).catch((e) => { console.log('fileIO_test_write_promise has failed for ' + e.message + ', code: ' + e.code); + return -1; }); } } else { @@ -56,12 +56,14 @@ export default function FileIOFilerw_test() { fileIO.read(file.fd, array, { length: bf, offset: offset }, (err, readLen) => { if (err) { console.log('fileIO_test_read_callback has failed for ' + err.message + ', code: ' + err.code); + return -1; } }); } else { fileIO.write(file.fd, array, { length: bf, offset: offset, encoding: 'utf-8' }, (err, writeLen) => { if (err) { console.log('fileIO_test_write_callback has failed for ' + err.message + ', code: ' + err.code); + return -1; } }); }