diff --git a/commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js b/commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js index df4bf8067ecc3fb5fb9ccc31bdf474e0bbd6904b..06cdefb73142d4ad380a805912d1620c7f751b54 100644 --- a/commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js +++ b/commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js @@ -45,13 +45,19 @@ var rangeFir = new util.Scope(tempMiDF, tempMidS); var rangeSec = new util.Scope(tempLess, tempMore); var rangeThi = new util.Scope(tempLess, tempMiDF); var rangeFif = new util.Scope(tempMiDF, tempMore); + +var rangeHp = new util.ScopeHelper(tempLower, tempUpper); +var rangeHpFir = new util.ScopeHelper(tempMiDF, tempMidS); +var rangeHpSec = new util.ScopeHelper(tempLess, tempMore); +var rangeHpThi = new util.ScopeHelper(tempLess, tempMiDF); +var rangeHpFif = new util.ScopeHelper(tempMiDF, tempMore); + export default function UtilFunTest() { describe('TextEncoderTest', function () { /** * @tc.name: testUtilPrintf001 * @tc.desc: Returns the formatted string. - * @tc.author: shikai */ it('testUtilPrintf001', 0, function () { var format = "%i,%s"; @@ -65,7 +71,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testUtilPrintf002 * @tc.desc: Returns the formatted string. - * @tc.author: shikai */ it('testUtilPrintf002', 0, function () { var format = "%O"; @@ -77,7 +82,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testUtilPrintf003 * @tc.desc: Returns the formatted string. - * @tc.author: shikai */ it('testUtilPrintf003', 0, function () { var format = "%o"; @@ -90,7 +94,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testUtilPrintf004 * @tc.desc: Returns the formatted string. - * @tc.author: shikai */ it('testUtilPrintf004', 0, function () { var format = "%s,%s,%s"; @@ -103,7 +106,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testUtilPrintf005 * @tc.desc: Returns the formatted string. - * @tc.author: shikai */ it('testUtilPrintf005', 0, function () { var format = "%d,%d"; @@ -116,7 +118,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testUtilGetErrorString001 * @tc.desc: Get the string name of the system errno. - * @tc.author: shikai */ it('testUtilGetErrorString001', 0, async function () { var errnum = 10; @@ -127,7 +128,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testUtilGetErrorString002 * @tc.desc: Get the string name of the system errno. - * @tc.author: shikai */ it('testUtilGetErrorString002', 0, async function () { var errnum = 0; @@ -138,7 +138,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testUtilGetErrorString003 * @tc.desc: Get the string name of the system errno. - * @tc.author: shikai */ it('testUtilGetErrorString003', 0, async function () { var errnum = -1; @@ -149,7 +148,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testUtilGetErrorString004 * @tc.desc: Get the string name of the system errno. - * @tc.author: shikai */ it('testUtilGetErrorString004', 0, async function () { var errnum = 9; @@ -160,7 +158,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testUtilGetErrorString005 * @tc.desc: Get the string name of the system errno. - * @tc.author: shikai */ it('testUtilGetErrorString005', 0, async function () { var errnum = 555; @@ -172,7 +169,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilPromisify_new_001 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a function that returns promises. - * @tc.author: shikai */ it('testUtilPromisify_new_001', 0, async function () { function fn(val, callback) { @@ -192,7 +188,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilPromisify_new_002 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a function that returns promises. - * @tc.author: shikai */ it('testUtilPromisify_new_002', 0, async function () { function fn(str, callback) { @@ -212,7 +207,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilPromisify_new_003 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a function that returns promises. - * @tc.author: shikai */ it('testUtilPromisify_new_003', 0, async function () { function fn(err, val, callback) { @@ -228,7 +222,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilPromisify_new_004 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a function that returns promises. - * @tc.author: shikai */ it('testUtilPromisify_new_004', 0, async function () { function fn(val, callback) { @@ -248,7 +241,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilPromisify_new_005 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a function that returns promises. - * @tc.author: shikai */ it('testUtilPromisify_new_005', 0, async function () { function fn(val, callback) { @@ -268,7 +260,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilPromiseWrapper001 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a version that returns promises. - * @tc.author: shikai */ it('testUtilPromiseWrapper001', 0, async function () { function aysnFun(str1, str2, callback) { @@ -288,7 +279,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilPromiseWrapper002 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a version that returns promises. - * @tc.author: shikai */ it('testUtilPromiseWrapper002', 0, async function () { function aysnFun(str1, str2, callback) { @@ -308,7 +298,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilPromiseWrapper003 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a version that returns promises. - * @tc.author: shikai */ it('testUtilPromiseWrapper003', 0, async function () { let errToThrow; @@ -325,7 +314,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilPromiseWrapper004 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a version that returns promises. - * @tc.author: shikai */ it('testUtilPromiseWrapper004', 0, async function () { const err = new Error(); @@ -345,7 +333,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilPromiseWrapper005 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a version that returns promises. - * @tc.author: shikai */ it('testUtilPromiseWrapper005', 0, async function () { const err = new Error('callback with the error.'); @@ -365,7 +352,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilPromiseWrapper006 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a version that returns promises. - * @tc.author: shikai */ it('testUtilPromiseWrapper006', 0, async function () { function fn(err, val, callback) { @@ -381,14 +367,13 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilCallbackWrapper001 * @tc.desc: Takes an async function (or a function that returns a Promise) and returns a function following the error-first callback style. - * @tc.author: shikai */ it('testUtilCallbackWrapper001', 0, async function () { const promiseFn = [1, 2]; try { util.callbackWrapper(promiseFn); } catch(e) { - expect(e.message).assertEqual('original is not function'); + expect(e.toString()).assertEqual('BusinessError: Parameter error.The type of 1,2 must be function'); } }) @@ -396,7 +381,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilCallbackWrapper002 * @tc.desc: Takes an async function (or a function that returns a Promise) and returns a function following the error-first callback style. - * @tc.author: shikai */ it('testUtilCallbackWrapper002', 0, async function () { async function promiseFn() { @@ -415,7 +399,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilCallbackWrapper003 * @tc.desc: Takes an async function (or a function that returns a Promise) and returns a function following the error-first callback style. - * @tc.author: shikai */ it('testUtilCallbackWrapper003', 0, async function () { async function promiseFn() { @@ -434,7 +417,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilCallbackWrapper004 * @tc.desc: Takes an async function (or a function that returns a Promise) and returns a function following the error-first callback style. - * @tc.author: shikai */ it('testUtilCallbackWrapper004', 0, async function () { async function promiseFn() { @@ -454,7 +436,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilCallbackWrapper005 * @tc.desc: Takes an async function (or a function that returns a Promise) and returns a function following the error-first callback style. - * @tc.author: shikai */ it('testUtilCallbackWrapper005', 0, async function () { async function promiseFn(a, b) { @@ -473,7 +454,6 @@ describe('TextEncoderTest', function () { * @tc.name: testUtilCallbackWrapper006 * @tc.desc: Takes an async function (or a function that returns a Promise) and returns a function following the error-first callback style. - * @tc.author: shikai */ it('testUtilCallbackWrapper006', 0, async function () { async function promiseFn(){ @@ -492,7 +472,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testencoding_textdecoder_001 * @tc.desc: The source encoding's name, lowercased. - * @tc.author: wangben */ it('testencoding_textdecoder_001', 0, function () { var that = new util.TextDecoder('utf-8', { ignoreBOM : true }) @@ -503,7 +482,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testencoding_textdecoder_002 * @tc.desc: The source encoding's name, lowercased. - * @tc.author: wangben */ it('testencoding_textdecoder_002', 0, function () { var that = new util.TextDecoder('utf-16le') @@ -514,7 +492,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testencoding_textdecoder_003 * @tc.desc: The source encoding's name, lowercased. - * @tc.author: wangben */ it('testencoding_textdecoder_003', 0, function () { var that = new util.TextDecoder('utf-16be') @@ -525,7 +502,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testencoding_textdecoder_004 * @tc.desc: The source encoding's name, lowercased. - * @tc.author: wangben */ it('testencoding_textdecoder_004', 0, function () { var that = new util.TextDecoder('utf-16be', { ignoreBOM : true }) @@ -536,7 +512,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testencoding_textdecoder_005 * @tc.desc: The source encoding's name, lowercased. - * @tc.author: wangben */ it('testencoding_textdecoder_005', 0, function () { var that = new util.TextDecoder('utf-16be', { ignoreBOM : false }) @@ -548,7 +523,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testFatal001 * @tc.desc: Returns `true` if error mode is "fatal", and `false` otherwise. - * @tc.author: wangben */ it('testFatal001', 0, function () { var that = new util.TextDecoder('utf-16be', { fatal : true }) @@ -559,7 +533,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testFatal002 * @tc.desc: Returns `true` if error mode is "fatal", and `false` otherwise. - * @tc.author: wangben */ it('testFatal002', 0, function () { var that = new util.TextDecoder('utf-16be', { fatal : false }) @@ -570,7 +543,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testFatal003 * @tc.desc: Returns `true` if error mode is "fatal", and `false` otherwise. - * @tc.author: wangben */ it('testFatal003', 0, function () { var that = new util.TextDecoder('utf-16be') @@ -581,7 +553,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testFatal004 * @tc.desc: Returns `true` if error mode is "fatal", and `false` otherwise. - * @tc.author: wangben */ it('testFatal004', 0, function () { var that = new util.TextDecoder('utf-8') @@ -592,7 +563,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testFatal005 * @tc.desc: Returns `true` if error mode is "fatal", and `false` otherwise. - * @tc.author: wangben */ it('testFatal005', 0, function () { var that = new util.TextDecoder('utf-16le') @@ -603,7 +573,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testFatal006 * @tc.desc: Returns `true` if error mode is "fatal", and `false` otherwise. - * @tc.author: wangben */ it('testFatal006', 0, function () { var that = new util.TextDecoder('gbk') @@ -614,7 +583,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testFatal007 * @tc.desc: Returns `true` if error mode is "fatal", and `false` otherwise. - * @tc.author: wangben */ it('testFatal007', 0, function () { var that = new util.TextDecoder('gb18030') @@ -625,7 +593,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testFatal008 * @tc.desc: Returns `true` if error mode is "fatal", and `false` otherwise. - * @tc.author: wangben */ it('testFatal008', 0, function () { var that = new util.TextDecoder('gb2312') @@ -636,7 +603,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testIgnoreBOM001 * @tc.desc: Returns `true` if ignore BOM flag is set, and `false` otherwise. - * @tc.author: wangben */ it('testIgnoreBOM001', 0, function () { var that = new util.TextDecoder('utf-16be', { ignoreBOM : true }) @@ -647,7 +613,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testIgnoreBOM002 * @tc.desc: Returns `true` if ignore BOM flag is set, and `false` otherwise. - * @tc.author: wangben */ it('testIgnoreBOM002', 0, function () { var that = new util.TextDecoder('utf-16be', { ignoreBOM : false }) @@ -658,7 +623,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testIgnoreBOM003 * @tc.desc: Returns `true` if ignore BOM flag is set, and `false` otherwise. - * @tc.author: wangben */ it('testIgnoreBOM003', 0, function () { var that = new util.TextDecoder('utf-16be') @@ -669,7 +633,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testIgnoreBOM004 * @tc.desc: Returns `true` if ignore BOM flag is set, and `false` otherwise. - * @tc.author: wangben */ it('testIgnoreBOM004', 0, function () { var that = new util.TextDecoder('utf-8') @@ -680,7 +643,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testIgnoreBOM005 * @tc.desc: Returns `true` if ignore BOM flag is set, and `false` otherwise. - * @tc.author: wangben */ it('testIgnoreBOM005', 0, function () { var that = new util.TextDecoder('utf-16le') @@ -691,7 +653,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testIgnoreBOM006 * @tc.desc: Returns `true` if ignore BOM flag is set, and `false` otherwise. - * @tc.author: wangben */ it('testIgnoreBOM006', 0, function () { var that = new util.TextDecoder('gbk') @@ -702,7 +663,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testIgnoreBOM007 * @tc.desc: Returns `true` if ignore BOM flag is set, and `false` otherwise. - * @tc.author: wangben */ it('testIgnoreBOM007', 0, function () { var that = new util.TextDecoder('gb18030') @@ -713,7 +673,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testIgnoreBOM008 * @tc.desc: Returns `true` if ignore BOM flag is set, and `false` otherwise. - * @tc.author: wangben */ it('testIgnoreBOM008', 0, function () { var that = new util.TextDecoder('gb2312') @@ -724,7 +683,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testdecode_testdecode_001 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('testdecode_testdecode_001', 0, function () { var that = new util.TextDecoder('utf-8'); @@ -740,7 +698,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testdecode_testdecode_002 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('testdecode_testdecode_002', 0, function () { var that = new util.TextDecoder('utf-16le') @@ -759,7 +716,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testdecode_testdecode_003 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('testdecode_testdecode_003', 0, function () { var that = new util.TextDecoder('utf-16be'); @@ -778,7 +734,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testdecode_testdecode_004 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('testdecode_testdecode_004', 0, function () { var that = new util.TextDecoder('utf-8', { ignoreBOM : true }) @@ -799,7 +754,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testdecode_testdecode_005 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('testdecode_testdecode_005', 0, function () { var that = new util.TextDecoder('utf-16le', { ignoreBOM : false }) @@ -822,7 +776,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testdecode_testdecode_006 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('testdecode_testdecode_006', 0, function () { var that = new util.TextDecoder('gbk') @@ -843,7 +796,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testdecode_testdecode_007 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('testdecode_testdecode_007', 0, function () { var that = new util.TextDecoder('gb18030') @@ -864,7 +816,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testdecode_testdecode_008 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('testdecode_testdecode_008', 0, function () { var that = new util.TextDecoder('gb2312') @@ -885,7 +836,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: decodeWithStream001 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('decodeWithStream001', 0, function () { var that = new util.TextDecoder('utf-16le', { ignoreBOM : false }); @@ -908,7 +858,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: decodeWithStream002 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('decodeWithStream002', 0, function () { var that = new util.TextDecoder('utf-8', { ignoreBOM : true }) @@ -929,7 +878,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: decodeWithStream003 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('decodeWithStream003', 0, function () { var that = new util.TextDecoder('utf-16be'); @@ -948,7 +896,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: decodeWithStream004 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('decodeWithStream004', 0, function () { var that = new util.TextDecoder('utf-16le') @@ -967,7 +914,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: decodeWithStream005 * @tc.desc: Returns the result of running encoding's decoder. - * @tc.author: wangben */ it('decodeWithStream005', 0, function () { var that = new util.TextDecoder('utf-8'); @@ -983,7 +929,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testencoding_textencoder_001 * @tc.desc: Encoding format. - * @tc.author: wangben */ it('testencoding_textencoder_001', 0, function () { var that = new util.TextEncoder() @@ -994,7 +939,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testencoding_textencoder_002 * @tc.desc: Encoding format test gb18030. - * @tc.author: wangben */ it('testencoding_textencoder_002', 0, function () { let that = new util.TextEncoder('gb18030') @@ -1008,7 +952,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testencoding_textencoder_003 * @tc.desc: Encoding format test gbk. - * @tc.author: wangben */ it('testencoding_textencoder_003', 0, function () { let that = new util.TextEncoder('gbk') @@ -1022,7 +965,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testencoding_textencoder_004 * @tc.desc: Encoding format test gb2313. - * @tc.author: wangben */ it('testencoding_textencoder_004', 0, function () { let that = new util.TextEncoder('gb2312') @@ -1036,7 +978,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode001 * @tc.desc: Returns the result of encoder. - * @tc.author: wangben */ it('testEncode001', 0, function () { var that = new util.TextEncoder() @@ -1049,7 +990,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode002 * @tc.desc: Returns the result of encoder. - * @tc.author: wangben */ it('testEncode002', 0, function () { var that = new util.TextEncoder() @@ -1062,7 +1002,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode003 * @tc.desc: Returns the result of encoder. - * @tc.author: wangben */ it('testEncode003', 0, function () { var that = new util.TextEncoder() @@ -1075,7 +1014,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode004 * @tc.desc: Returns the result of encoder. - * @tc.author: wangben */ it('testEncode004', 0, function () { var that = new util.TextEncoder() @@ -1088,7 +1026,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode005 * @tc.desc: Returns the result of encoder. - * @tc.author: wangben */ it('testEncode005', 0, function () { var that = new util.TextEncoder() @@ -1102,7 +1039,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode006 * @tc.desc: Returns the result of encoder. - * @tc.author: wangben */ it('testEncode006', 0, function () { var that = new util.TextEncoder() @@ -1115,7 +1051,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode007 * @tc.desc: Returns the result of encoder. - * @tc.author: wangben */ it('testEncode007', 0, function () { var that = new util.TextEncoder() @@ -1128,7 +1063,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode008 * @tc.desc: Returns the result of encoder. - * @tc.author: wangben */ it('testEncode008', 0, function () { var that = new util.TextEncoder() @@ -1141,7 +1075,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode009 * @tc.desc: Returns the result of encoder for gb18030. - * @tc.author: wangben */ it('testEncode009', 0, function () { let that = new util.TextEncoder('gb18030') @@ -1158,7 +1091,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode010 * @tc.desc: Returns the result of encoder for GB18030. - * @tc.author: wangben */ it('testEncode0010', 0, function () { let that = new util.TextEncoder('GB18030') @@ -1175,7 +1107,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode011 * @tc.desc: Returns the result of encoder for GB18030. - * @tc.author: wangben */ it('testEncode0011', 0, function () { let that = new util.TextEncoder('GBK') @@ -1192,7 +1123,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode012 * @tc.desc: Returns the result of encoder for gbk. - * @tc.author: wangben */ it('testEncode012', 0, function () { let that = new util.TextEncoder('gbk') @@ -1209,7 +1139,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode013 * @tc.desc: Returns the result of encoder for gb2312. - * @tc.author: wangben */ it('testEncode013', 0, function () { let that = new util.TextEncoder('gb2312') @@ -1226,7 +1155,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode014 * @tc.desc: Returns the result of encoder for gb2312. - * @tc.author: wangben */ it('testEncode014', 0, function () { let that = new util.TextEncoder('GB2312') @@ -1243,7 +1171,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncode015 * @tc.desc: Returns the result of encoder for gb2312, input long string. - * @tc.author: wangben */ it('testEncode015', 0, function () { let that = new util.TextEncoder('GB18030') @@ -1260,7 +1187,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncodeInto001 * @tc.desc: encode string, write the result to dest array. - * @tc.author: wangben */ it('testEncodeInto001', 0, function () { var that = new util.TextEncoder() @@ -1275,7 +1201,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncodeInto002 * @tc.desc: encode string, write the result to dest array. - * @tc.author: wangben */ it('testEncodeInto002', 0, function () { var that = new util.TextEncoder() @@ -1290,7 +1215,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncodeInto003 * @tc.desc: encode string, write the result to dest array. - * @tc.author: wangben */ it('testEncodeInto003', 0, function () { var that = new util.TextEncoder() @@ -1305,7 +1229,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncodeInto004 * @tc.desc: encode string, write the result to dest array. - * @tc.author: wangben */ it('testEncodeInto004', 0, function () { var that = new util.TextEncoder() @@ -1320,7 +1243,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncodeInto005 * @tc.desc: encode string, write the result to dest array. - * @tc.author: wangben */ it('testEncodeInto005', 0, function () { var that = new util.TextEncoder() @@ -1335,7 +1257,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncodeInto006 * @tc.desc: encode string, write the result to dest array. - * @tc.author: wangben */ it('testEncodeInto006', 0, function () { var that = new util.TextEncoder() @@ -1350,7 +1271,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncodeInto007 * @tc.desc: encode string, write the result to dest array. - * @tc.author: wangben */ it('testEncodeInto007', 0, function () { var that = new util.TextEncoder() @@ -1365,7 +1285,6 @@ describe('TextEncoderTest', function () { /** * @tc.name: testEncodeInto008 * @tc.desc: encode string, write the result to dest array. - * @tc.author: wangben */ it('testEncodeInto008', 0, function () { var that = new util.TextEncoder() @@ -1383,7 +1302,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_getLower_001 * @tc.desc: Obtains the lower bound of the current range. - * @tc.author: jiangkai */ it('test_getLower_001', 0, function () { var result = range.getLower() @@ -1393,7 +1311,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_getLower_002 * @tc.desc: Obtains the lower bound of the current range. - * @tc.author: jiangkai */ it('test_getLower_002', 0, function () { var result = rangeFir.getLower() @@ -1403,7 +1320,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_getLower_003 * @tc.desc: Obtains the lower bound of the current range. - * @tc.author: jiangkai */ it('test_getLower_003', 0, function () { var result = rangeSec.getLower() @@ -1413,7 +1329,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_getLower_004 * @tc.desc: Obtains the lower bound of the current range. - * @tc.author: jiangkai */ it('test_getLower_004', 0, function () { var result = rangeThi.getLower() @@ -1423,7 +1338,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_getLower_005 * @tc.desc: Obtains the lower bound of the current range. - * @tc.author: jiangkai */ it('test_getLower_005', 0, function () { var result = rangeFif.getLower() @@ -1433,7 +1347,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_getUpper_001 * @tc.desc: Obtains the upper bound of the current range. - * @tc.author: jiangkai */ it('test_getUpper_001', 0, function () { var result = range.getUpper() @@ -1443,7 +1356,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_getUpper_002 * @tc.desc: Obtains the upper bound of the current range. - * @tc.author: jiangkai */ it('test_getUpper_002', 0, function () { var result = rangeFir.getUpper() @@ -1453,7 +1365,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_getUpper_003 * @tc.desc: Obtains the upper bound of the current range. - * @tc.author: jiangkai */ it('test_getUpper_003', 0, function () { var result = rangeSec.getUpper() @@ -1463,7 +1374,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_getUpper_004 * @tc.desc: Obtains the upper bound of the current range. - * @tc.author: jiangkai */ it('test_getUpper_004', 0, function () { var result = rangeThi.getUpper() @@ -1473,7 +1383,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_getUpper_005 * @tc.desc: Obtains the upper bound of the current range. - * @tc.author: jiangkai */ it('test_getUpper_005', 0, function () { var result = rangeFif.getUpper() @@ -1483,7 +1392,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_clamp_001 * @tc.desc: Clamps a given value to the current range. - * @tc.author: jiangkai */ it('test_clamp_001', 0, function () { var result =range.clamp(tempLess) @@ -1493,7 +1401,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_clamp_002 * @tc.desc: Clamps a given value to the current range. - * @tc.author: jiangkai */ it('test_clamp_002', 0, function () { var result =range.clamp(tempMiDF) @@ -1503,7 +1410,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_clamp_003 * @tc.desc: Clamps a given value to the current range. - * @tc.author: jiangkai */ it('test_clamp_003', 0, function () { var result =range.clamp(tempMore) @@ -1513,7 +1419,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_clamp_004 * @tc.desc: Clamps a given value to the current range. - * @tc.author: jiangkai */ it('test_clamp_004', 0, function () { var result =range.clamp(tempLower) @@ -1523,7 +1428,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_clamp_005 * @tc.desc: Clamps a given value to the current range. - * @tc.author: jiangkai */ it('test_clamp_005', 0, function () { var result =range.clamp(tempUpper) @@ -1533,7 +1437,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_contains_001 * @tc.desc: Checks whether a given value is within the current range. - * @tc.author: jiangkai */ it('test_contains_001', 0, function () { var result = range.contains(tempLess) @@ -1543,7 +1446,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_contains_002 * @tc.desc: Checks whether a given value is within the current range. - * @tc.author: jiangkai */ it('test_contains_002', 0, function () { var result = range.contains(tempMiDF) @@ -1553,7 +1455,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_contains_003 * @tc.desc: Checks whether a given value is within the current range. - * @tc.author: jiangkai */ it('test_contains_003', 0, function () { var result = range.contains(tempMore) @@ -1563,7 +1464,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_contains_004 * @tc.desc: Checks whether a given value is within the current range. - * @tc.author: jiangkai */ it('test_contains_004', 0, function () { var result = range.contains(tempLower) @@ -1573,7 +1473,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_contains_005 * @tc.desc: Checks whether a given value is within the current range. - * @tc.author: jiangkai */ it('test_contains_005', 0, function () { var result = range.contains(tempUpper) @@ -1583,7 +1482,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_contains_006 * @tc.desc: Checks whether a given range is within the current range. - * @tc.author: jiangkai */ it('test_contains_006', 0, function () { var result = range.contains(rangeFir) @@ -1593,7 +1491,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_contains_007 * @tc.desc: Checks whether a given range is within the current range. - * @tc.author: jiangkai */ it('test_contains_007', 0, function () { var result = range.contains(rangeSec) @@ -1603,7 +1500,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_contains_008 * @tc.desc: Checks whether a given range is within the current range. - * @tc.author: jiangkai */ it('test_contains_008', 0, function () { var result = range.contains(rangeThi) @@ -1613,7 +1509,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_contains_009 * @tc.desc: Checks whether a given range is within the current range. - * @tc.author: jiangkai */ it('test_contains_009', 0, function () { var result = range.contains(rangeFif) @@ -1623,7 +1518,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_contains_010 * @tc.desc: Checks whether a given range is within the current range. - * @tc.author: jiangkai */ it('test_contains_010', 0, function () { var result = range.contains(range) @@ -1633,7 +1527,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_001 * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. - * @tc.author: jiangkai */ it('test_expand_001', 0, function () { var result = range.expand(tempMiDF, tempMidS) @@ -1643,7 +1536,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_002 * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. - * @tc.author: jiangkai */ it('test_expand_002', 0, function () { var result = range.expand(tempLess, tempMore) @@ -1653,7 +1545,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_003 * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. - * @tc.author: jiangkai */ it('test_expand_003', 0, function () { var result = range.expand(tempLess, tempMiDF) @@ -1663,7 +1554,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_004 * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. - * @tc.author: jiangkai */ it('test_expand_004', 0, function () { var result = range.expand(tempMiDF, tempMore) @@ -1673,7 +1563,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_005 * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. - * @tc.author: jiangkai */ it('test_expand_005', 0, function () { var result = range.expand(tempLower, tempUpper) @@ -1683,7 +1572,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_006 * @tc.desc: Creates the smallest range that includes the current range and a given range. - * @tc.author: jiangkai */ it('test_expand_006', 0, function () { var result = range.expand(rangeFir) @@ -1693,7 +1581,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_007 * @tc.desc: Creates the smallest range that includes the current range and a given range. - * @tc.author: jiangkai */ it('test_expand_007', 0, function () { var result = range.expand(rangeSec) @@ -1703,7 +1590,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_008 * @tc.desc: Creates the smallest range that includes the current range and a given range. - * @tc.author: jiangkai */ it('test_expand_008', 0, function () { var result = range.expand(rangeThi) @@ -1713,7 +1599,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_009 * @tc.desc: Creates the smallest range that includes the current range and a given range. - * @tc.author: jiangkai */ it('test_expand_009', 0, function () { var result = range.expand(rangeFif) @@ -1723,7 +1608,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_010 * @tc.desc: Creates the smallest range that includes the current range and a given range. - * @tc.author: jiangkai */ it('test_expand_010', 0, function () { var result = range.expand(range) @@ -1733,7 +1617,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_011 * @tc.desc: Creates the smallest range that includes the current range and a given value. - * @tc.author: jiangkai */ it('test_expand_011', 0, function () { var result = range.expand(tempMiDF) @@ -1743,7 +1626,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_012 * @tc.desc: Creates the smallest range that includes the current range and a given value. - * @tc.author: jiangkai */ it('test_expand_012', 0, function () { var result = range.expand(tempLess) @@ -1753,7 +1635,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_013 * @tc.desc: Creates the smallest range that includes the current range and a given value. - * @tc.author: jiangkai */ it('test_expand_013', 0, function () { var result = range.expand(tempMore) @@ -1763,7 +1644,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_014 * @tc.desc: Creates the smallest range that includes the current range and a given value. - * @tc.author: jiangkai */ it('test_expand_014', 0, function () { var result = range.expand(tempLower) @@ -1773,7 +1653,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_expand_015 * @tc.desc: Creates the smallest range that includes the current range and a given value. - * @tc.author: jiangkai */ it('test_expand_015', 0, function () { var result = range.expand(tempUpper) @@ -1783,7 +1662,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_intersect_001 * @tc.desc: Returns the intersection of a given range and the current range. - * @tc.author: jiangkai */ it('test_intersect_001', 0, function () { var result = range.intersect(rangeFir) @@ -1793,7 +1671,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_intersect_002 * @tc.desc: Returns the intersection of a given range and the current range. - * @tc.author: jiangkai */ it('test_intersect_002', 0, function () { var result = range.intersect(rangeSec) @@ -1803,7 +1680,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_intersect_003 * @tc.desc: Returns the intersection of a given range and the current range. - * @tc.author: jiangkai */ it('test_intersect_003', 0, function () { var result = range.intersect(rangeThi) @@ -1813,7 +1689,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_intersect_004 * @tc.desc: Returns the intersection of a given range and the current range. - * @tc.author: jiangkai */ it('test_intersect_004', 0, function () { var result = range.intersect(rangeFif) @@ -1823,7 +1698,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_intersect_005 * @tc.desc: Returns the intersection of a given range and the current range. - * @tc.author: jiangkai */ it('test_intersect_005', 0, function () { var result = range.intersect(range) @@ -1834,7 +1708,6 @@ describe('ScopeTest', function () { * @tc.name: test_intersect_006 * @tc.desc: Returns the intersection of the current range and the range specified by the given lower and upper bounds. - * @tc.author: jiangkai */ it('test_intersect_006', 0, function () { var result = range.intersect(tempMiDF, tempMidS) @@ -1845,7 +1718,6 @@ describe('ScopeTest', function () { * @tc.name: test_intersect_007 * @tc.desc: Returns the intersection of the current range and the range specified by the given lower and upper bounds. - * @tc.author: jiangkai */ it('test_intersect_007', 0, function () { var result = range.intersect(tempLess, tempMore) @@ -1856,7 +1728,6 @@ describe('ScopeTest', function () { * @tc.name: test_intersect_008 * @tc.desc: Returns the intersection of the current range and the range specified by the given lower and upper bounds. - * @tc.author: jiangkai */ it('test_intersect_008', 0, function () { var result = range.intersect(tempLess, tempMiDF) @@ -1867,7 +1738,6 @@ describe('ScopeTest', function () { * @tc.name: test_intersect_009 * @tc.desc: Returns the intersection of the current range and the range specified by the given lower and upper bounds. - * @tc.author: jiangkai */ it('test_intersect_009', 0, function () { var result = range.intersect(tempMiDF, tempMore) @@ -1878,7 +1748,6 @@ describe('ScopeTest', function () { * @tc.name: test_intersect_010 * @tc.desc: Returns the intersection of the current range and the range specified by the given lower and upper bounds. - * @tc.author: jiangkai */ it('test_intersect_010', 0, function () { var result = range.intersect(tempLower, tempUpper) @@ -1888,7 +1757,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_toString_001 * @tc.desc: Obtains a string representation of the current range. - * @tc.author: jiangkai */ it('test_toString_001', 0, function () { var result = range.toString() @@ -1898,7 +1766,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_toString_002 * @tc.desc: Obtains a string representation of the current range. - * @tc.author: jiangkai */ it('test_toString_002', 0, function () { var result = rangeFir.toString() @@ -1908,7 +1775,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_toString_003 * @tc.desc: Obtains a string representation of the current range. - * @tc.author: jiangkai */ it('test_toString_003', 0, function () { var result = rangeSec.toString() @@ -1918,7 +1784,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_toString_004 * @tc.desc: Obtains a string representation of the current range. - * @tc.author: jiangkai */ it('test_toString_004', 0, function () { var result = rangeThi.toString() @@ -1928,7 +1793,6 @@ describe('ScopeTest', function () { /** * @tc.name: test_toString_005 * @tc.desc: Obtains a string representation of the current range. - * @tc.author: jiangkai */ it('test_toString_005', 0, function () { var result = rangeFif.toString() @@ -1942,7 +1806,6 @@ describe('Base64Test', function () { * @tc.name: test_encodeSync_base64_001 * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeSync_base64_001', 0, function () { var that = new util.Base64() @@ -1958,7 +1821,6 @@ describe('Base64Test', function () { * @tc.name: test_encodeSync_base64_002 * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeSync_base64_002', 0, function () { var that = new util.Base64() @@ -1974,7 +1836,6 @@ describe('Base64Test', function () { * @tc.name: test_encodeSync_base64_003 * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeSync_base64_003', 0, function () { var that = new util.Base64() @@ -1992,7 +1853,6 @@ describe('Base64Test', function () { * @tc.name: test_encodeSync_base64_004 * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeSync_base64_004', 0, function () { var that = new util.Base64() @@ -2008,7 +1868,6 @@ describe('Base64Test', function () { * @tc.name: test_encodeSync_base64_005 * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeSync_base64_005', 0, function () { var that = new util.Base64() @@ -2023,7 +1882,6 @@ describe('Base64Test', function () { /** * @tc.name: test_encodeToStringSync_base64_001 * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeToStringSync_base64_001', 0, function () { var that = new util.Base64() @@ -2035,7 +1893,6 @@ describe('Base64Test', function () { /** * @tc.name: test_encodeToStringSync_base64_002 * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeToStringSync_base64_002', 0, function () { var that = new util.Base64() @@ -2047,7 +1904,6 @@ describe('Base64Test', function () { /** * @tc.name: test_encodeToStringSync_base64_003 * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeToStringSync_base64_003', 0, function () { var that = new util.Base64() @@ -2060,7 +1916,6 @@ describe('Base64Test', function () { /** * @tc.name: test_encodeToStringSync_base64_004 * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeToStringSync_base64_004', 0, function () { var that = new util.Base64() @@ -2072,7 +1927,6 @@ describe('Base64Test', function () { /** * @tc.name: test_encodeToStringSync_base64_005 * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeToStringSync_base64_005', 0, function () { var that = new util.Base64() @@ -2085,7 +1939,6 @@ describe('Base64Test', function () { * @tc.name: test_decodeSync_base64_001 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_decodeSync_base64_001', 0, function () { var that = new util.Base64() @@ -2101,7 +1954,6 @@ describe('Base64Test', function () { * @tc.name: test_decodeSync_base64_002 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_decodeSync_base64_002', 0, function () { var that = new util.Base64() @@ -2117,7 +1969,6 @@ describe('Base64Test', function () { * @tc.name: test_decodeSync_base64_003 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_decodeSync_base64_003', 0, function () { var that = new util.Base64() @@ -2134,7 +1985,6 @@ describe('Base64Test', function () { * @tc.name: test_decodeSync_base64_004 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_decodeSync_base64_004', 0, function () { var that = new util.Base64() @@ -2150,7 +2000,6 @@ describe('Base64Test', function () { * @tc.name: test_decodeSync_base64_005 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_decodeSync_base64_005', 0, function () { var that = new util.Base64() @@ -2166,7 +2015,6 @@ describe('Base64Test', function () { * @tc.name: test_decodeSync_base64_006 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_decodeSync_base64_006', 0, function () { var that = new util.Base64() @@ -2182,7 +2030,6 @@ describe('Base64Test', function () { * @tc.name: test_decodeSync_base64_007 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_decodeSync_base64_007', 0, function () { var that = new util.Base64() @@ -2198,7 +2045,6 @@ describe('Base64Test', function () { * @tc.name: test_decodeSync_base64_008 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_decodeSync_base64_008', 0, function () { var that = new util.Base64() @@ -2216,7 +2062,6 @@ describe('Base64Test', function () { * @tc.name: test_decodeSync_base64_009 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_decodeSync_base64_009', 0, function () { var that = new util.Base64() @@ -2232,7 +2077,6 @@ describe('Base64Test', function () { * @tc.name: test_decodeSync_base64_010 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_decodeSync_base64_010', 0, function () { var that = new util.Base64() @@ -2249,7 +2093,6 @@ describe('Base64Test', function () { * @tc.name: test_encodeSync_base64_001 * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeSync_base64_001', 0, async function () { var that = await new util.Base64(); @@ -2266,7 +2109,6 @@ describe('Base64Test', function () { * @tc.name: test_encodeSync_base64_002 * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeSync_base64_002', 0, async function () { var that = new util.Base64() @@ -2283,7 +2125,6 @@ describe('Base64Test', function () { * @tc.name: test_encodeSync_base64_003 * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeSync_base64_003', 0, async function () { var that = new util.Base64() @@ -2302,7 +2143,6 @@ describe('Base64Test', function () { * @tc.name: test_encodeSync_base64_004 * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeSync_base64_004', 0, async function () { var that = new util.Base64() @@ -2319,7 +2159,6 @@ describe('Base64Test', function () { * @tc.name: test_encodeSync_base64_005 * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeSync_base64_005', 0, async function () { var that = new util.Base64() @@ -2335,7 +2174,6 @@ describe('Base64Test', function () { /** * @tc.name: test_encodeToString_base64_001 * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeToString_base64_001', 0, async function () { var that = new util.Base64() @@ -2348,7 +2186,6 @@ describe('Base64Test', function () { /** * @tc.name: test_encodeToString_base64_002 * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeToString_base64_002', 0, async function () { var that = new util.Base64() @@ -2361,7 +2198,6 @@ describe('Base64Test', function () { /** * @tc.name: test_encodeToString_base64_003 * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeToString_base64_003', 0, async function () { var that = new util.Base64() @@ -2375,7 +2211,6 @@ describe('Base64Test', function () { /** * @tc.name: test_encodeToString_base64_004 * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeToString_base64_004', 0, async function () { var that = new util.Base64() @@ -2388,7 +2223,6 @@ describe('Base64Test', function () { /** * @tc.name: test_encodeToString_base64_005 * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. - * @tc.author: bihu */ it('test_encodeToString_base64_005', 0, async function () { var that = new util.Base64() @@ -2402,7 +2236,6 @@ describe('Base64Test', function () { * @tc.name: test_decode_base64_001 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. - * @tc.author: bihu */ it('test_decode_base64_001', 0, async function () { var that = new util.Base64() @@ -2419,7 +2252,6 @@ describe('Base64Test', function () { * @tc.name: test_decode_base64_002 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. - * @tc.author: bihu */ it('test_decode_base64_002', 0, async function () { var that = new util.Base64() @@ -2436,7 +2268,6 @@ describe('Base64Test', function () { * @tc.name: test_decode_base64_003 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. - * @tc.author: bihu */ it('test_decode_base64_003', 0, async function () { var that = new util.Base64() @@ -2454,7 +2285,6 @@ describe('Base64Test', function () { * @tc.name: test_decode_base64_004 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. - * @tc.author: bihu */ it('test_decode_base64_004', 0, async function () { var that = new util.Base64() @@ -2471,7 +2301,6 @@ describe('Base64Test', function () { * @tc.name: test_decode_base64_005 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. - * @tc.author: bihu */ it('test_decode_base64_005', 0, async function () { var that = new util.Base64() @@ -2488,7 +2317,6 @@ describe('Base64Test', function () { * @tc.name: test_decode_base64_006 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. - * @tc.author: bihu */ it('test_decode_base64_006', 0, async function () { var that = new util.Base64() @@ -2505,7 +2333,6 @@ describe('Base64Test', function () { * @tc.name: test_decode_base64_007 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. - * @tc.author: bihu */ it('test_decode_base64_007', 0, async function () { var that = new util.Base64() @@ -2522,7 +2349,6 @@ describe('Base64Test', function () { * @tc.name: test_decode_base64_008 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. - * @tc.author: bihu */ it('test_decode_base64_008', 0, async function () { var that = new util.Base64() @@ -2541,7 +2367,6 @@ describe('Base64Test', function () { * @tc.name: test_decode_base64_009 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. - * @tc.author: bihu */ it('test_decode_base64_009', 0, async function () { var that = new util.Base64() @@ -2558,7 +2383,6 @@ describe('Base64Test', function () { * @tc.name: test_decode_base64_010 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. - * @tc.author: bihu */ it('test_decode_base64_010', 0, async function () { var that = new util.Base64() @@ -2577,7 +2401,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_createRationalFromString_001 * @tc.desc: Creates a RationalNumber object based on a given string. - * @tc.author: liuqiang */ it('test_createRationalFromString_001', 0, function () { var pro = new util.RationalNumber(1, 2) @@ -2589,7 +2412,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_createRationalFromString_002 * @tc.desc: Creates a RationalNumber object based on a given string. - * @tc.author: liuqiang */ it('test_createRationalFromString_002', 0, function () { var pro = new util.RationalNumber(1, 2) @@ -2601,7 +2423,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_createRationalFromString_003 * @tc.desc: Creates a RationalNumber object based on a given string. - * @tc.author: liuqiang */ it('test_createRationalFromString_003', 0, function () { var pro = new util.RationalNumber(1, 2) @@ -2613,7 +2434,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_createRationalFromString_004 * @tc.desc: Creates a RationalNumber object based on a given string. - * @tc.author: liuqiang */ it('test_createRationalFromString_004', 0, function () { var pro = new util.RationalNumber(1, 2) @@ -2625,7 +2445,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_createRationalFromString_005 * @tc.desc: Creates a RationalNumber object based on a given string. - * @tc.author: liuqiang */ it('test_createRationalFromString_005', 0, function () { var pro = new util.RationalNumber(1, 2) @@ -2637,7 +2456,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_compareTo_001 * @tc.desc: Compares the current RationalNumber object with a given object. - * @tc.author: liuqiang */ it('test_compareTo_001', 0, function () { var pro = new util.RationalNumber(2, 1) @@ -2649,7 +2467,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_compareTo_002 * @tc.desc: Compares the current RationalNumber object with a given object. - * @tc.author: liuqiang */ it('test_compareTo_002', 0, function () { var pro = new util.RationalNumber(2, 1) @@ -2661,7 +2478,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_compareTo_003 * @tc.desc: Compares the current RationalNumber object with a given object. - * @tc.author: liuqiang */ it('test_compareTo_003', 0, function () { var pro = new util.RationalNumber(2, 1) @@ -2673,7 +2489,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_compareTo_004 * @tc.desc: Compares the current RationalNumber object with a given object. - * @tc.author: liuqiang */ it('test_compareTo_004', 0, function () { var pro = new util.RationalNumber(2, 1) @@ -2685,7 +2500,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_compareTo_005 * @tc.desc: Compares the current RationalNumber object with a given object. - * @tc.author: liuqiang */ it('test_compareTo_005', 0, function () { var pro = new util.RationalNumber(0, 0) @@ -2697,7 +2511,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_equals_001 * @tc.desc: Checks whether a given object is the same as the current RationalNumber object. - * @tc.author: liuqiang */ it('test_equals_001', 0, function () { var pro = new util.RationalNumber(2, 1) @@ -2709,7 +2522,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_equals_002 * @tc.desc: Checks whether a given object is the same as the current RationalNumber object. - * @tc.author: liuqiang */ it('test_equals_002', 0, function () { var pro = new util.RationalNumber(2, 1) @@ -2721,7 +2533,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_equals_003 * @tc.desc: Checks whether a given object is the same as the current RationalNumber object. - * @tc.author: liuqiang */ it('test_equals_003', 0, function () { var pro = new util.RationalNumber(0, 1) @@ -2733,7 +2544,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_equals_004 * @tc.desc: Checks whether a given object is the same as the current RationalNumber object. - * @tc.author: liuqiang */ it('test_equals_004', 0, function () { var pro = new util.RationalNumber(0, 0) @@ -2745,7 +2555,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: test_equals_005 * @tc.desc: Checks whether a given object is the same as the current RationalNumber object. - * @tc.author: liuqiang */ it('test_equals_005', 0, function () { var pro = new util.RationalNumber(-2, 0) @@ -2757,7 +2566,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testRationalNumberValueOf001 * @tc.desc: Obtains the value of the current RationalNumber object as a number. - * @tc.author: liuqiang */ it('testRationalNumberValueOf001', 0, function () { var pro = new util.RationalNumber(2, 1) @@ -2768,7 +2576,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testRationalNumberValueOf002 * @tc.desc: Obtains the value of the current RationalNumber object as a number. - * @tc.author: liuqiang */ it('testRationalNumberValueOf002', 0, function () { var pro = new util.RationalNumber(2, 10) @@ -2779,7 +2586,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testRationalNumberValueOf003 * @tc.desc: Obtains the value of the current RationalNumber object as a number. - * @tc.author: liuqiang */ it('testRationalNumberValueOf003', 0, function () { var pro = new util.RationalNumber(1, 2) @@ -2790,7 +2596,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testRationalNumberValueOf004 * @tc.desc: Obtains the value of the current RationalNumber object as a number. - * @tc.author: liuqiang */ it('testRationalNumberValueOf004', 0, function () { var pro = new util.RationalNumber(4, 2) @@ -2801,7 +2606,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testRationalNumberValueOf005 * @tc.desc: Obtains the value of the current RationalNumber object as a number. - * @tc.author: liuqiang */ it('testRationalNumberValueOf005', 0, function () { var pro = new util.RationalNumber(4, 1) @@ -2812,7 +2616,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetCommonDivisor001 * @tc.desc: Obtains the greatest common divisor of two specified numbers. - * @tc.author: liuqiang */ it('testGetCommonDivisor001', 0, function () { var pro = new util.RationalNumber(0, 0) @@ -2823,7 +2626,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetCommonDivisor002 * @tc.desc: Obtains the greatest common divisor of two specified numbers. - * @tc.author: liuqiang */ it('testGetCommonDivisor002', 0, function () { var pro = new util.RationalNumber(0, 0) @@ -2834,7 +2636,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetCommonDivisor003 * @tc.desc: Obtains the greatest common divisor of two specified numbers. - * @tc.author: liuqiang */ it('testGetCommonDivisor003', 0, function () { var pro = new util.RationalNumber(0, 0) @@ -2845,7 +2646,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetCommonDivisor004 * @tc.desc: Obtains the greatest common divisor of two specified numbers. - * @tc.author: liuqiang */ it('testGetCommonDivisor004', 0, function () { var pro = new util.RationalNumber(0, 0) @@ -2856,7 +2656,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetCommonDivisor005 * @tc.desc: Obtains the greatest common divisor of two specified numbers. - * @tc.author: liuqiang */ it('testGetCommonDivisor005', 0, function () { var pro = new util.RationalNumber(0, 0) @@ -2867,7 +2666,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetDenominator001 * @tc.desc: Obtains the denominator of the current RationalNumber object. - * @tc.author: liuqiang */ it('testGetDenominator001', 0, function () { var pro = new util.RationalNumber(2, 1) @@ -2878,7 +2676,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetDenominator002 * @tc.desc: Obtains the denominator of the current RationalNumber object. - * @tc.author: liuqiang */ it('testGetDenominator002', 0, function () { var pro = new util.RationalNumber(2, 3) @@ -2889,7 +2686,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetDenominator003 * @tc.desc: Obtains the denominator of the current RationalNumber object. - * @tc.author: liuqiang */ it('testGetDenominator003', 0, function () { var pro = new util.RationalNumber(2, 0) @@ -2900,7 +2696,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetDenominator004 * @tc.desc: Obtains the denominator of the current RationalNumber object. - * @tc.author: liuqiang */ it('testGetDenominator004', 0, function () { var pro = new util.RationalNumber(10, 5) @@ -2911,7 +2706,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetDenominator005 * @tc.desc: Obtains the denominator of the current RationalNumber object. - * @tc.author: liuqiang */ it('testGetDenominator005', 0, function () { var pro = new util.RationalNumber(6, 3) @@ -2922,7 +2716,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetDenominator006 * @tc.desc: Obtains the denominator of the current RationalNumber object. - * @tc.author: liuqiang */ it('testGetDenominator006', 0, function () { var pro = new util.RationalNumber(6, -3) @@ -2933,7 +2726,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetNumerator001 * @tc.desc: Obtains the numerator of the current RationalNumber object. - * @tc.author: liuqiang */ it('testGetNumerator001', 0, function () { var pro = new util.RationalNumber(-2, 1) @@ -2944,7 +2736,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetNumerator002 * @tc.desc: Obtains the numerator of the current RationalNumber object. - * @tc.author: liuqiang */ it('testGetNumerator002', 0, function () { var pro = new util.RationalNumber(0, 3) @@ -2955,7 +2746,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetNumerator003 * @tc.desc: Obtains the numerator of the current RationalNumber object. - * @tc.author: liuqiang */ it('testGetNumerator003', 0, function () { var pro = new util.RationalNumber(2, 4) @@ -2966,7 +2756,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetNumerator004 * @tc.desc: Obtains the numerator of the current RationalNumber object. - * @tc.author: liuqiang */ it('testGetNumerator004', 0, function () { var pro = new util.RationalNumber(3, 6) @@ -2977,7 +2766,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testGetNumerator005 * @tc.desc: Obtains the numerator of the current RationalNumber object. - * @tc.author: liuqiang */ it('testGetNumerator005', 0, function () { var pro = new util.RationalNumber(10, 5) @@ -2988,7 +2776,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisFinite001 * @tc.desc: Checks whether the current RationalNumber object represents a finite value. - * @tc.author: liuqiang */ it('testisFinite001', 0, function () { var pro = new util.RationalNumber(-2, 1) @@ -2999,7 +2786,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisFinite002 * @tc.desc: Checks whether the current RationalNumber object represents a finite value. - * @tc.author: liuqiang */ it('testisFinite002', 0, function () { var pro = new util.RationalNumber(0, 3) @@ -3010,7 +2796,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisFinite003 * @tc.desc: Checks whether the current RationalNumber object represents a finite value. - * @tc.author: liuqiang */ it('testisFinite003', 0, function () { var pro = new util.RationalNumber(2, 0) @@ -3021,7 +2806,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisFinite004 * @tc.desc: Checks whether the current RationalNumber object represents a finite value. - * @tc.author: liuqiang */ it('testisFinite004', 0, function () { var pro = new util.RationalNumber(1, 3) @@ -3032,7 +2816,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisFinite005 * @tc.desc: Checks whether the current RationalNumber object represents a finite value. - * @tc.author: liuqiang */ it('testisFinite005', 0, function () { var pro = new util.RationalNumber(10, 5) @@ -3043,7 +2826,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisNaN001 * @tc.desc: Checks whether the current RationalNumber object represents a finite value. - * @tc.author: liuqiang */ it('testisNaN001', 0, function () { var pro = new util.RationalNumber(-2, 1) @@ -3054,7 +2836,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisNaN002 * @tc.desc: Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value. - * @tc.author: liuqiang */ it('testisNaN002', 0, function () { var pro = new util.RationalNumber(0, 3) @@ -3065,7 +2846,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisNaN003 * @tc.desc: Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value. - * @tc.author: liuqiang */ it('testisNaN003', 0, function () { var pro = new util.RationalNumber(0, 0) @@ -3076,7 +2856,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisNaN004 * @tc.desc: Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value. - * @tc.author: liuqiang */ it('testisNaN004', 0, function () { var pro = new util.RationalNumber(10, 0) @@ -3087,7 +2866,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisNaN005 * @tc.desc: Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value. - * @tc.author: liuqiang */ it('testisNaN005', 0, function () { var pro = new util.RationalNumber(10, 1) @@ -3098,7 +2876,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisZero001 * @tc.desc: Checks whether the current RationalNumber object represents the value 0. - * @tc.author: liuqiang */ it('testisZero001', 0, function () { var pro = new util.RationalNumber(-2, 1) @@ -3109,7 +2886,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisZero002 * @tc.desc: Checks whether the current RationalNumber object represents the value 0. - * @tc.author: liuqiang */ it('testisZero002', 0, function () { var pro = new util.RationalNumber(0, 3) @@ -3120,7 +2896,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisZero003 * @tc.desc: Checks whether the current RationalNumber object represents the value 0. - * @tc.author: liuqiang */ it('testisZero003', 0, function () { var pro = new util.RationalNumber(0, 0) @@ -3131,7 +2906,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisZero004 * @tc.desc: Checks whether the current RationalNumber object represents the value 0. - * @tc.author: liuqiang */ it('testisZero004', 0, function () { var pro = new util.RationalNumber(10, 2) @@ -3142,7 +2916,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testisZero005 * @tc.desc: Checks whether the current RationalNumber object represents the value 0. - * @tc.author: liuqiang */ it('testisZero005', 0, function () { var pro = new util.RationalNumber(1, 1) @@ -3153,7 +2926,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testRationalNumberToString001 * @tc.desc: Obtains a string representation of the current RationalNumber object. - * @tc.author: liuqiang */ it('testRationalNumberToString001', 0, function () { var pro = new util.RationalNumber(-2, 1) @@ -3164,7 +2936,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testRationalNumberToString002 * @tc.desc: Obtains a string representation of the current RationalNumber object. - * @tc.author: liuqiang */ it('testRationalNumberToString002', 0, function () { var pro = new util.RationalNumber(0, 0) @@ -3175,7 +2946,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testRationalNumberToString003 * @tc.desc: Obtains a string representation of the current RationalNumber object. - * @tc.author: liuqiang */ it('testRationalNumberToString003', 0, function () { var pro = new util.RationalNumber(3, 0) @@ -3186,7 +2956,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testRationalNumberToString004 * @tc.desc: Obtains a string representation of the current RationalNumber object. - * @tc.author: liuqiang */ it('testRationalNumberToString004', 0, function () { var pro = new util.RationalNumber(-3, 0) @@ -3197,7 +2966,6 @@ describe('RationalNumberFunTest', function () { /** * @tc.name: testRationalNumberToString005 * @tc.desc: Obtains a string representation of the current RationalNumber object. - * @tc.author: liuqiang */ it('testRationalNumberToString005', 0, function () { var pro = new util.RationalNumber(2, 3) @@ -3211,7 +2979,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferUpdateGetCapacity001 * @tc.desc: Updates the buffer capacity to a specified capacity. - * @tc.author: lixingyang */ it('testLruBufferUpdateGetCapacity001', 0, function () { var that = new util.LruBuffer() @@ -3223,7 +2990,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferUpdateGetCapacity002 * @tc.desc: Updates the buffer capacity to a specified capacity. - * @tc.author: lixingyang */ it('testLruBufferUpdateGetCapacity002', 0, function () { var that = new util.LruBuffer() @@ -3235,7 +3001,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferUpdateGetCapacity003 * @tc.desc: Updates the buffer capacity to a specified capacity. - * @tc.author: lixingyang */ it('testLruBufferUpdateGetCapacity003', 0, function () { var that = new util.LruBuffer(100) @@ -3247,7 +3012,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferUpdateGetCapacity004 * @tc.desc: Updates the buffer capacity to a specified capacity. - * @tc.author: lixingyang */ it('testLruBufferUpdateGetCapacity004', 0, function () { var that = new util.LruBuffer(50) @@ -3259,7 +3023,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferUpdateGetCapacity005 * @tc.desc: Updates the buffer capacity to a specified capacity. - * @tc.author: lixingyang */ it('testLruBufferUpdateGetCapacity005', 0, function () { var that = new util.LruBuffer(200) @@ -3271,7 +3034,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGet001 * @tc.desc: Obtains the value associated with a specified key. - * @tc.author: lixingyang */ it('testLruBufferGet001', 0, function () { var that = new util.LruBuffer(100) @@ -3283,7 +3045,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGet002 * @tc.desc: Obtains the value associated with a specified key. - * @tc.author: lixingyang */ it('testLruBufferGet002', 0, function () { var that = new util.LruBuffer(100) @@ -3295,7 +3056,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGet003 * @tc.desc: Obtains the value associated with a specified key. - * @tc.author: lixingyang */ it('testLruBufferGet003', 0, function () { var that = new util.LruBuffer(100) @@ -3313,7 +3073,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGet004 * @tc.desc: Obtains the value associated with a specified key. - * @tc.author: lixingyang */ it('testLruBufferGet004', 0, function () { var that = new util.LruBuffer() @@ -3333,7 +3092,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGet005 * @tc.desc: Obtains the value associated with a specified key. - * @tc.author: lixingyang */ it('testLruBufferGet005', 0, function () { var that = new util.LruBuffer() @@ -3354,7 +3112,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferPut001 * @tc.desc: Adds a key-value pair to the buffer. - * @tc.author: lixingyang */ it('testLruBufferPut001', 0, function () { var that = new util.LruBuffer() @@ -3365,7 +3122,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferPut002 * @tc.desc: Adds a key-value pair to the buffer. - * @tc.author: lixingyang */ it('testLruBufferPut002', 0, function () { var that = new util.LruBuffer() @@ -3377,7 +3133,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferPut003 * @tc.desc: Adds a key-value pair to the buffer. - * @tc.author: lixingyang */ it('testLruBufferPut003', 0, function () { var that = new util.LruBuffer() @@ -3395,7 +3150,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferPut004 * @tc.desc: Adds a key-value pair to the buffer. - * @tc.author: lixingyang */ it('testLruBufferPut004', 0, function () { var that = new util.LruBuffer() @@ -3415,7 +3169,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferPut005 * @tc.desc: Adds a key-value pair to the buffer. - * @tc.author: lixingyang */ it('testLruBufferPut005', 0, function () { var that = new util.LruBuffer() @@ -3436,7 +3189,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetCreateCount001 * @tc.desc: Obtains the number of times createDefault(Object) returned a value. - * @tc.author: lixingyang */ it('testLruBufferGetCreateCount001', 0, function () { var that = new util.LruBuffer() @@ -3453,7 +3205,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetCreateCount002 * @tc.desc: Obtains the number of times createDefault(Object) returned a value. - * @tc.author: lixingyang */ it('testLruBufferGetCreateCount002', 0, function () { var that = new util.LruBuffer() @@ -3470,7 +3221,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetCreateCount003 * @tc.desc: Obtains the number of times createDefault(Object) returned a value. - * @tc.author: lixingyang */ it('testLruBufferGetCreateCount003', 0, function () { var that = new util.LruBuffer() @@ -3485,7 +3235,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetCreateCount004 * @tc.desc: Obtains the number of times createDefault(Object) returned a value. - * @tc.author: lixingyang */ it('testLruBufferGetCreateCount004', 0, function () { var that = new util.LruBuffer() @@ -3502,7 +3251,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetCreateCount005 * @tc.desc: Obtains the number of times createDefault(Object) returned a value. - * @tc.author: lixingyang */ it('testLruBufferGetCreateCount005', 0, function () { var that = new util.LruBuffer() @@ -3519,7 +3267,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetMissCount001 * @tc.desc: Obtains the number of times that the queried values are not matched. - * @tc.author: lixingyang */ it('testLruBufferGetMissCount001', 0, function () { var that = new util.LruBuffer() @@ -3536,7 +3283,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetMissCount002 * @tc.desc: Obtains the number of times that the queried values are not matched. - * @tc.author: lixingyang */ it('testLruBufferGetMissCount002', 0, function () { var that = new util.LruBuffer() @@ -3553,7 +3299,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetMissCount003 * @tc.desc: Obtains the number of times that the queried values are not matched. - * @tc.author: lixingyang */ it('testLruBufferGetMissCount003', 0, function () { var that = new util.LruBuffer() @@ -3570,7 +3315,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetMissCount004 * @tc.desc: Obtains the number of times that the queried values are not matched. - * @tc.author: lixingyang */ it('testLruBufferGetMissCount004', 0, function () { var that = new util.LruBuffer() @@ -3587,7 +3331,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetMissCount005 * @tc.desc: Obtains the number of times that the queried values are not matched. - * @tc.author: lixingyang */ it('testLruBufferGetMissCount005', 0, function () { var that = new util.LruBuffer() @@ -3606,7 +3349,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetMissCount006 * @tc.desc: Obtains the number of times that the queried values are not matched. - * @tc.author: lixingyang */ it('testLruBufferGetMissCount006', 0, function () { var that = new util.LruBuffer() @@ -3623,7 +3365,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetRemovalCount001 * @tc.desc: Obtains the number of times that values are evicted from the buffer. - * @tc.author: lixingyang */ it('testLruBufferGetRemovalCount001', 0, function () { var that = new util.LruBuffer() @@ -3639,7 +3380,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetRemovalCount002 * @tc.desc: Obtains the number of times that values are evicted from the buffer. - * @tc.author: lixingyang */ it('testLruBufferGetRemovalCount002', 0, function () { var that = new util.LruBuffer() @@ -3654,7 +3394,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetRemovalCount003 * @tc.desc: Obtains the number of times that values are evicted from the buffer. - * @tc.author: lixingyang */ it('testLruBufferGetRemovalCount003', 0, function () { var that = new util.LruBuffer() @@ -3668,7 +3407,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetRemovalCount004 * @tc.desc: Obtains the number of times that values are evicted from the buffer. - * @tc.author: lixingyang */ it('testLruBufferGetRemovalCount004', 0, function () { var that = new util.LruBuffer() @@ -3685,7 +3423,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetRemovalCount005 * @tc.desc: Obtains the number of times that values are evicted from the buffer. - * @tc.author: lixingyang */ it('testLruBufferGetRemovalCount005', 0, function () { var that = new util.LruBuffer() @@ -3703,7 +3440,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetMatchCount001 * @tc.desc: Obtains the number of times that the queried values are successfully matched. - * @tc.author: lixingyang */ it('testLruBufferGetMatchCount001', 0, function () { var that = new util.LruBuffer() @@ -3720,7 +3456,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetMatchCount002 * @tc.desc: Obtains the number of times that the queried values are successfully matched. - * @tc.author: lixingyang */ it('testLruBufferGetMatchCount002', 0, function () { var that = new util.LruBuffer() @@ -3738,7 +3473,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetMatchCount003 * @tc.desc: Obtains the number of times that the queried values are successfully matched. - * @tc.author: lixingyang */ it('testLruBufferGetMatchCount003', 0, function () { var that = new util.LruBuffer() @@ -3755,7 +3489,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetMatchCount004 * @tc.desc: Obtains the number of times that the queried values are successfully matched. - * @tc.author: lixingyang */ it('testLruBufferGetMatchCount004', 0, function () { var that = new util.LruBuffer() @@ -3775,7 +3508,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetMatchCount005 * @tc.desc: Obtains the number of times that the queried values are successfully matched. - * @tc.author: lixingyang */ it('testLruBufferGetMatchCount005', 0, function () { var that = new util.LruBuffer() @@ -3798,7 +3530,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetMatchCount006 * @tc.desc: Obtains the number of times that the queried values are successfully matched. - * @tc.author: lixingyang */ it('testLruBufferGetMatchCount006', 0, function () { var that = new util.LruBuffer() @@ -3813,7 +3544,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetPutCount001 * @tc.desc: Obtains the number of times that values are added to the buffer. - * @tc.author: lixingyang */ it('testLruBufferGetPutCount001', 0, function () { var that = new util.LruBuffer() @@ -3825,7 +3555,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetPutCount002 * @tc.desc: Obtains the number of times that values are added to the buffer. - * @tc.author: lixingyang */ it('testLruBufferGetPutCount002', 0, function () { var that = new util.LruBuffer() @@ -3838,7 +3567,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetPutCount003 * @tc.desc: Obtains the number of times that values are added to the buffer. - * @tc.author: lixingyang */ it('testLruBufferGetPutCount003', 0, function () { var that = new util.LruBuffer() @@ -3852,7 +3580,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetPutCount004 * @tc.desc: Obtains the number of times that values are added to the buffer. - * @tc.author: lixingyang */ it('testLruBufferGetPutCount004', 0, function () { var that = new util.LruBuffer() @@ -3866,7 +3593,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetPutCount005 * @tc.desc: Obtains the number of times that values are added to the buffer. - * @tc.author: lixingyang */ it('testLruBufferGetPutCount005', 0, function () { var that = new util.LruBuffer() @@ -3881,7 +3607,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetCapacity001 * @tc.desc: Obtains the capacity of the current buffer. - * @tc.author: lixingyang */ it('testLruBufferGetCapacity001', 0, function () { var that = new util.LruBuffer() @@ -3892,7 +3617,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetCapacity002 * @tc.desc: Obtains the capacity of the current buffer. - * @tc.author: lixingyang */ it('testLruBufferGetCapacity002', 0, function () { var that = new util.LruBuffer(2) @@ -3903,7 +3627,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetCapacity003 * @tc.desc: Obtains the capacity of the current buffer. - * @tc.author: lixingyang */ it('testLruBufferGetCapacity003', 0, function () { var that = new util.LruBuffer(100) @@ -3914,7 +3637,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetCapacity004 * @tc.desc: Obtains the capacity of the current buffer. - * @tc.author: lixingyang */ it('testLruBufferGetCapacity004', 0, function () { var that = new util.LruBuffer() @@ -3926,7 +3648,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferGetCapacity005 * @tc.desc: Obtains the capacity of the current buffer. - * @tc.author: lixingyang */ it('testLruBufferGetCapacity005', 0, function () { var that = new util.LruBuffer(100) @@ -3938,7 +3659,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferLength001 * @tc.desc: Obtains the total number of values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferLength001', 0, function () { var that = new util.LruBuffer() @@ -3949,7 +3669,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferLength002 * @tc.desc: Obtains the total number of values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferLength002', 0, function () { var that = new util.LruBuffer() @@ -3961,7 +3680,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferLength003 * @tc.desc: Obtains the total number of values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferLength003', 0, function () { var that = new util.LruBuffer() @@ -3974,7 +3692,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferLength004 * @tc.desc: Obtains the total number of values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferLength004', 0, function () { var that = new util.LruBuffer() @@ -3989,7 +3706,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferLength005 * @tc.desc: Obtains the total number of values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferLength005', 0, function () { var that = new util.LruBuffer() @@ -4007,7 +3723,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferClear001 * @tc.desc: Clears key-value pairs from the current buffer. - * @tc.author: lixingyang */ it('testLruBufferClear001', 0, function () { var that = new util.LruBuffer() @@ -4022,7 +3737,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferClear002 * @tc.desc: Clears key-value pairs from the current buffer. - * @tc.author: lixingyang */ it('testLruBufferClear002', 0, function () { var that = new util.LruBuffer() @@ -4040,7 +3754,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferClear003 * @tc.desc: Clears key-value pairs from the current buffer. - * @tc.author: lixingyang */ it('testLruBufferClear003', 0, function () { var that = new util.LruBuffer() @@ -4058,7 +3771,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferClear004 * @tc.desc: Clears key-value pairs from the current buffer. - * @tc.author: lixingyang */ it('testLruBufferClear004', 0, function () { var that = new util.LruBuffer() @@ -4076,7 +3788,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferClear005 * @tc.desc: Clears key-value pairs from the current buffer. - * @tc.author: lixingyang */ it('testLruBufferClear005', 0, function () { var that = new util.LruBuffer() @@ -4095,7 +3806,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferIsEmpty001 * @tc.desc: Checks whether the current buffer is empty. - * @tc.author: lixingyang */ it('testLruBufferIsEmpty001', 0, function () { var that = new util.LruBuffer() @@ -4107,7 +3817,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferIsEmpty002 * @tc.desc: Checks whether the current buffer is empty. - * @tc.author: lixingyang */ it('testLruBufferIsEmpty002', 0, function () { var that = new util.LruBuffer() @@ -4120,7 +3829,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferIsEmpty003 * @tc.desc: Checks whether the current buffer is empty. - * @tc.author: lixingyang */ it('testLruBufferIsEmpty003', 0, function () { var that = new util.LruBuffer() @@ -4134,7 +3842,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferIsEmpty004 * @tc.desc: Checks whether the current buffer is empty. - * @tc.author: lixingyang */ it('testLruBufferIsEmpty004', 0, function () { var that = new util.LruBuffer() @@ -4148,7 +3855,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferIsEmpty005 * @tc.desc: Checks whether the current buffer is empty. - * @tc.author: lixingyang */ it('testLruBufferIsEmpty005', 0, function () { var that = new util.LruBuffer() @@ -4163,7 +3869,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferContains001 * @tc.desc: Checks whether the current buffer contains a specified key. - * @tc.author: lixingyang */ it('testLruBufferContains001', 0, function () { var that = new util.LruBuffer() @@ -4175,7 +3880,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferContains002 * @tc.desc: Checks whether the current buffer contains a specified key. - * @tc.author: lixingyang */ it('testLruBufferContains002', 0, function () { var that = new util.LruBuffer() @@ -4187,7 +3891,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferContains003 * @tc.desc: Checks whether the current buffer contains a specified key. - * @tc.author: lixingyang */ it('testLruBufferContains003', 0, function () { var that = new util.LruBuffer() @@ -4199,7 +3902,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferContains004 * @tc.desc: Checks whether the current buffer contains a specified key. - * @tc.author: lixingyang */ it('testLruBufferContains004', 0, function () { var that = new util.LruBuffer() @@ -4214,7 +3916,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferContains005 * @tc.desc: Checks whether the current buffer contains a specified key. - * @tc.author: lixingyang */ it('testLruBufferContains005', 0, function () { var that = new util.LruBuffer() @@ -4231,7 +3932,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferRemove001 * @tc.desc: Deletes a specified key and its associated value from the current buffer. - * @tc.author: lixingyang */ it('testLruBufferRemove001', 0, function () { var that = new util.LruBuffer() @@ -4243,7 +3943,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferRemove002 * @tc.desc: Deletes a specified key and its associated value from the current buffer. - * @tc.author: lixingyang */ it('testLruBufferRemove002', 0, function () { var that = new util.LruBuffer() @@ -4258,7 +3957,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferRemove003 * @tc.desc: Deletes a specified key and its associated value from the current buffer. - * @tc.author: lixingyang */ it('testLruBufferRemove003', 0, function () { var that = new util.LruBuffer() @@ -4272,7 +3970,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferRemove004 * @tc.desc: Deletes a specified key and its associated value from the current buffer. - * @tc.author: lixingyang */ it('testLruBufferRemove004', 0, function () { var that = new util.LruBuffer() @@ -4287,7 +3984,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferRemove005 * @tc.desc: Deletes a specified key and its associated value from the current buffer. - * @tc.author: lixingyang */ it('testLruBufferRemove005', 0, function () { var that = new util.LruBuffer() @@ -4305,7 +4001,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferCreateDefault001 * @tc.desc: Executes subsequent operations if miss to compute a value for the specific key. - * @tc.author: lixingyang */ it('testLruBufferCreateDefault001', 0, function () { var that = new util.LruBuffer() @@ -4316,7 +4011,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferCreateDefault002 * @tc.desc: Executes subsequent operations if miss to compute a value for the specific key. - * @tc.author: lixingyang */ it('testLruBufferCreateDefault002', 0, function () { var that = new util.LruBuffer() @@ -4327,7 +4021,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferCreateDefault003 * @tc.desc: Executes subsequent operations if miss to compute a value for the specific key. - * @tc.author: lixingyang */ it('testLruBufferCreateDefault003', 0, function () { var that = new util.LruBuffer() @@ -4338,7 +4031,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferCreateDefault004 * @tc.desc: Executes subsequent operations if miss to compute a value for the specific key. - * @tc.author: lixingyang */ it('testLruBufferCreateDefault004', 0, function () { var that = new util.LruBuffer() @@ -4349,7 +4041,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferCreateDefault005 * @tc.desc: Executes subsequent operations if miss to compute a value for the specific key. - * @tc.author: lixingyang */ it('testLruBufferCreateDefault005', 0, function () { var that = new util.LruBuffer() @@ -4362,7 +4053,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferKeys001 * @tc.desc: Obtains a list of keys for the values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferKeys001', 0, function () { var that = new util.LruBuffer() @@ -4374,7 +4064,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferKeys002 * @tc.desc: Obtains a list of keys for the values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferKeys002', 0, function () { var that = new util.LruBuffer() @@ -4392,7 +4081,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferKeys003 * @tc.desc: Obtains a list of keys for the values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferKeys003', 0, function () { var that = new util.LruBuffer() @@ -4411,7 +4099,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferKeys004 * @tc.desc: Obtains a list of keys for the values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferKeys004', 0, function () { var that = new util.LruBuffer() @@ -4431,7 +4118,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferKeys005 * @tc.desc: Obtains a list of keys for the values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferKeys005', 0, function () { var that = new util.LruBuffer() @@ -4453,7 +4139,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferValues001 * @tc.desc: Obtains a list of all values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferValues001', 0, function () { var that = new util.LruBuffer() @@ -4465,7 +4150,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferValues002 * @tc.desc: Obtains a list of all values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferValues002', 0, function () { var that = new util.LruBuffer() @@ -4483,7 +4167,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferValues003 * @tc.desc: Obtains a list of all values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferValues003', 0, function () { var that = new util.LruBuffer() @@ -4502,7 +4185,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferValues004 * @tc.desc: Obtains a list of all values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferValues004', 0, function () { var that = new util.LruBuffer() @@ -4522,7 +4204,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferValues005 * @tc.desc: Obtains a list of all values in the current buffer. - * @tc.author: lixingyang */ it('testLruBufferValues005', 0, function () { var that = new util.LruBuffer() @@ -4544,7 +4225,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferToString001 * @tc.desc: Returns a string representation of the object. - * @tc.author: lixingyang */ it('testLruBufferToString001', 0, function () { var that = new util.LruBuffer() @@ -4557,7 +4237,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferToString002 * @tc.desc: Returns a string representation of the object. - * @tc.author: lixingyang */ it('testLruBufferToString002', 0, function () { var that = new util.LruBuffer() @@ -4572,7 +4251,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferToString003 * @tc.desc: Returns a string representation of the object. - * @tc.author: lixingyang */ it('testLruBufferToString003', 0, function () { var that = new util.LruBuffer(100) @@ -4588,7 +4266,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferToString004 * @tc.desc: Returns a string representation of the object. - * @tc.author: lixingyang */ it('testLruBufferToString004', 0, function () { var that = new util.LruBuffer(100) @@ -4605,7 +4282,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferToString005 * @tc.desc: Returns a string representation of the object. - * @tc.author: lixingyang */ it('testLruBufferToString005', 0, function () { var that = new util.LruBuffer(100) @@ -4624,7 +4300,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferEntries001 * @tc.desc: Returns an array of key-value pairs of enumeratable properties of a given object. - * @tc.author: lixingyang */ it('testLruBufferEntries001', 0, function () { var that = new util.LruBuffer() @@ -4643,7 +4318,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferEntries002 * @tc.desc: Returns an array of key-value pairs of enumeratable properties of a given object. - * @tc.author: lixingyang */ it('testLruBufferEntries002', 0, function () { var that = new util.LruBuffer() @@ -4665,7 +4339,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferEntries003 * @tc.desc: Returns an array of key-value pairs of enumeratable properties of a given object. - * @tc.author: lixingyang */ it('testLruBufferEntries003', 0, function () { var that = new util.LruBuffer() @@ -4688,7 +4361,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferEntries004 * @tc.desc: Returns an array of key-value pairs of enumeratable properties of a given object. - * @tc.author: lixingyang */ it('testLruBufferEntries004', 0, function () { var that = new util.LruBuffer() @@ -4713,7 +4385,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferEntries005 * @tc.desc: Returns an array of key-value pairs of enumeratable properties of a given object. - * @tc.author: lixingyang */ it('testLruBufferEntries005', 0, function () { var that = new util.LruBuffer() @@ -4742,7 +4413,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBuffer[Symbol.iterator]001 * @tc.desc: Returns a two - dimensional array in the form of key - value pairs. - * @tc.author: lixingyang */ it('testLruBuffer[Symbol.iterator]001', 0, function () { var that = new util.LruBuffer() @@ -4762,7 +4432,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBuffer[Symbol.iterator]002 * @tc.desc: Returns a two - dimensional array in the form of key - value pairs. - * @tc.author: lixingyang */ it('testLruBuffer[Symbol.iterator]002', 0, function () { var that = new util.LruBuffer() @@ -4784,7 +4453,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBuffer[Symbol.iterator]003 * @tc.desc: Returns a two - dimensional array in the form of key - value pairs. - * @tc.author: lixingyang */ it('testLruBuffer[Symbol.iterator]003', 0, function () { var that = new util.LruBuffer() @@ -4807,7 +4475,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBuffer[Symbol.iterator]004 * @tc.desc: Returns a two - dimensional array in the form of key - value pairs. - * @tc.author: lixingyang */ it('testLruBuffer[Symbol.iterator]004', 0, function () { var that = new util.LruBuffer() @@ -4832,7 +4499,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBuffer[Symbol.iterator]005 * @tc.desc: Returns a two - dimensional array in the form of key - value pairs. - * @tc.author: lixingyang */ it('testLruBuffer[Symbol.iterator]005', 0, function () { var that = new util.LruBuffer() @@ -4861,7 +4527,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferAfterRemoval001 * @tc.desc: Executes subsequent operations after a value is deleted. - * @tc.author: lixingyang */ it('testLruBufferAfterRemoval001', 0, function () { var arr = []; @@ -4894,7 +4559,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferAfterRemoval002 * @tc.desc: Executes subsequent operations after a value is deleted. - * @tc.author: lixingyang */ it('testLruBufferAfterRemoval002', 0, function () { var arr = []; @@ -4927,7 +4591,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferAfterRemoval003 * @tc.desc: Executes subsequent operations after a value is deleted. - * @tc.author: lixingyang */ it('testLruBufferAfterRemoval003', 0, function () { var arr = []; @@ -4960,7 +4623,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferAfterRemoval004 * @tc.desc: Executes subsequent operations after a value is deleted. - * @tc.author: lixingyang */ it('testLruBufferAfterRemoval004', 0, function () { var arr = []; @@ -4993,7 +4655,6 @@ describe('LruBufferFunTest', function () { /** * @tc.name: testLruBufferAfterRemoval005 * @tc.desc: Executes subsequent operations after a value is deleted. - * @tc.author: lixingyang */ it('testLruBufferAfterRemoval005', 0, function () { var arr = []; @@ -5029,7 +4690,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsAnyArrayBuffer001 * @tc.desc: Check whether the entered value is of arraybuffer or sharedarraybuffer type. - * @tc.author: wangjingwu */ it('testIsAnyArrayBuffer001', 0, function() { var proc = new util.types(); @@ -5040,7 +4700,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsAnyArrayBuffer002 * @tc.desc: Check whether the entered value is of arraybuffer or sharedarraybuffer type. - * @tc.author: wangjingwu */ it('testIsAnyArrayBuffer002', 0, function() { var proc = new util.types(); @@ -5051,7 +4710,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsAnyArrayBuffer003 * @tc.desc: Check whether the entered value is of arraybuffer or sharedarraybuffer type. - * @tc.author: wangjingwu */ it('testIsAnyArrayBuffer003', 0, function() { var proc = new util.types(); @@ -5062,7 +4720,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsAnyArrayBuffer004 * @tc.desc: Check whether the entered value is of arraybuffer or sharedarraybuffer type. - * @tc.author: wangjingwu */ it('testIsAnyArrayBuffer004', 0, function() { var proc = new util.types(); @@ -5074,7 +4731,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsAnyArrayBuffer005 * @tc.desc: Check whether the entered value is of arraybuffer or sharedarraybuffer type. - * @tc.author: wangjingwu */ it('testIsAnyArrayBuffer005', 0, function() { var proc = new util.types(); @@ -5087,7 +4743,6 @@ describe('TypesTest', function() { * @tc.desc: Check whether the entered value is napi_ int8_ array or napi_ uint8_ array or naPi_ uint8_ clamped_ array or naPi_ int16_ array or naPi_ uint16_ array or napi_ int32_ array or napi_ uint32_ array or napi_ float32_ array or napi_ float64_ array array or DataView type. - * @tc.author: wangjingwu */ it('testIsArrayBufferView001', 0, function() { var proc = new util.types(); @@ -5100,7 +4755,6 @@ describe('TypesTest', function() { * @tc.desc: Check whether the entered value is napi_ int8_ array or napi_ uint8_ array or naPi_ uint8_ clamped_ array or naPi_ int16_ array or naPi_ uint16_ array or napi_ int32_ array or napi_ uint32_ array or napi_ float32_ array or napi_ float64_ array array or DataView type. - * @tc.author: wangjingwu */ it('testIsArrayBufferView002', 0, function() { var proc = new util.types(); @@ -5113,7 +4767,6 @@ describe('TypesTest', function() { * @tc.desc: Check whether the entered value is napi_ int8_ array or napi_ uint8_ array or naPi_ uint8_ clamped_ array or naPi_ int16_ array or naPi_ uint16_ array or napi_ int32_ array or napi_ uint32_ array or napi_ float32_ array or napi_ float64_ array array or DataView type. - * @tc.author: wangjingwu */ it('testIsArrayBufferView003', 0, function() { var proc = new util.types(); @@ -5126,7 +4779,6 @@ describe('TypesTest', function() { * @tc.desc: Check whether the entered value is napi_ int8_ array or napi_ uint8_ array or naPi_ uint8_ clamped_ array or naPi_ int16_ array or naPi_ uint16_ array or napi_ int32_ array or napi_ uint32_ array or napi_ float32_ array or napi_ float64_ array array or DataView type. - * @tc.author: wangjingwu */ it('testIsArrayBufferView004', 0, function() { var proc = new util.types(); @@ -5139,7 +4791,6 @@ describe('TypesTest', function() { * @tc.desc: Check whether the entered value is napi_ int8_ array or napi_ uint8_ array or naPi_ uint8_ clamped_ array or naPi_ int16_ array or naPi_ uint16_ array or napi_ int32_ array or napi_ uint32_ array or napi_ float32_ array or napi_ float64_ array array or DataView type. - * @tc.author: wangjingwu */ it('testIsArrayBufferView005', 0, function() { var proc = new util.types(); @@ -5150,7 +4801,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsArgumentsObject001 * @tc.desc: Check whether the entered value is an arguments object type. - * @tc.author: wangjingwu */ it('testIsArgumentsObject001', 0, function() { var proc = new util.types(); @@ -5164,7 +4814,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsArgumentsObject002 * @tc.desc: Check whether the entered value is an arguments object type. - * @tc.author: wangjingwu */ it('testIsArgumentsObject002', 0, function() { var proc = new util.types(); @@ -5175,7 +4824,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsArgumentsObject003 * @tc.desc: Check whether the entered value is an arguments object type. - * @tc.author: wangjingwu */ it('testIsArgumentsObject003', 0, function() { var proc = new util.types(); @@ -5186,7 +4834,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsArgumentsObject004 * @tc.desc: Check whether the entered value is an arguments object type. - * @tc.author: wangjingwu */ it('testIsArgumentsObject004', 0, function() { var proc = new util.types(); @@ -5197,7 +4844,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsArgumentsObject005 * @tc.desc: Check whether the entered value is an arguments object type. - * @tc.author: wangjingwu */ it('testIsArgumentsObject005', 0, function() { var proc = new util.types(); @@ -5208,7 +4854,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsArrayBuffer001 * @tc.desc: Check whether the entered value is of arraybuffer type. - * @tc.author: wangjingwu */ it('testIsArrayBuffer001', 0, function() { var proc = new util.types(); @@ -5219,7 +4864,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsArrayBuffer002 * @tc.desc: Check whether the entered value is of arraybuffer type. - * @tc.author: wangjingwu */ it('testIsArrayBuffer002', 0, function() { var proc = new util.types(); @@ -5230,7 +4874,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsArrayBuffer003 * @tc.desc: Check whether the entered value is of arraybuffer type. - * @tc.author: wangjingwu */ it('testIsArrayBuffer003', 0, function() { var proc = new util.types(); @@ -5241,7 +4884,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsArrayBuffer004 * @tc.desc: Check whether the entered value is of arraybuffer type. - * @tc.author: wangjingwu */ it('testIsArrayBuffer004', 0, function() { var proc = new util.types(); @@ -5252,7 +4894,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsArrayBuffer005 * @tc.desc: Check whether the entered value is of arraybuffer type. - * @tc.author: wangjingwu */ it('testIsArrayBuffer005', 0, function() { var proc = new util.types(); @@ -5263,7 +4904,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsAsyncFunction001 * @tc.desc: Check whether the value entered is an asynchronous function type. - * @tc.author: wangjingwu */ it('testIsAsyncFunction001', 0, function() { var proc = new util.types(); @@ -5274,7 +4914,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsAsyncFunction002 * @tc.desc: Check whether the value entered is an asynchronous function type. - * @tc.author: wangjingwu */ it('testIsAsyncFunction002', 0, function() { var proc = new util.types(); @@ -5285,7 +4924,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsAsyncFunction003 * @tc.desc: Check whether the value entered is an asynchronous function type. - * @tc.author: wangjingwu */ it('testIsAsyncFunction003', 0, function() { var proc = new util.types(); @@ -5296,7 +4934,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsAsyncFunction004 * @tc.desc: Check whether the value entered is an asynchronous function type. - * @tc.author: wangjingwu */ it('testIsAsyncFunction004', 0, function() { var proc = new util.types(); @@ -5307,7 +4944,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBigInt64Array001 * @tc.desc: Check whether the entered value is of bigint64array array type. - * @tc.author: wangjingwu */ it('testIsBigInt64Array001', 0, function() { var proc = new util.types(); @@ -5318,7 +4954,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBigInt64Array002 * @tc.desc: Check whether the entered value is of bigint64array array type. - * @tc.author: wangjingwu */ it('testIsBigInt64Array002', 0, function() { var proc = new util.types(); @@ -5329,7 +4964,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBigInt64Array003 * @tc.desc: Check whether the entered value is of bigint64array array type. - * @tc.author: wangjingwu */ it('testIsBigInt64Array003', 0, function() { var proc = new util.types(); @@ -5340,7 +4974,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBigInt64Array004 * @tc.desc: Check whether the entered value is of bigint64array array type. - * @tc.author: wangjingwu */ it('testIsBigInt64Array004', 0, function() { var proc = new util.types(); @@ -5351,7 +4984,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBigInt64Array005 * @tc.desc: Check whether the entered value is of bigint64array array type. - * @tc.author: wangjingwu */ it('testIsBigInt64Array005', 0, function() { var proc = new util.types(); @@ -5362,7 +4994,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBigUint64Array001 * @tc.desc: Check whether the entered value is of biguint64array array array type. - * @tc.author: wangjingwu */ it('testIsBigUint64Array001', 0, function() { var proc = new util.types(); @@ -5373,7 +5004,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBigUint64Array002 * @tc.desc: Check whether the entered value is of biguint64array array array type. - * @tc.author: wangjingwu */ it('testIsBigUint64Array002', 0, function() { var proc = new util.types(); @@ -5384,7 +5014,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBigUint64Array002 * @tc.desc: Check whether the entered value is of biguint64array array array type. - * @tc.author: wangjingwu */ it('testIsBigUint64Array002', 0, function() { var proc = new util.types(); @@ -5395,7 +5024,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBigUint64Array003 * @tc.desc: Check whether the entered value is of biguint64array array array type. - * @tc.author: wangjingwu */ it('testIsBigUint64Array003', 0, function() { var proc = new util.types(); @@ -5406,7 +5034,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBigUint64Array004 * @tc.desc: Check whether the entered value is of biguint64array array array type. - * @tc.author: wangjingwu */ it('testIsBigUint64Array004', 0, function() { var proc = new util.types(); @@ -5417,7 +5044,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBigUint64Array005 * @tc.desc: Check whether the entered value is of biguint64array array array type. - * @tc.author: wangjingwu */ it('testIsBigUint64Array005', 0, function() { var proc = new util.types(); @@ -5429,7 +5055,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBooleanObject001 * @tc.desc: Check whether the entered value is a Boolean object type. - * @tc.author: wangjingwu */ it('testIsBooleanObject001', 0, function() { var proc = new util.types(); @@ -5440,7 +5065,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBooleanObject002 * @tc.desc: Check whether the entered value is a Boolean object type. - * @tc.author: wangjingwu */ it('testIsBooleanObject002', 0, function() { var proc = new util.types(); @@ -5451,7 +5075,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBooleanObject003 * @tc.desc: Check whether the entered value is a Boolean object type. - * @tc.author: wangjingwu */ it('testIsBooleanObject003', 0, function() { var proc = new util.types(); @@ -5462,7 +5085,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBooleanObject004 * @tc.desc: Check whether the entered value is a Boolean object type. - * @tc.author: wangjingwu */ it('testIsBooleanObject004', 0, function() { var proc = new util.types(); @@ -5473,7 +5095,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBooleanObject005 * @tc.desc: Check whether the entered value is a Boolean object type. - * @tc.author: wangjingwu */ it('testIsBooleanObject005', 0, function() { var proc = new util.types(); @@ -5484,7 +5105,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBoxedPrimitive001 * @tc.desc: Check whether the entered value is a Boolean or number or string or symbol object type. - * @tc.author: wangjingwu */ it('testIsBoxedPrimitive001', 0, function() { var proc = new util.types(); @@ -5495,7 +5115,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBoxedPrimitive002 * @tc.desc: Check whether the entered value is a Boolean or number or string or symbol object type. - * @tc.author: wangjingwu */ it('testIsBoxedPrimitive002', 0, function() { var proc = new util.types(); @@ -5506,7 +5125,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBoxedPrimitive003 * @tc.desc: Check whether the entered value is a Boolean or number or string or symbol object type. - * @tc.author: wangjingwu */ it('testIsBoxedPrimitive003', 0, function() { var proc = new util.types(); @@ -5517,7 +5135,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBoxedPrimitive004 * @tc.desc: Check whether the entered value is a Boolean or number or string or symbol object type. - * @tc.author: wangjingwu */ it('testIsBoxedPrimitive004', 0, function() { var proc = new util.types(); @@ -5528,7 +5145,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsBoxedPrimitive005 * @tc.desc: Check whether the entered value is a Boolean or number or string or symbol object type. - * @tc.author: wangjingwu */ it('testIsBoxedPrimitive005', 0, function() { var proc = new util.types(); @@ -5539,7 +5155,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsDataView001 * @tc.desc: Check whether the entered value is of DataView type. - * @tc.author: wangjingwu */ it('testIsDataView001', 0, function() { var proc = new util.types(); @@ -5551,7 +5166,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsDataView002 * @tc.desc: Check whether the entered value is of DataView type. - * @tc.author: wangjingwu */ it('testIsDataView002', 0, function() { var proc = new util.types(); @@ -5562,7 +5176,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsDataView003 * @tc.desc: Check whether the entered value is of DataView type. - * @tc.author: wangjingwu */ it('testIsDataView003', 0, function() { var proc = new util.types(); @@ -5573,7 +5186,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsDataView004 * @tc.desc: Check whether the entered value is of DataView type. - * @tc.author: wangjingwu */ it('testIsDataView004', 0, function() { var proc = new util.types(); @@ -5584,7 +5196,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsDataView005 * @tc.desc: Check whether the entered value is of DataView type. - * @tc.author: wangjingwu */ it('testIsDataView005', 0, function() { var proc = new util.types(); @@ -5595,7 +5206,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsDate001 * @tc.desc: Check whether the entered value is of type date. - * @tc.author: wangjingwu */ it('testIsDate001', 0, function() { var proc = new util.types(); @@ -5606,7 +5216,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsDate002 * @tc.desc: Check whether the entered value is of type date. - * @tc.author: wangjingwu */ it('testIsDate002', 0, function() { var proc = new util.types(); @@ -5617,7 +5226,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsDate003 * @tc.desc: Check whether the entered value is of type date. - * @tc.author: wangjingwu */ it('testIsDate003', 0, function() { var proc = new util.types(); @@ -5628,7 +5236,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsDate004 * @tc.desc: Check whether the entered value is of type date. - * @tc.author: wangjingwu */ it('testIsDate004', 0, function() { var proc = new util.types(); @@ -5639,7 +5246,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsDate005 * @tc.desc: Check whether the entered value is of type date. - * @tc.author: wangjingwu */ it('testIsDate005', 0, function() { var proc = new util.types(); @@ -5650,7 +5256,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsExternal001 * @tc.desc: Check whether the entered value is a native external value type. - * @tc.author: wangjingwu */ it('testIsExternal001', 0, function() { var proc = new util.types(); @@ -5661,7 +5266,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsExternal002 * @tc.desc: Check whether the entered value is a native external value type. - * @tc.author: wangjingwu */ it('testIsExternal002', 0, function() { var proc = new util.types(); @@ -5672,7 +5276,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsExternal003 * @tc.desc: Check whether the entered value is a native external value type. - * @tc.author: wangjingwu */ it('testIsExternal003', 0, function() { var proc = new util.types(); @@ -5683,7 +5286,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsExternal004 * @tc.desc: Check whether the entered value is a native external value type. - * @tc.author: wangjingwu */ it('testIsExternal004', 0, function() { var proc = new util.types(); @@ -5694,7 +5296,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsExternal005 * @tc.desc: Check whether the entered value is a native external value type. - * @tc.author: wangjingwu */ it('testIsExternal005', 0, function() { var proc = new util.types(); @@ -5705,7 +5306,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsFloat32Array001 * @tc.desc: Check whether the entered value is of float32array array type. - * @tc.author: wangjingwu */ it('testIsFloat32Array001', 0, function() { var proc = new util.types(); @@ -5716,7 +5316,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsFloat32Array002 * @tc.desc: Check whether the entered value is of float32array array type. - * @tc.author: wangjingwu */ it('testIsFloat32Array002', 0, function() { var proc = new util.types(); @@ -5727,7 +5326,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsFloat32Array003 * @tc.desc: Check whether the entered value is of float32array array type. - * @tc.author: wangjingwu */ it('testIsFloat32Array003', 0, function() { var proc = new util.types(); @@ -5738,7 +5336,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsFloat32Array004 * @tc.desc: Check whether the entered value is of float32array array type. - * @tc.author: wangjingwu */ it('testIsFloat32Array004', 0, function() { var proc = new util.types(); @@ -5749,7 +5346,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsFloat32Array005 * @tc.desc: Check whether the entered value is of float32array array type. - * @tc.author: wangjingwu */ it('testIsFloat32Array005', 0, function() { var proc = new util.types(); @@ -5760,7 +5356,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsFloat64Array001 * @tc.desc: Check whether the entered value is of float64array array type. - * @tc.author: wangjingwu */ it('testIsFloat64Array001', 0, function() { var proc = new util.types(); @@ -5771,7 +5366,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsFloat64Array002 * @tc.desc: Check whether the entered value is of float64array array type. - * @tc.author: wangjingwu */ it('testIsFloat64Array002', 0, function() { var proc = new util.types(); @@ -5782,7 +5376,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsFloat64Array003 * @tc.desc: Check whether the entered value is of float64array array type. - * @tc.author: wangjingwu */ it('testIsFloat64Array003', 0, function() { var proc = new util.types(); @@ -5793,7 +5386,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsFloat64Array004 * @tc.desc: Check whether the entered value is of float64array array type. - * @tc.author: wangjingwu */ it('testIsFloat64Array004', 0, function() { var proc = new util.types(); @@ -5804,7 +5396,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsFloat64Array005 * @tc.desc: Check whether the entered value is of float64array array type. - * @tc.author: wangjingwu */ it('testIsFloat64Array005', 0, function() { var proc = new util.types(); @@ -5815,7 +5406,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsGeneratorFunction001 * @tc.desc: Check whether the input value is a generator function type. - * @tc.author: wangjingwu */ it('testIsGeneratorFunction001', 0, function() { var proc = new util.types(); @@ -5826,7 +5416,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsGeneratorFunction002 * @tc.desc: Check whether the input value is a generator function type. - * @tc.author: wangjingwu */ it('testIsGeneratorFunction002', 0, function() { var proc = new util.types(); @@ -5837,7 +5426,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsGeneratorFunction003 * @tc.desc: Check whether the input value is a generator function type. - * @tc.author: wangjingwu */ it('testIsGeneratorFunction003', 0, function() { var proc = new util.types(); @@ -5848,7 +5436,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsGeneratorFunction004 * @tc.desc: Check whether the input value is a generator function type. - * @tc.author: wangjingwu */ it('testIsGeneratorFunction004', 0, function() { var proc = new util.types(); @@ -5859,7 +5446,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsGeneratorObject001 * @tc.desc: Check whether the entered value is a generator object type. - * @tc.author: bihu */ it('testIsGeneratorObject001', 0, function() { var proc = new util.types(); @@ -5870,7 +5456,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsGeneratorObject002 * @tc.desc: Check whether the entered value is a generator object type. - * @tc.author: bihu */ it('testIsGeneratorObject002', 0, function() { var proc = new util.types(); @@ -5881,7 +5466,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsGeneratorObject003 * @tc.desc: Check whether the entered value is a generator object type. - * @tc.author: bihu */ it('testIsGeneratorObject003', 0, function() { var proc = new util.types(); @@ -5892,7 +5476,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsGeneratorObject004 * @tc.desc: Check whether the entered value is a generator object type. - * @tc.author: bihu */ it('testIsGeneratorObject004', 0, function() { var proc = new util.types(); @@ -5903,7 +5486,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt8Array001 * @tc.desc: Check whether the entered value is of int8array array type. - * @tc.author: bihu */ it('testIsInt8Array001', 0, function() { var proc = new util.types(); @@ -5914,7 +5496,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt8Array002 * @tc.desc: Check whether the entered value is of int8array array type. - * @tc.author: bihu */ it('testIsInt8Array002', 0, function() { var proc = new util.types(); @@ -5925,7 +5506,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt8Array003 * @tc.desc: Check whether the entered value is of int8array array type. - * @tc.author: bihu */ it('testIsInt8Array003', 0, function() { var proc = new util.types(); @@ -5936,7 +5516,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt8Array004 * @tc.desc: Check whether the entered value is of int8array array type. - * @tc.author: bihu */ it('testIsInt8Array004', 0, function() { var proc = new util.types(); @@ -5947,7 +5526,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt8Array005 * @tc.desc: Check whether the entered value is of int8array array type. - * @tc.author: bihu */ it('testIsInt8Array005', 0, function() { var proc = new util.types(); @@ -5958,7 +5536,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt16Array001 * @tc.desc: Check whether the entered value is the int16array type. - * @tc.author: bihu */ it('testIsInt16Array001', 0, function() { var proc = new util.types(); @@ -5969,7 +5546,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt16Array002 * @tc.desc: Check whether the entered value is the int16array type. - * @tc.author: bihu */ it('testIsInt16Array002', 0, function() { var proc = new util.types(); @@ -5980,7 +5556,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt16Array003 * @tc.desc: Check whether the entered value is the int16array type. - * @tc.author: bihu */ it('testIsInt16Array003', 0, function() { var proc = new util.types(); @@ -5991,7 +5566,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt16Array004 * @tc.desc: Check whether the entered value is the int16array type. - * @tc.author: bihu */ it('testIsInt16Array004', 0, function() { var proc = new util.types(); @@ -6002,7 +5576,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt16Array005 * @tc.desc: Check whether the entered value is the int16array type. - * @tc.author: bihu */ it('testIsInt16Array005', 0, function() { var proc = new util.types(); @@ -6013,7 +5586,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt32Array001 * @tc.desc: Check whether the entered value is the int32array type. - * @tc.author: bihu */ it('testIsInt32Array001', 0, function() { var proc = new util.types(); @@ -6024,7 +5596,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt32Array002 * @tc.desc: Check whether the entered value is the int32array type. - * @tc.author: bihu */ it('testIsInt32Array002', 0, function() { var proc = new util.types(); @@ -6035,7 +5606,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt32Array003 * @tc.desc: Check whether the entered value is the int32array type. - * @tc.author: bihu */ it('testIsInt32Array003', 0, function() { var proc = new util.types(); @@ -6046,7 +5616,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt32Array004 * @tc.desc: Check whether the entered value is the int32array type. - * @tc.author: bihu */ it('testIsInt32Array004', 0, function() { var proc = new util.types(); @@ -6057,7 +5626,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsInt32Array005 * @tc.desc: Check whether the entered value is the int32array type. - * @tc.author: bihu */ it('testIsInt32Array005', 0, function() { var proc = new util.types(); @@ -6068,7 +5636,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsMap001 * @tc.desc: Check whether the entered value is of map type. - * @tc.author: bihu */ it('testIsMap001', 0, function() { var proc = new util.types(); @@ -6079,7 +5646,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsMap002 * @tc.desc: Check whether the entered value is of map type. - * @tc.author: bihu */ it('testIsMap002', 0, function() { var proc = new util.types(); @@ -6090,7 +5656,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsMap003 * @tc.desc: Check whether the entered value is of map type. - * @tc.author: bihu */ it('testIsMap003', 0, function() { var proc = new util.types(); @@ -6101,7 +5666,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsMap004 * @tc.desc: Check whether the entered value is of map type. - * @tc.author: bihu */ it('testIsMap004', 0, function() { var proc = new util.types(); @@ -6112,7 +5676,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsMap005 * @tc.desc: Check whether the entered value is of map type. - * @tc.author: bihu */ it('testIsMap005', 0, function() { var proc = new util.types(); @@ -6123,7 +5686,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsMapIterator001 * @tc.desc: Check whether the entered value is the iterator type of map. - * @tc.author: bihu */ it('testIsMapIterator001', 0, function() { var proc = new util.types(); @@ -6135,7 +5697,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsMapIterator002 * @tc.desc: Check whether the entered value is the iterator type of map. - * @tc.author: bihu */ it('testIsMapIterator002', 0, function() { var proc = new util.types(); @@ -6147,7 +5708,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsMapIterator003 * @tc.desc: Check whether the entered value is the iterator type of map. - * @tc.author: bihu */ it('testIsMapIterator003', 0, function() { var proc = new util.types(); @@ -6159,7 +5719,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsMapIterator004 * @tc.desc: Check whether the entered value is the iterator type of map. - * @tc.author: bihu */ it('testIsMapIterator004', 0, function() { var proc = new util.types(); @@ -6171,7 +5730,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsMapIterator005 * @tc.desc: Check whether the entered value is the iterator type of map. - * @tc.author: bihu */ it('testIsMapIterator005', 0, function() { var proc = new util.types(); @@ -6184,7 +5742,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsModuleNamespaceObject002 * @tc.desc: Check whether the entered value is the module namespace object object type. - * @tc.author: bihu */ it('testIsModuleNamespaceObject002', 0, function() { var proc = new util.types(); @@ -6195,7 +5752,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsModuleNamespaceObject003 * @tc.desc: Check whether the entered value is the module namespace object object type. - * @tc.author: bihu */ it('testIsModuleNamespaceObject003', 0, function() { var proc = new util.types(); @@ -6206,7 +5762,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsModuleNamespaceObject004 * @tc.desc: Check whether the entered value is the module namespace object object type. - * @tc.author: bihu */ it('testIsModuleNamespaceObject004', 0, function() { var proc = new util.types(); @@ -6217,7 +5772,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsModuleNamespaceObject005 * @tc.desc: Check whether the entered value is the module namespace object object type. - * @tc.author: bihu */ it('testIsModuleNamespaceObject005', 0, function() { var proc = new util.types(); @@ -6228,7 +5782,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsNativeError001 * @tc.desc: Check whether the value entered is of type error. - * @tc.author: bihu */ it('testIsNativeError001', 0, function() { var proc = new util.types(); @@ -6239,7 +5792,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsNativeError002 * @tc.desc: Check whether the value entered is of type error. - * @tc.author: bihu */ it('testIsNativeError002', 0, function() { var proc = new util.types(); @@ -6250,7 +5802,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsNativeError003 * @tc.desc: Check whether the value entered is of type error. - * @tc.author: bihu */ it('testIsNativeError003', 0, function() { var proc = new util.types(); @@ -6261,7 +5812,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsNativeError004 * @tc.desc: Check whether the value entered is of type error. - * @tc.author: bihu */ it('testIsNativeError004', 0, function() { var proc = new util.types(); @@ -6272,7 +5822,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsNativeError005 * @tc.desc: Check whether the value entered is of type error. - * @tc.author: bihu */ it('testIsNativeError005', 0, function() { var proc = new util.types(); @@ -6283,7 +5832,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsNumberObject001 * @tc.desc: Check whether the entered value is of the number object type. - * @tc.author: bihu */ it('testIsNumberObject001', 0, function() { var proc = new util.types(); @@ -6294,7 +5842,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsNumberObject002 * @tc.desc: Check whether the entered value is of the number object type. - * @tc.author: bihu */ it('testIsNumberObject002', 0, function() { var proc = new util.types(); @@ -6305,7 +5852,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsNumberObject003 * @tc.desc: Check whether the entered value is of the number object type. - * @tc.author: bihu */ it('testIsNumberObject003', 0, function() { var proc = new util.types(); @@ -6316,7 +5862,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsNumberObject004 * @tc.desc: Check whether the entered value is of the number object type. - * @tc.author: bihu */ it('testIsNumberObject004', 0, function() { var proc = new util.types(); @@ -6327,7 +5872,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsNumberObject005 * @tc.desc: Check whether the entered value is of the number object type. - * @tc.author: bihu */ it('testIsNumberObject005', 0, function() { var proc = new util.types(); @@ -6338,7 +5882,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsPromise001 * @tc.desc: Check whether the entered value is of promise type. - * @tc.author: bihu */ it('testIsPromise001', 0, function() { var proc = new util.types(); @@ -6349,7 +5892,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsPromise002 * @tc.desc: Check whether the entered value is of promise type. - * @tc.author: bihu */ it('testIsPromise002', 0, function() { var proc = new util.types(); @@ -6360,7 +5902,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsPromise003 * @tc.desc: Check whether the entered value is of promise type. - * @tc.author: bihu */ it('testIsPromise003', 0, function() { var proc = new util.types(); @@ -6371,7 +5912,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsPromise004 * @tc.desc: Check whether the entered value is of promise type. - * @tc.author: bihu */ it('testIsPromise004', 0, function() { var proc = new util.types(); @@ -6383,7 +5923,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsPromise005 * @tc.desc: Check whether the entered value is of promise type. - * @tc.author: bihu */ it('testIsPromise005', 0, function() { var proc = new util.types(); @@ -6395,7 +5934,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsProxy001 * @tc.desc: Check whether the value entered is of proxy type. - * @tc.author: bihu */ it('testIsProxy001', 0, function() { var proc = new util.types(); @@ -6408,7 +5946,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsProxy002 * @tc.desc: Check whether the value entered is of proxy type. - * @tc.author: bihu */ it('testIsProxy002', 0, function() { var proc = new util.types(); @@ -6421,7 +5958,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsProxy003 * @tc.desc: Check whether the value entered is of proxy type. - * @tc.author: bihu */ it('testIsProxy003', 0, function() { var proc = new util.types(); @@ -6438,7 +5974,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsProxy004 * @tc.desc: Check whether the value entered is of proxy type. - * @tc.author: bihu */ it('testIsProxy004', 0, function() { var proc = new util.types(); @@ -6455,7 +5990,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsProxy005 * @tc.desc: Check whether the value entered is of proxy type. - * @tc.author: bihu */ it('testIsProxy005', 0, function() { var proc = new util.types(); @@ -6472,7 +6006,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsRegExp001 * @tc.desc: Check whether the entered value is of type regexp. - * @tc.author: bihu */ it('testIsRegExp001', 0, function() { var proc = new util.types(); @@ -6483,7 +6016,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsRegExp002 * @tc.desc: Check whether the entered value is of type regexp. - * @tc.author: bihu */ it('testIsRegExp002', 0, function() { var proc = new util.types(); @@ -6494,7 +6026,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsRegExp003 * @tc.desc: Check whether the entered value is of type regexp. - * @tc.author: bihu */ it('testIsRegExp003', 0, function() { var proc = new util.types(); @@ -6505,7 +6036,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsRegExp004 * @tc.desc: Check whether the entered value is of type regexp. - * @tc.author: bihu */ it('testIsRegExp004', 0, function() { var proc = new util.types(); @@ -6516,7 +6046,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsRegExp005 * @tc.desc: Check whether the entered value is of type regexp. - * @tc.author: bihu */ it('testIsRegExp005', 0, function() { var proc = new util.types(); @@ -6527,7 +6056,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSet001 * @tc.desc: Check whether the entered value is of type set. - * @tc.author: bihu */ it('testIsSet001', 0, function() { var proc = new util.types(); @@ -6538,7 +6066,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSet002 * @tc.desc: Check whether the entered value is of type set. - * @tc.author: bihu */ it('testIsSet002', 0, function() { var proc = new util.types(); @@ -6549,7 +6076,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSet003 * @tc.desc: Check whether the entered value is of type set. - * @tc.author: bihu */ it('testIsSet003', 0, function() { var proc = new util.types(); @@ -6560,7 +6086,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSet004 * @tc.desc: Check whether the entered value is of type set. - * @tc.author: bihu */ it('testIsSet004', 0, function() { var proc = new util.types(); @@ -6571,7 +6096,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSet005 * @tc.desc: Check whether the entered value is of type set. - * @tc.author: bihu */ it('testIsSet005', 0, function() { var proc = new util.types(); @@ -6582,7 +6106,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSetIterator001 * @tc.desc: Check whether the entered value is the iterator type of set. - * @tc.author: bihu */ it('testIsSetIterator001', 0, function() { var proc = new util.types(); @@ -6594,7 +6117,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSetIterator002 * @tc.desc: Check whether the entered value is the iterator type of set. - * @tc.author: bihu */ it('testIsSetIterator002', 0, function() { var proc = new util.types(); @@ -6606,7 +6128,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSetIterator003 * @tc.desc: Check whether the entered value is the iterator type of set. - * @tc.author: bihu */ it('testIsSetIterator003', 0, function() { var proc = new util.types(); @@ -6618,7 +6139,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSetIterator004 * @tc.desc: Check whether the entered value is the iterator type of set. - * @tc.author: bihu */ it('testIsSetIterator004', 0, function() { var proc = new util.types(); @@ -6630,7 +6150,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSetIterator005 * @tc.desc: Check whether the entered value is the iterator type of set. - * @tc.author: bihu */ it('testIsSetIterator005', 0, function() { var proc = new util.types(); @@ -6642,7 +6161,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSharedArrayBuffer001 * @tc.desc: Check whether the entered value is of type sharedarraybuffer. - * @tc.author: bihu */ it('testIsSharedArrayBuffer001', 0, function() { var proc = new util.types(); @@ -6653,7 +6171,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSharedArrayBuffer002 * @tc.desc: Check whether the entered value is of type sharedarraybuffer. - * @tc.author: bihu */ it('testIsSharedArrayBuffer002', 0, function() { var proc = new util.types(); @@ -6664,7 +6181,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSharedArrayBuffer003 * @tc.desc: Check whether the entered value is of type sharedarraybuffer. - * @tc.author: bihu */ it('testIsSharedArrayBuffer003', 0, function() { var proc = new util.types(); @@ -6675,7 +6191,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSharedArrayBuffer004 * @tc.desc: Check whether the entered value is of type sharedarraybuffer. - * @tc.author: bihu */ it('testIsSharedArrayBuffer004', 0, function() { var proc = new util.types(); @@ -6686,7 +6201,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSharedArrayBuffer005 * @tc.desc: Check whether the entered value is of type sharedarraybuffer. - * @tc.author: bihu */ it('testIsSharedArrayBuffer005', 0, function() { var proc = new util.types(); @@ -6697,7 +6211,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsStringObject001 * @tc.desc: Check whether the entered value is a string object type. - * @tc.author: bihu */ it('testIsStringObject001', 0, function() { var proc = new util.types(); @@ -6708,7 +6221,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsStringObject002 * @tc.desc: Check whether the entered value is a string object type. - * @tc.author: bihu */ it('testIsStringObject002', 0, function() { var proc = new util.types(); @@ -6719,7 +6231,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsStringObject003 * @tc.desc: Check whether the entered value is a string object type. - * @tc.author: bihu */ it('testIsStringObject003', 0, function() { var proc = new util.types(); @@ -6730,7 +6241,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsStringObject004 * @tc.desc: Check whether the entered value is a string object type. - * @tc.author: bihu */ it('testIsStringObject004', 0, function() { var proc = new util.types(); @@ -6741,7 +6251,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsStringObject005 * @tc.desc: Check whether the entered value is a string object type. - * @tc.author: bihu */ it('testIsStringObject005', 0, function() { var proc = new util.types(); @@ -6752,7 +6261,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSymbolObject001 * @tc.desc: Check whether the entered value is a symbol object type. - * @tc.author: bihu */ it('testIsSymbolObject001', 0, function() { var proc = new util.types(); @@ -6764,7 +6272,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSymbolObject002 * @tc.desc: Check whether the entered value is a symbol object type. - * @tc.author: bihu */ it('testIsSymbolObject002', 0, function() { var proc = new util.types(); @@ -6776,7 +6283,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSymbolObject003 * @tc.desc: Check whether the entered value is a symbol object type. - * @tc.author: bihu */ it('testIsSymbolObject003', 0, function() { var proc = new util.types(); @@ -6788,7 +6294,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSymbolObject004 * @tc.desc: Check whether the entered value is a symbol object type. - * @tc.author: bihu */ it('testIsSymbolObject004', 0, function() { var proc = new util.types(); @@ -6800,7 +6305,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsSymbolObject005 * @tc.desc: Check whether the entered value is a symbol object type. - * @tc.author: bihu */ it('testIsSymbolObject005', 0, function() { var proc = new util.types(); @@ -6812,7 +6316,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsTypedArray001 * @tc.desc: Check whether the entered value is a type contained in typedarray. - * @tc.author: bihu */ it('testIsTypedArray001', 0, function() { var proc = new util.types(); @@ -6823,7 +6326,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsTypedArray002 * @tc.desc: Check whether the entered value is a type contained in typedarray. - * @tc.author: bihu */ it('testIsTypedArray002', 0, function() { var proc = new util.types(); @@ -6834,7 +6336,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsTypedArray003 * @tc.desc: Check whether the entered value is a type contained in typedarray. - * @tc.author: bihu */ it('testIsTypedArray003', 0, function() { var proc = new util.types(); @@ -6845,7 +6346,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsTypedArray004 * @tc.desc: Check whether the entered value is a type contained in typedarray. - * @tc.author: bihu */ it('testIsTypedArray004', 0, function() { var proc = new util.types(); @@ -6856,7 +6356,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsTypedArray005 * @tc.desc: Check whether the entered value is a type contained in typedarray. - * @tc.author: bihu */ it('testIsTypedArray005', 0, function() { var proc = new util.types(); @@ -6867,7 +6366,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint8Array001 * @tc.desc: Check whether the entered value is the uint8array array type. - * @tc.author: bihu */ it('testIsUint8Array001', 0, function() { var proc = new util.types(); @@ -6878,7 +6376,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint8Array002 * @tc.desc: Check whether the entered value is the uint8array array type. - * @tc.author: bihu */ it('testIsUint8Array002', 0, function() { var proc = new util.types(); @@ -6889,7 +6386,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint8Array003 * @tc.desc: Check whether the entered value is the uint8array array type. - * @tc.author: bihu */ it('testIsUint8Array003', 0, function() { var proc = new util.types(); @@ -6900,7 +6396,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint8Array004 * @tc.desc: Check whether the entered value is the uint8array array type. - * @tc.author: bihu */ it('testIsUint8Array004', 0, function() { var proc = new util.types(); @@ -6911,7 +6406,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint8Array005 * @tc.desc: Check whether the entered value is the uint8array array type. - * @tc.author: bihu */ it('testIsUint8Array005', 0, function() { var proc = new util.types(); @@ -6922,7 +6416,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint8ClampedArray001 * @tc.desc: Check whether the entered value is the uint8clapedarray array type. - * @tc.author: bihu */ it('testIsUint8ClampedArray001', 0, function() { var proc = new util.types(); @@ -6933,7 +6426,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint8ClampedArray002 * @tc.desc: Check whether the entered value is the uint8clapedarray array type. - * @tc.author: bihu */ it('testIsUint8ClampedArray002', 0, function() { var proc = new util.types(); @@ -6944,7 +6436,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint8ClampedArray003 * @tc.desc: Check whether the entered value is the uint8clapedarray array type. - * @tc.author: bihu */ it('testIsUint8ClampedArray003', 0, function() { var proc = new util.types(); @@ -6955,7 +6446,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint8ClampedArray004 * @tc.desc: Check whether the entered value is the uint8clapedarray array type. - * @tc.author: bihu */ it('testIsUint8ClampedArray004', 0, function() { var proc = new util.types(); @@ -6966,7 +6456,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint8ClampedArray005 * @tc.desc: Check whether the entered value is the uint8clapedarray array type. - * @tc.author: bihu */ it('testIsUint8ClampedArray005', 0, function() { var proc = new util.types(); @@ -6977,7 +6466,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint16Array001 * @tc.desc: Check whether the entered value is the uint16array array array type. - * @tc.author: bihu */ it('testIsUint16Array001', 0, function() { var proc = new util.types(); @@ -6988,7 +6476,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint16Array002 * @tc.desc: Check whether the entered value is the uint16array array array type. - * @tc.author: bihu */ it('testIsUint16Array002', 0, function() { var proc = new util.types(); @@ -6999,7 +6486,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint16Array003 * @tc.desc: Check whether the entered value is the uint16array array array type. - * @tc.author: bihu */ it('testIsUint16Array003', 0, function() { var proc = new util.types(); @@ -7010,7 +6496,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint16Array004 * @tc.desc: Check whether the entered value is the uint16array array array type. - * @tc.author: bihu */ it('testIsUint16Array004', 0, function() { var proc = new util.types(); @@ -7021,7 +6506,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint16Array005 * @tc.desc: Check whether the entered value is the uint16array array array type. - * @tc.author: bihu */ it('testIsUint16Array005', 0, function() { var proc = new util.types(); @@ -7032,7 +6516,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint32Array001 * @tc.desc: Check whether the entered value is the uint32array array type. - * @tc.author: bihu */ it('testIsUint32Array001', 0, function() { var proc = new util.types(); @@ -7043,7 +6526,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint32Array002 * @tc.desc: Check whether the entered value is the uint32array array type. - * @tc.author: bihu */ it('testIsUint32Array002', 0, function() { var proc = new util.types(); @@ -7054,7 +6536,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint32Array003 * @tc.desc: Check whether the entered value is the uint32array array type. - * @tc.author: bihu */ it('testIsUint32Array003', 0, function() { var proc = new util.types(); @@ -7065,7 +6546,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint32Array004 * @tc.desc: Check whether the entered value is the uint32array array type. - * @tc.author: bihu */ it('testIsUint32Array004', 0, function() { var proc = new util.types(); @@ -7076,7 +6556,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsUint32Array005 * @tc.desc: Check whether the entered value is the uint32array array type. - * @tc.author: bihu */ it('testIsUint32Array005', 0, function() { var proc = new util.types(); @@ -7087,7 +6566,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsWeakMap001 * @tc.desc: Check whether the entered value is of type weakmap. - * @tc.author: bihu */ it('testIsWeakMap001', 0, function() { var proc = new util.types(); @@ -7098,7 +6576,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsWeakMap002 * @tc.desc: Check whether the entered value is of type weakmap. - * @tc.author: bihu */ it('testIsWeakMap002', 0, function() { var proc = new util.types(); @@ -7109,7 +6586,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsWeakMap003 * @tc.desc: Check whether the entered value is of type weakmap. - * @tc.author: bihu */ it('testIsWeakMap003', 0, function() { var proc = new util.types(); @@ -7120,7 +6596,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsWeakMap004 * @tc.desc: Check whether the entered value is of type weakmap. - * @tc.author: bihu */ it('testIsWeakMap004', 0, function() { var proc = new util.types(); @@ -7131,7 +6606,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsWeakMap005 * @tc.desc: Check whether the entered value is of type weakmap. - * @tc.author: bihu */ it('testIsWeakMap005', 0, function() { var proc = new util.types(); @@ -7142,7 +6616,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsWeakSet001 * @tc.desc: Check whether the entered value is of type weakset. - * @tc.author: bihu */ it('testIsWeakSet001', 0, function() { var proc = new util.types(); @@ -7153,7 +6626,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsWeakSet002 * @tc.desc: Check whether the entered value is of type weakset. - * @tc.author: bihu */ it('testIsWeakSet002', 0, function() { var proc = new util.types(); @@ -7164,7 +6636,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsWeakSet003 * @tc.desc: Check whether the entered value is of type weakset. - * @tc.author: bihu */ it('testIsWeakSet003', 0, function() { var proc = new util.types(); @@ -7175,7 +6646,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsWeakSet004 * @tc.desc: Check whether the entered value is of type weakset. - * @tc.author: bihu */ it('testIsWeakSet004', 0, function() { var proc = new util.types(); @@ -7186,7 +6656,6 @@ describe('TypesTest', function() { /** * @tc.name: testIsWeakSet005 * @tc.desc: Check whether the entered value is of type weakset. - * @tc.author: bihu */ it('testIsWeakSet005', 0, function() { var proc = new util.types(); @@ -7197,7 +6666,6 @@ describe('TypesTest', function() { /** * @tc.name: testUtilRandomUUID001 * @tc.desc: Generate a random RFC 4122 version 4 UUID. - * @tc.author: linhaoran */ it('testUtilRandomUUID001', 0, async function () { var result = util.randomUUID(true); @@ -7207,7 +6675,6 @@ describe('TypesTest', function() { /** * @tc.name: testUtilRandomUUID002 * @tc.desc: Generate a random RFC 4122 version 4 UUID. - * @tc.author: linhaoran */ it('testUtilRandomUUID002', 0, async function () { var result = util.randomUUID(false); @@ -7217,7 +6684,6 @@ describe('TypesTest', function() { /** * @tc.name: testUtilRandomBinaryUUID001 * @tc.desc: Generate a random RFC 4122 version 4 UUID. - * @tc.author: linhaoran */ it('testUtilRandomBinaryUUID001', 0, async function () { var result = util.randomBinaryUUID(true); @@ -7227,7 +6693,6 @@ describe('TypesTest', function() { /** * @tc.name: testUtilRandomBinaryUUID002 * @tc.desc: Generate a random RFC 4122 version 4 UUID. - * @tc.author: linhaoran */ it('testUtilRandomBinaryUUID002', 0, async function () { var result = util.randomBinaryUUID(false); @@ -7237,7 +6702,6 @@ describe('TypesTest', function() { /** * @tc.name: testUtilParseUUID001 * @tc.desc: Generate a random RFC 4122 version 4 UUID. - * @tc.author: linhaoran */ it('testUtilParseUUID001', 0, async function () { var result = util.parseUUID('84bdf796-66cc-4655-9b89-d6218d100f9c'); @@ -7247,26 +6711,3863 @@ describe('TypesTest', function() { /** * @tc.name: testUtilParseUUID002 * @tc.desc: Generate a random RFC 4122 version 4 UUID. - * @tc.author: linhaoran */ it('testUtilParseUUID002', 0, async function () { try { var result = util.parseUUID('84df796-66cc-4655-9b89-d6218d100f9c'); } catch(e) { - expect(e.message).assertEqual('this uuid parsing failed'); + expect(e.message).assertEqual('Syntax Error.Invalid 84df796-66cc-4655-9b89-d6218d100f9c string'); } }) /** * @tc.name: testUtilParseUUID003 * @tc.desc: Generate a random RFC 4122 version 4 UUID. - * @tc.author: linhaoran */ it('testUtilParseUUID003', 0, async function () { try { var result = util.parseUUID('84Wdf796-66cc-4655-9b89-d6218d100f9c'); } catch(e) { - expect(e.message).assertEqual('this uuid parsing failed'); + expect(e.message).assertEqual('Syntax Error.Invalid 84Wdf796-66cc-4655-9b89-d6218d100f9c string'); + } + }) +}) + +describe('ScopeHelperTest', function () { + /** + * @tc.name: test_getLower_001 + * @tc.desc: Obtains the lower bound of the current range. + */ + it('test_getLower_001', 0, function () { + var result = rangeHp.getLower() + expect(result.toString()).assertEqual('30') + }) + + /** + * @tc.name: test_getLower_002 + * @tc.desc: Obtains the lower bound of the current range. + */ + it('test_getLower_002', 0, function () { + var result = rangeHpFir.getLower() + expect(result.toString()).assertEqual('35') + }) + + /** + * @tc.name: test_getLower_003 + * @tc.desc: Obtains the lower bound of the current range. + */ + it('test_getLower_003', 0, function () { + var result = rangeHpSec.getLower() + expect(result.toString()).assertEqual('20') + }) + + /** + * @tc.name: test_getLower_004 + * @tc.desc: Obtains the lower bound of the current range. + */ + it('test_getLower_004', 0, function () { + var result = rangeHpThi.getLower() + expect(result.toString()).assertEqual('20') + }) + + /** + * @tc.name: test_getLower_005 + * @tc.desc: Obtains the lower bound of the current range. + */ + it('test_getLower_005', 0, function () { + var result = rangeHpFif.getLower() + expect(result.toString()).assertEqual('35') + }) + + /** + * @tc.name: test_getUpper_001 + * @tc.desc: Obtains the upper bound of the current range. + */ + it('test_getUpper_001', 0, function () { + var result = rangeHp.getUpper() + expect(result.toString()).assertEqual('40') + }) + + /** + * @tc.name: test_getUpper_002 + * @tc.desc: Obtains the upper bound of the current range. + */ + it('test_getUpper_002', 0, function () { + var result = rangeHpFir.getUpper() + expect(result.toString()).assertEqual('39') + }) + + /** + * @tc.name: test_getUpper_003 + * @tc.desc: Obtains the upper bound of the current range. + */ + it('test_getUpper_003', 0, function () { + var result = rangeHpSec.getUpper() + expect(result.toString()).assertEqual('45') + }) + + /** + * @tc.name: test_getUpper_004 + * @tc.desc: Obtains the upper bound of the current range. + */ + it('test_getUpper_004', 0, function () { + var result = rangeHpThi.getUpper() + expect(result.toString()).assertEqual('35') + }) + + /** + * @tc.name: test_getUpper_005 + * @tc.desc: Obtains the upper bound of the current range. + */ + it('test_getUpper_005', 0, function () { + var result = rangeHpFif.getUpper() + expect(result.toString()).assertEqual('45') + }) + + /** + * @tc.name: test_clamp_001 + * @tc.desc: Clamps a given value to the current range. + */ + it('test_clamp_001', 0, function () { + var result = rangeHp.clamp(tempLess) + expect(result.toString()).assertEqual('30') + }) + + /** + * @tc.name: test_clamp_002 + * @tc.desc: Clamps a given value to the current range. + */ + it('test_clamp_002', 0, function () { + var result = rangeHp.clamp(tempMiDF) + expect(result.toString()).assertEqual('35') + }) + + /** + * @tc.name: test_clamp_003 + * @tc.desc: Clamps a given value to the current range. + */ + it('test_clamp_003', 0, function () { + var result = rangeHp.clamp(tempMore) + expect(result.toString()).assertEqual('40') + }) + + /** + * @tc.name: test_clamp_004 + * @tc.desc: Clamps a given value to the current range. + */ + it('test_clamp_004', 0, function () { + var result = rangeHp.clamp(tempLower) + expect(result.toString()).assertEqual('30') + }) + + /** + * @tc.name: test_clamp_005 + * @tc.desc: Clamps a given value to the current range. + */ + it('test_clamp_005', 0, function () { + var result = rangeHp.clamp(tempUpper) + expect(result.toString()).assertEqual('40') + }) + + /** + * @tc.name: test_contains_001 + * @tc.desc: Checks whether a given value is within the current range. + */ + it('test_contains_001', 0, function () { + var result = rangeHp.contains(tempLess) + expect(result).assertEqual(false) + }) + + /** + * @tc.name: test_contains_002 + * @tc.desc: Checks whether a given value is within the current range. + */ + it('test_contains_002', 0, function () { + var result = rangeHp.contains(tempMiDF) + expect(result).assertEqual(true) + }) + + /** + * @tc.name: test_contains_003 + * @tc.desc: Checks whether a given value is within the current range. + */ + it('test_contains_003', 0, function () { + var result = rangeHp.contains(tempMore) + expect(result).assertEqual(false) + }) + + /** + * @tc.name: test_contains_004 + * @tc.desc: Checks whether a given value is within the current range. + */ + it('test_contains_004', 0, function () { + var result = rangeHp.contains(tempLower) + expect(result).assertEqual(true) + }) + + /** + * @tc.name: test_contains_005 + * @tc.desc: Checks whether a given value is within the current range. + */ + it('test_contains_005', 0, function () { + var result = rangeHp.contains(tempUpper) + expect(result).assertEqual(true) + }) + + /** + * @tc.name: test_contains_006 + * @tc.desc: Checks whether a given range is within the current range. + */ + it('test_contains_006', 0, function () { + var result = rangeHp.contains(rangeHpFir) + expect(result).assertEqual(true) + }) + + /** + * @tc.name: test_contains_007 + * @tc.desc: Checks whether a given range is within the current range. + */ + it('test_contains_007', 0, function () { + var result = rangeHp.contains(rangeHpSec) + expect(result).assertEqual(false) + }) + + /** + * @tc.name: test_contains_008 + * @tc.desc: Checks whether a given range is within the current range. + */ + it('test_contains_008', 0, function () { + var result = rangeHp.contains(rangeHpThi) + expect(result).assertEqual(false) + }) + + /** + * @tc.name: test_contains_009 + * @tc.desc: Checks whether a given range is within the current range. + */ + it('test_contains_009', 0, function () { + var result = rangeHp.contains(rangeHpFif) + expect(result).assertEqual(false) + }) + + /** + * @tc.name: test_contains_010 + * @tc.desc: Checks whether a given range is within the current range. + */ + it('test_contains_010', 0, function () { + var result = rangeHp.contains(rangeHp) + expect(result).assertEqual(true) + }) + + /** + * @tc.name: test_expand_001 + * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. + */ + it('test_expand_001', 0, function () { + var result = rangeHp.expand(tempMiDF, tempMidS) + expect(result.toString()).assertEqual('[30, 40]') + }) + + /** + * @tc.name: test_expand_002 + * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. + */ + it('test_expand_002', 0, function () { + var result = rangeHp.expand(tempLess, tempMore) + expect(result.toString()).assertEqual('[20, 45]') + }) + + /** + * @tc.name: test_expand_003 + * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. + */ + it('test_expand_003', 0, function () { + var result = rangeHp.expand(tempLess, tempMiDF) + expect(result.toString()).assertEqual('[20, 40]') + }) + + /** + * @tc.name: test_expand_004 + * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. + */ + it('test_expand_004', 0, function () { + var result = rangeHp.expand(tempMiDF, tempMore) + expect(result.toString()).assertEqual('[30, 45]') + }) + + /** + * @tc.name: test_expand_005 + * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. + */ + it('test_expand_005', 0, function () { + var result = rangeHp.expand(tempLower, tempUpper) + expect(result.toString()).assertEqual('[30, 40]') + }) + + /** + * @tc.name: test_expand_006 + * @tc.desc: Creates the smallest range that includes the current range and a given range. + */ + it('test_expand_006', 0, function () { + var result = rangeHp.expand(rangeHpFir) + expect(result.toString()).assertEqual('[30, 40]') + }) + + /** + * @tc.name: test_expand_007 + * @tc.desc: Creates the smallest range that includes the current range and a given range. + */ + it('test_expand_007', 0, function () { + var result = rangeHp.expand(rangeHpSec) + expect(result.toString()).assertEqual('[20, 45]') + }) + + /** + * @tc.name: test_expand_008 + * @tc.desc: Creates the smallest range that includes the current range and a given range. + */ + it('test_expand_008', 0, function () { + var result = rangeHp.expand(rangeHpThi) + expect(result.toString()).assertEqual('[20, 40]') + }) + + /** + * @tc.name: test_expand_009 + * @tc.desc: Creates the smallest range that includes the current range and a given range. + */ + it('test_expand_009', 0, function () { + var result = rangeHp.expand(rangeHpFif) + expect(result.toString()).assertEqual('[30, 45]') + }) + + /** + * @tc.name: test_expand_010 + * @tc.desc: Creates the smallest range that includes the current range and a given range. + */ + it('test_expand_010', 0, function () { + var result = rangeHp.expand(rangeHp) + expect(result.toString()).assertEqual('[30, 40]') + }) + + /** + * @tc.name: test_expand_011 + * @tc.desc: Creates the smallest range that includes the current range and a given value. + */ + it('test_expand_011', 0, function () { + var result = rangeHp.expand(tempMiDF) + expect(result.toString()).assertEqual('[30, 40]') + }) + + /** + * @tc.name: test_expand_012 + * @tc.desc: Creates the smallest range that includes the current range and a given value. + */ + it('test_expand_012', 0, function () { + var result = rangeHp.expand(tempLess) + expect(result.toString()).assertEqual('[20, 40]') + }) + + /** + * @tc.name: test_expand_013 + * @tc.desc: Creates the smallest range that includes the current range and a given value. + */ + it('test_expand_013', 0, function () { + var result = rangeHp.expand(tempMore) + expect(result.toString()).assertEqual('[30, 45]') + }) + + /** + * @tc.name: test_expand_014 + * @tc.desc: Creates the smallest range that includes the current range and a given value. + */ + it('test_expand_014', 0, function () { + var result = rangeHp.expand(tempLower) + expect(result.toString()).assertEqual('[30, 40]') + }) + + /** + * @tc.name: test_expand_015 + * @tc.desc: Creates the smallest range that includes the current range and a given value. + */ + it('test_expand_015', 0, function () { + var result = rangeHp.expand(tempUpper) + expect(result.toString()).assertEqual('[30, 40]') + }) + + /** + * @tc.name: test_intersect_001 + * @tc.desc: Returns the intersection of a given range and the current range. + */ + it('test_intersect_001', 0, function () { + var result = rangeHp.intersect(rangeHpFir) + expect(result.toString()).assertEqual('[35, 39]') + }) + + /** + * @tc.name: test_intersect_002 + * @tc.desc: Returns the intersection of a given range and the current range. + */ + it('test_intersect_002', 0, function () { + var result = rangeHp.intersect(rangeHpSec) + expect(result.toString()).assertEqual('[30, 40]') + }) + + /** + * @tc.name: test_intersect_003 + * @tc.desc: Returns the intersection of a given range and the current range. + */ + it('test_intersect_003', 0, function () { + var result = rangeHp.intersect(rangeHpThi) + expect(result.toString()).assertEqual('[30, 35]') + }) + + /** + * @tc.name: test_intersect_004 + * @tc.desc: Returns the intersection of a given range and the current range. + */ + it('test_intersect_004', 0, function () { + var result = rangeHp.intersect(rangeHpFif) + expect(result.toString()).assertEqual('[35, 40]') + }) + + /** + * @tc.name: test_intersect_005 + * @tc.desc: Returns the intersection of a given range and the current range. + */ + it('test_intersect_005', 0, function () { + var result = rangeHp.intersect(rangeHp) + expect(result.toString()).assertEqual('[30, 40]') + }) + + /** + * @tc.name: test_intersect_006 + * @tc.desc: Returns the intersection of the current range and the range specified by + the given lower and upper bounds. + */ + it('test_intersect_006', 0, function () { + var result = rangeHp.intersect(tempMiDF, tempMidS) + expect(result.toString()).assertEqual('[35, 39]') + }) + + /** + * @tc.name: test_intersect_007 + * @tc.desc: Returns the intersection of the current range and the range specified by + the given lower and upper bounds. + */ + it('test_intersect_007', 0, function () { + var result = rangeHp.intersect(tempLess, tempMore) + expect(result.toString()).assertEqual('[30, 40]') + }) + + /** + * @tc.name: test_intersect_008 + * @tc.desc: Returns the intersection of the current range and the range specified by + the given lower and upper bounds. + */ + it('test_intersect_008', 0, function () { + var result = rangeHp.intersect(tempLess, tempMiDF) + expect(result.toString()).assertEqual('[30, 35]') + }) + + /** + * @tc.name: test_intersect_009 + * @tc.desc: Returns the intersection of the current range and the range specified by + the given lower and upper bounds. + */ + it('test_intersect_009', 0, function () { + var result = rangeHp.intersect(tempMiDF, tempMore) + expect(result.toString()).assertEqual('[35, 40]') + }) + + /** + * @tc.name: test_intersect_010 + * @tc.desc: Returns the intersection of the current range and the range specified by + the given lower and upper bounds. + */ + it('test_intersect_010', 0, function () { + var result = rangeHp.intersect(tempLower, tempUpper) + expect(result.toString()).assertEqual('[30, 40]') + }) + + /** + * @tc.name: test_toString_001 + * @tc.desc: Obtains a string representation of the current range. + */ + it('test_toString_001', 0, function () { + var result = rangeHp.toString() + expect(result.toString()).assertEqual('[30, 40]') + }) + + /** + * @tc.name: test_toString_002 + * @tc.desc: Obtains a string representation of the current range. + */ + it('test_toString_002', 0, function () { + var result = rangeHpFir.toString() + expect(result.toString()).assertEqual('[35, 39]') + }) + + /** + * @tc.name: test_toString_003 + * @tc.desc: Obtains a string representation of the current range. + */ + it('test_toString_003', 0, function () { + var result = rangeHpSec.toString() + expect(result.toString()).assertEqual('[20, 45]') + }) + + /** + * @tc.name: test_toString_004 + * @tc.desc: Obtains a string representation of the current range. + */ + it('test_toString_004', 0, function () { + var result = rangeHpThi.toString() + expect(result.toString()).assertEqual('[20, 35]') + }) + + /** + * @tc.name: test_toString_005 + * @tc.desc: Obtains a string representation of the current range. + */ + it('test_toString_005', 0, function () { + var result = rangeHpFif.toString() + expect(result.toString()).assertEqual('[35, 45]') + }) + + /** + * @tc.name: test_constructor_throwError_001 + * @tc.desc: A constructor used to create a Scope instance with the lower and upper bounds specified. + */ + it('test_constructor_throwError_001', 0, function () { + try { + var range = new util.ScopeHelper(1, 2); + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of 1 must be object"); + } + }) + + /** + * @tc.name: test_intersect_throwError_001 + * @tc.desc: Returns the intersection of a given range and the current range. + */ + it('test_intersect_throwError_001', 0, function () { + try { + var result = rangeHp.intersect("str") + expect(result.toString()).assertEqual('[35, 39]') + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of str must be ScopeHelper or ScopeType"); + } + }) + + /** + * @tc.name: test_intersect_throwError_002 + * @tc.desc: Returns the intersection of the current range and the range specified by + the given lower and upper bounds. + */ + it('test_intersect_throwError_002', 0, function () { + try { + var result = rangeHp.intersect(tempMiDF, 123) + expect(result.toString()).assertEqual('[35, 39]') + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of 123 must be ScopeType"); + } + }) + + /** + * @tc.name: test_expand_throwError_001 + * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. + */ + it('test_expand_throwError_001', 0, function () { + try { + var result = rangeHp.expand(tempMiDF, "123") + expect(result.toString()).assertEqual('[30, 40]') + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of 123 must be ScopeType"); + } + }) + + /** + * @tc.name: test_expand_throwError_002 + * @tc.desc: Creates the smallest range that includes the current range and a given range. + */ + it('test_expand_throwError_002', 0, function () { + try { + var result = rangeHp.expand(123) + expect(result.toString()).assertEqual('[30, 40]') + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of 123 must be ScopeHelper or ScopeType"); + } + }) + + /** + * @tc.name: test_contains_throwError_001 + * @tc.desc: Checks whether a given value is within the current range. + */ + it('test_contains_throwError_001', 0, function () { + try { + var result = rangeHp.contains("str") + expect(result).assertEqual(true) + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of str must be object or ScopeHelper"); + } + }) + + /** + * @tc.name: test_clamp_throwError_001 + * @tc.desc: Clamps a given value to the current range. + */ + it('test_clamp_throwError_001', 0, function () { + try { + var result = rangeHp.clamp(123) + expect(result.toString()).assertEqual('30') + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of 123 must be object"); + } + }) +}) + +describe('LRUCacheTest', function () { + /** + * @tc.name: testLRUCacheUpdateGetCapacity001 + * @tc.desc: Updates the buffer capacity to a specified capacity. + */ + it('testLRUCacheUpdateGetCapacity001', 0, function () { + var that = new util.LRUCache() + that.updateCapacity(10) + var result = that.getCapacity() + expect(result).assertEqual(10) + }) + + /** + * @tc.name: testLRUCacheUpdateGetCapacity002 + * @tc.desc: Updates the buffer capacity to a specified capacity. + */ + it('testLRUCacheUpdateGetCapacity002', 0, function () { + var that = new util.LRUCache() + that.updateCapacity(2147483646) + var result = that.getCapacity() + expect(result).assertEqual(2147483646) + }) + + /** + * @tc.name: testLRUCacheUpdateGetCapacity003 + * @tc.desc: Updates the buffer capacity to a specified capacity. + */ + it('testLRUCacheUpdateGetCapacity003', 0, function () { + var that = new util.LRUCache(100) + that.updateCapacity(20) + var result = that.getCapacity() + expect(result).assertEqual(20) + }) + + /** + * @tc.name: testLRUCacheUpdateGetCapacity004 + * @tc.desc: Updates the buffer capacity to a specified capacity. + */ + it('testLRUCacheUpdateGetCapacity004', 0, function () { + var that = new util.LRUCache(50) + that.updateCapacity(2) + var result = that.getCapacity() + expect(result).assertEqual(2) + }) + + /** + * @tc.name: testLRUCacheUpdateGetCapacity005 + * @tc.desc: Updates the buffer capacity to a specified capacity. + */ + it('testLRUCacheUpdateGetCapacity005', 0, function () { + var that = new util.LRUCache(200) + that.updateCapacity(100) + var result = that.getCapacity() + expect(result).assertEqual(100) + }) + + /** + * @tc.name: testLRUCacheGet001 + * @tc.desc: Obtains the value associated with a specified key. + */ + it('testLRUCacheGet001', 0, function () { + var that = new util.LRUCache(100) + that.put(1,2) + var result = that.get(1) + expect(result).assertEqual(2) + }) + + /** + * @tc.name: testLRUCacheGet002 + * @tc.desc: Obtains the value associated with a specified key. + */ + it('testLRUCacheGet002', 0, function () { + var that = new util.LRUCache(100) + that.put(1,2) + var result = that.get(5) + expect(result).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCacheGet003 + * @tc.desc: Obtains the value associated with a specified key. + */ + it('testLRUCacheGet003', 0, function () { + var that = new util.LRUCache(100) + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + var result1 = that.get(20) + var result2 = that.get('abcd') + var result3 = that.get(2) + expect(result1).assertEqual(undefined) + expect(result2).assertEqual(15) + expect(result3).assertEqual(10) + }) + + /** + * @tc.name: testLRUCacheGet004 + * @tc.desc: Obtains the value associated with a specified key. + */ + it('testLRUCacheGet004', 0, function () { + var that = new util.LRUCache() + that.put('1111','bcjdshc') + that.put(20,'cdjcaxb') + that.put('abcd',15) + var result1 = that.get('1111') + var result2 = that.get(20) + var result3 = that.get('abcd') + var result4 = that.get(25) + expect(result1).assertEqual('bcjdshc') + expect(result2).assertEqual('cdjcaxb') + expect(result3).assertEqual(15) + expect(result4).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCacheGet005 + * @tc.desc: Obtains the value associated with a specified key. + */ + it('testLRUCacheGet005', 0, function () { + var that = new util.LRUCache() + that.put('1111','bcjdshc') + that.put(20,'cdjcaxb') + that.updateCapacity(2) + that.put('abcd',15) + var result1 = that.get('1111') + var result2 = that.get(20) + var result3 = that.get('abcd') + var result4 = that.get(25) + expect(result1).assertEqual(undefined) + expect(result2).assertEqual('cdjcaxb') + expect(result3).assertEqual(15) + expect(result4).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCachePut001 + * @tc.desc: Adds a key-value pair to the buffer. + */ + it('testLRUCachePut001', 0, function () { + var that = new util.LRUCache() + var temp = that.put('1111','bcjdshc') + expect(temp).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCachePut002 + * @tc.desc: Adds a key-value pair to the buffer. + */ + it('testLRUCachePut002', 0, function () { + var that = new util.LRUCache() + var temp1 = that.put('1111','bcjdshc') + var temp2 = that.put('1111',13) + expect(temp2).assertEqual('bcjdshc') + }) + + /** + * @tc.name: testLRUCachePut003 + * @tc.desc: Adds a key-value pair to the buffer. + */ + it('testLRUCachePut003', 0, function () { + var that = new util.LRUCache() + var temp = that.put('1111','bcjdshc') + var temp1 = that.put(1,12) + var temp2 = that.put(2,5) + var temp3 = that.put(2,'adasfdad') + var temp4 = that.put('abc',10) + expect(temp1).assertEqual(undefined) + expect(temp2).assertEqual(undefined) + expect(temp3).assertEqual(5) + expect(temp4).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCachePut004 + * @tc.desc: Adds a key-value pair to the buffer. + */ + it('testLRUCachePut004', 0, function () { + var that = new util.LRUCache() + var temp = that.put('1111','bcjdshc') + var temp1 = that.put(1,12) + var temp2 = that.put(2,5) + that.updateCapacity(2) + var temp3 = that.put(2,'adasfdad') + var temp4 = that.put('1111',10) + expect(temp).assertEqual(undefined) + expect(temp1).assertEqual(undefined) + expect(temp2).assertEqual(undefined) + expect(temp3).assertEqual(5) + expect(temp4).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCachePut005 + * @tc.desc: Adds a key-value pair to the buffer. + */ + it('testLRUCachePut005', 0, function () { + var that = new util.LRUCache() + var temp = that.put('1111','bcjdshc') + var temp1 = that.put(1,12) + var temp2 = that.put(2,5) + var temp3 = that.put(1,10) + var temp4 = that.put(2,22) + var temp5 = that.put(2,30) + expect(temp).assertEqual(undefined) + expect(temp1).assertEqual(undefined) + expect(temp2).assertEqual(undefined) + expect(temp3).assertEqual(12) + expect(temp4).assertEqual(5) + expect(temp5).assertEqual(22) + }) + + /** + * @tc.name: testLRUCacheGetCreateCount001 + * @tc.desc: Obtains the number of times createDefault(Object) returned a value. + */ + it('testLRUCacheGetCreateCount001', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.get(3) + that.get(5) + that.get(10) + var result = that.getCreateCount() + expect(result).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheGetCreateCount002 + * @tc.desc: Obtains the number of times createDefault(Object) returned a value. + */ + it('testLRUCacheGetCreateCount002', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.get(6) + that.get(8) + that.get(20) + var result = that.getCreateCount() + expect(result).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheGetCreateCount003 + * @tc.desc: Obtains the number of times createDefault(Object) returned a value. + */ + it('testLRUCacheGetCreateCount003', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.get('abc') + that.get('cndk') + var result = that.getCreateCount() + expect(result).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheGetCreateCount004 + * @tc.desc: Obtains the number of times createDefault(Object) returned a value. + */ + it('testLRUCacheGetCreateCount004', 0, function () { + var that = new util.LRUCache() + that.put(5,2) + that.put(10,10) + that.put('abcd','abcd') + that.get(3) + that.get(20) + that.get(12) + var result = that.getCreateCount() + expect(result).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheGetCreateCount005 + * @tc.desc: Obtains the number of times createDefault(Object) returned a value. + */ + it('testLRUCacheGetCreateCount005', 0, function () { + var that = new util.LRUCache() + that.put('xsjk','bcjds') + that.put('ajc',10) + that.put('abcd',15) + that.get(2) + that.get(10) + that.get(30) + var result = that.getCreateCount() + expect(result).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheGetMissCount001 + * @tc.desc: Obtains the number of times that the queried values are not matched. + */ + it('testLRUCacheGetMissCount001', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.get(3) + that.get(5) + that.get(10) + var result = that.getMissCount() + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheGetMissCount002 + * @tc.desc: Obtains the number of times that the queried values are not matched. + */ + it('testLRUCacheGetMissCount002', 0, function () { + var that = new util.LRUCache() + that.put(5,2) + that.put(1,10) + that.put('abcd','bcjsc') + that.get(2) + that.get(10) + that.get(15) + var result = that.getMissCount() + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheGetMissCount003 + * @tc.desc: Obtains the number of times that the queried values are not matched. + */ + it('testLRUCacheGetMissCount003', 0, function () { + var that = new util.LRUCache() + that.put(10,10) + that.put(3,20) + that.put(12,16) + that.get(1) + that.get(2) + that.get(6) + var result = that.getMissCount() + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheGetMissCount004 + * @tc.desc: Obtains the number of times that the queried values are not matched. + */ + it('testLRUCacheGetMissCount004', 0, function () { + var that = new util.LRUCache() + that.put('acb','asdc') + that.put('vfb',1) + that.put('abcd','abcd') + that.get(3) + that.get(5) + that.get(10) + var result = that.getMissCount() + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheGetMissCount005 + * @tc.desc: Obtains the number of times that the queried values are not matched. + */ + it('testLRUCacheGetMissCount005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.get(3) + that.get(5) + that.get(10) + that.contains(2) + that.contains(6) + var result = that.getMissCount() + expect(result).assertEqual(4) + }) + + /** + * @tc.name: testLRUCacheGetMissCount006 + * @tc.desc: Obtains the number of times that the queried values are not matched. + */ + it('testLRUCacheGetMissCount006', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.get(1) + that.get(2) + that.get('abcd') + var result = that.getMissCount() + expect(result).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheGetRemovalCount001 + * @tc.desc: Obtains the number of times that values are evicted from the buffer. + */ + it('testLRUCacheGetRemovalCount001', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.put(3,20) + that.put(5,30) + var result = that.getRemovalCount() + expect(result).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheGetRemovalCount002 + * @tc.desc: Obtains the number of times that values are evicted from the buffer. + */ + it('testLRUCacheGetRemovalCount002', 0, function () { + var that = new util.LRUCache() + that.put(10,2) + that.put(3,2) + that.put(15,15) + that.put(1,20) + var result = that.getRemovalCount() + expect(result).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheGetRemovalCount003 + * @tc.desc: Obtains the number of times that values are evicted from the buffer. + */ + it('testLRUCacheGetRemovalCount003', 0, function () { + var that = new util.LRUCache() + that.put('abc',2) + that.put('abcd','abcd') + that.put(3,2) + var result = that.getRemovalCount() + expect(result).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheGetRemovalCount004 + * @tc.desc: Obtains the number of times that values are evicted from the buffer. + */ + it('testLRUCacheGetRemovalCount004', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.updateCapacity(2) + that.put(3,20) + that.put(5,30) + var result = that.getRemovalCount() + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheGetRemovalCount005 + * @tc.desc: Obtains the number of times that values are evicted from the buffer. + */ + it('testLRUCacheGetRemovalCount005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.updateCapacity(3) + that.put('string',20) + that.put('abc',30) + that.put(10,20) + var result = that.getRemovalCount() + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheGetMatchCount001 + * @tc.desc: Obtains the number of times that the queried values are successfully matched. + */ + it('testLRUCacheGetMatchCount001', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.get(1) + that.get(2) + that.get('abcd') + var result = that.getMatchCount() + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheGetMatchCount002 + * @tc.desc: Obtains the number of times that the queried values are successfully matched. + */ + it('testLRUCacheGetMatchCount002', 0, function () { + var that = new util.LRUCache() + that.put(10,2) + that.put(2,1) + that.put('abcd',15) + that.get(10) + that.get(2) + that.get('abcd') + that.get('string') + var result = that.getMatchCount() + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheGetMatchCount003 + * @tc.desc: Obtains the number of times that the queried values are successfully matched. + */ + it('testLRUCacheGetMatchCount003', 0, function () { + var that = new util.LRUCache() + that.put(0,1) + that.put(30,10) + that.put('abcd',15) + that.get(0) + that.get(30) + that.get('abcd') + var result = that.getMatchCount() + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheGetMatchCount004 + * @tc.desc: Obtains the number of times that the queried values are successfully matched. + */ + it('testLRUCacheGetMatchCount004', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.get(1) + that.get(2) + that.get('abcd') + that.contains(2) + that.contains('abcd') + that.contains(20) + var result = that.getMatchCount() + expect(result).assertEqual(5) + }) + + /** + * @tc.name: testLRUCacheGetMatchCount005 + * @tc.desc: Obtains the number of times that the queried values are successfully matched. + */ + it('testLRUCacheGetMatchCount005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.put('string','string') + that.get(1) + that.get(2) + that.get('abcd') + that.get('string') + that.contains(2) + that.contains('abcd') + that.contains('string') + that.contains(10) + var result = that.getMatchCount() + expect(result).assertEqual(7) + }) + + /** + * @tc.name: testLRUCacheGetMatchCount006 + * @tc.desc: Obtains the number of times that the queried values are successfully matched. + */ + it('testLRUCacheGetMatchCount006', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.get(5) + var result = that.getMatchCount() + expect(result).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheGetPutCount001 + * @tc.desc: Obtains the number of times that values are added to the buffer. + */ + it('testLRUCacheGetPutCount001', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + var result = that.getPutCount() + expect(result).assertEqual(1) + }) + + /** + * @tc.name: testLRUCacheGetPutCount002 + * @tc.desc: Obtains the number of times that values are added to the buffer. + */ + it('testLRUCacheGetPutCount002', 0, function () { + var that = new util.LRUCache() + that.put(5,3) + that.put(2,10) + var result = that.getPutCount() + expect(result).assertEqual(2) + }) + + /** + * @tc.name: testLRUCacheGetPutCount003 + * @tc.desc: Obtains the number of times that values are added to the buffer. + */ + it('testLRUCacheGetPutCount003', 0, function () { + var that = new util.LRUCache() + that.put('string',2) + that.put('abcd',1) + that.put('ab','a') + var result = that.getPutCount() + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheGetPutCount004 + * @tc.desc: Obtains the number of times that values are added to the buffer. + */ + it('testLRUCacheGetPutCount004', 0, function () { + var that = new util.LRUCache() + that.put('string','string') + that.put('ac','abc') + that.put('abcd',15) + var result = that.getPutCount() + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheGetPutCount005 + * @tc.desc: Obtains the number of times that values are added to the buffer. + */ + it('testLRUCacheGetPutCount005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.updateCapacity(2) + that.put('abcd','abc') + var result = that.getPutCount() + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheGetCapacity001 + * @tc.desc: Obtains the capacity of the current buffer. + */ + it('testLRUCacheGetCapacity001', 0, function () { + var that = new util.LRUCache() + var result = that.getCapacity() + expect(result).assertEqual(64) + }) + + /** + * @tc.name: testLRUCacheGetCapacity002 + * @tc.desc: Obtains the capacity of the current buffer. + */ + it('testLRUCacheGetCapacity002', 0, function () { + var that = new util.LRUCache(2) + var result = that.getCapacity() + expect(result).assertEqual(2) + }) + + /** + * @tc.name: testLRUCacheGetCapacity003 + * @tc.desc: Obtains the capacity of the current buffer. + */ + it('testLRUCacheGetCapacity003', 0, function () { + var that = new util.LRUCache(100) + var result = that.getCapacity() + expect(result).assertEqual(100) + }) + + /** + * @tc.name: testLRUCacheGetCapacity004 + * @tc.desc: Obtains the capacity of the current buffer. + */ + it('testLRUCacheGetCapacity004', 0, function () { + var that = new util.LRUCache() + that.updateCapacity(50) + var result = that.getCapacity() + expect(result).assertEqual(50) + }) + + /** + * @tc.name: testLRUCacheGetCapacity005 + * @tc.desc: Obtains the capacity of the current buffer. + */ + it('testLRUCacheGetCapacity005', 0, function () { + var that = new util.LRUCache(100) + that.updateCapacity(10) + var result = that.getCapacity() + expect(result).assertEqual(10) + }) + + /** + * @tc.name: testLRUCacheLength001 + * @tc.desc: Obtains the total number of values in the current buffer. + */ + it('testLRUCacheLength001', 0, function () { + var that = new util.LRUCache() + var result = that.length + expect(result).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheLength002 + * @tc.desc: Obtains the total number of values in the current buffer. + */ + it('testLRUCacheLength002', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + var result = that.length + expect(result).assertEqual(1) + }) + + /** + * @tc.name: testLRUCacheLength003 + * @tc.desc: Obtains the total number of values in the current buffer. + */ + it('testLRUCacheLength003', 0, function () { + var that = new util.LRUCache() + that.put('abc',2) + that.put('string','string') + var result = that.length + expect(result).assertEqual(2) + }) + + /** + * @tc.name: testLRUCacheLength004 + * @tc.desc: Obtains the total number of values in the current buffer. + */ + it('testLRUCacheLength004', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.put('abcd',20) + var result = that.length + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheLength005 + * @tc.desc: Obtains the total number of values in the current buffer. + */ + it('testLRUCacheLength005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put('abcd',15) + that.put('abcd',20) + that.updateCapacity(3); + that.put(5,33); + that.put(25,35); + var result = that.length + expect(result).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheClear001 + * @tc.desc: Clears key-value pairs from the current buffer. + */ + it('testLRUCacheClear001', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + var result1 = that.length + that.clear() + var result2 = that.length + expect(result1).assertEqual(1) + expect(result2).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheClear002 + * @tc.desc: Clears key-value pairs from the current buffer. + */ + it('testLRUCacheClear002', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put(5,33); + that.put(25,35); + var result1 = that.length + that.clear() + var result2 = that.length + expect(result1).assertEqual(4) + expect(result2).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheClear003 + * @tc.desc: Clears key-value pairs from the current buffer. + */ + it('testLRUCacheClear003', 0, function () { + var that = new util.LRUCache() + that.put('abc',2) + that.put(2,'abc') + that.put('ancd','abcd') + that.put(10,35) + var result1 = that.length + that.clear() + var result2 = that.length + expect(result1).assertEqual(4) + expect(result2).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheClear004 + * @tc.desc: Clears key-value pairs from the current buffer. + */ + it('testLRUCacheClear004', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put(5,33); + that.updateCapacity(3); + var result1 = that.length + that.clear() + var result2 = that.length + expect(result1).assertEqual(3) + expect(result2).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheClear005 + * @tc.desc: Clears key-value pairs from the current buffer. + */ + it('testLRUCacheClear005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put(5,33); + that.put('abcd','string'); + that.updateCapacity(2); + var result1 = that.length + that.clear() + var result2 = that.length + expect(result1).assertEqual(2) + expect(result2).assertEqual(0) + }) + + /** + * @tc.name: testLRUCacheIsEmpty001 + * @tc.desc: Checks whether the current buffer is empty. + */ + it('testLRUCacheIsEmpty001', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + var result = that.isEmpty() + expect(result).assertEqual(false) + }) + + /** + * @tc.name: testLRUCacheIsEmpty002 + * @tc.desc: Checks whether the current buffer is empty. + */ + it('testLRUCacheIsEmpty002', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + var result = that.isEmpty() + expect(result).assertEqual(false) + }) + + /** + * @tc.name: testLRUCacheIsEmpty003 + * @tc.desc: Checks whether the current buffer is empty. + */ + it('testLRUCacheIsEmpty003', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put(5,33) + var result = that.isEmpty() + expect(result).assertEqual(false) + }) + + /** + * @tc.name: testLRUCacheIsEmpty004 + * @tc.desc: Checks whether the current buffer is empty. + */ + it('testLRUCacheIsEmpty004', 0, function () { + var that = new util.LRUCache() + that.put('abc',2) + that.put('string',10) + that.put('ab','abc') + var result = that.isEmpty() + expect(result).assertEqual(false) + }) + + /** + * @tc.name: testLRUCacheIsEmpty005 + * @tc.desc: Checks whether the current buffer is empty. + */ + it('testLRUCacheIsEmpty005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(2,10) + that.put(5,33); + that.clear() + var result = that.isEmpty() + expect(result).assertEqual(true) + }) + + /** + * @tc.name: testLRUCacheContains001 + * @tc.desc: Checks whether the current buffer contains a specified key. + */ + it('testLRUCacheContains001', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + var result = that.contains(1) + expect(result).assertEqual(true) + }) + + /** + * @tc.name: testLRUCacheContains002 + * @tc.desc: Checks whether the current buffer contains a specified key. + */ + it('testLRUCacheContains002', 0, function () { + var that = new util.LRUCache() + that.put(0,5) + var result = that.contains(0) + expect(result).assertEqual(true) + }) + + /** + * @tc.name: testLRUCacheContains003 + * @tc.desc: Checks whether the current buffer contains a specified key. + */ + it('testLRUCacheContains003', 0, function () { + var that = new util.LRUCache() + that.put('abc','abc') + var result = that.contains(1) + expect(result).assertEqual(false) + }) + + /** + * @tc.name: testLRUCacheContains004 + * @tc.desc: Checks whether the current buffer contains a specified key. + */ + it('testLRUCacheContains004', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put('abcd',20) + var result1 = that.contains(1) + var result2 = that.contains(20) + expect(result1).assertEqual(true) + expect(result2).assertEqual(false) + }) + + /** + * @tc.name: testLRUCacheContains005 + * @tc.desc: Checks whether the current buffer contains a specified key. + */ + it('testLRUCacheContains005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put('string','string') + var result1 = that.contains(1) + var result2 = that.contains('string') + var result3 = that.contains(0) + expect(result1).assertEqual(true) + expect(result2).assertEqual(true) + expect(result3).assertEqual(false) + }) + + /** + * @tc.name: testLRUCacheRemove001 + * @tc.desc: Deletes a specified key and its associated value from the current buffer. + */ + it('testLRUCacheRemove001', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + var result = that.remove(1) + expect(result).assertEqual(2) + }) + + /** + * @tc.name: testLRUCacheRemove002 + * @tc.desc: Deletes a specified key and its associated value from the current buffer. + */ + it('testLRUCacheRemove002', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put('abcd',20) + var result1 = that.remove(1) + var result2 = that.remove('abcd') + expect(result1).assertEqual(2) + expect(result2).assertEqual(20) + }) + + /** + * @tc.name: testLRUCacheRemove003 + * @tc.desc: Deletes a specified key and its associated value from the current buffer. + */ + it('testLRUCacheRemove003', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + var result1 = that.remove(1) + var result2 = that.remove(5) + expect(result1).assertEqual(2) + expect(result2).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCacheRemove004 + * @tc.desc: Deletes a specified key and its associated value from the current buffer. + */ + it('testLRUCacheRemove004', 0, function () { + var that = new util.LRUCache() + that.put(0,'abc') + that.put('abcd',20) + var result1 = that.remove(1) + var result2 = that.remove('abcd') + expect(result1).assertEqual(undefined) + expect(result2).assertEqual(20) + }) + + /** + * @tc.name: testLRUCacheRemove005 + * @tc.desc: Deletes a specified key and its associated value from the current buffer. + */ + it('testLRUCacheRemove005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + var result1 = that.remove(1) + var result2 = that.remove(3) + var result3 = that.get(3) + expect(result1).assertEqual(2) + expect(result2).assertEqual(10) + expect(result3).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCacheCreateDefault001 + * @tc.desc: Executes subsequent operations if miss to compute a value for the specific key. + */ + it('testLRUCacheCreateDefault001', 0, function () { + var that = new util.LRUCache() + var result = that.createDefault(1) + expect(result).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCacheCreateDefault002 + * @tc.desc: Executes subsequent operations if miss to compute a value for the specific key. + */ + it('testLRUCacheCreateDefault002', 0, function () { + var that = new util.LRUCache() + var result = that.createDefault(0) + expect(result).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCacheCreateDefault003 + * @tc.desc: Executes subsequent operations if miss to compute a value for the specific key. + */ + it('testLRUCacheCreateDefault003', 0, function () { + var that = new util.LRUCache() + var result = that.createDefault('string') + expect(result).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCacheCreateDefault004 + * @tc.desc: Executes subsequent operations if miss to compute a value for the specific key. + */ + it('testLRUCacheCreateDefault004', 0, function () { + var that = new util.LRUCache() + var result = that.createDefault(10) + expect(result).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCacheCreateDefault005 + * @tc.desc: Executes subsequent operations if miss to compute a value for the specific key. + */ + it('testLRUCacheCreateDefault005', 0, function () { + var that = new util.LRUCache() + var result1 = that.createDefault('abc') + var result2 = that.createDefault('ab') + expect(result1).assertEqual(undefined) + expect(result2).assertEqual(undefined) + }) + + /** + * @tc.name: testLRUCacheKeys001 + * @tc.desc: Obtains a list of keys for the values in the current buffer. + */ + it('testLRUCacheKeys001', 0, function () { + var that = new util.LRUCache() + that.put('string','abc') + var result = that.keys() + expect(result[0]).assertEqual('string') + }) + + /** + * @tc.name: testLRUCacheKeys002 + * @tc.desc: Obtains a list of keys for the values in the current buffer. + */ + it('testLRUCacheKeys002', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + var result = that.keys() + expect(result[0]).assertEqual(1) + expect(result[1]).assertEqual(3) + expect(result[2]).assertEqual(5) + expect(result[3]).assertEqual('abc') + }) + + /** + * @tc.name: testLRUCacheKeys003 + * @tc.desc: Obtains a list of keys for the values in the current buffer. + */ + it('testLRUCacheKeys003', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + var result = that.keys() + expect(result[0]).assertEqual(1) + expect(result[1]).assertEqual(5) + expect(result[2]).assertEqual('abc') + expect(result[3]).assertEqual(3) + }) + + /** + * @tc.name: testLRUCacheKeys004 + * @tc.desc: Obtains a list of keys for the values in the current buffer. + */ + it('testLRUCacheKeys004', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + that.contains(1) + var result = that.keys() + expect(result[0]).assertEqual(5) + expect(result[1]).assertEqual('abc') + expect(result[2]).assertEqual(3) + expect(result[3]).assertEqual(1) + }) + + /** + * @tc.name: testLRUCacheKeys005 + * @tc.desc: Obtains a list of keys for the values in the current buffer. + */ + it('testLRUCacheKeys005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + that.remove(5) + that.contains(3) + that.get(1) + that.contains('abc') + var result = that.keys() + expect(result[0]).assertEqual(3) + expect(result[1]).assertEqual(1) + expect(result[2]).assertEqual('abc') + }) + + /** + * @tc.name: testLRUCacheValues001 + * @tc.desc: Obtains a list of all values in the current buffer. + */ + it('testLRUCacheValues001', 0, function () { + var that = new util.LRUCache() + that.put('string','abc') + var result = that.values() + expect(result[0]).assertEqual('abc') + }) + + /** + * @tc.name: testLRUCacheValues002 + * @tc.desc: Obtains a list of all values in the current buffer. + */ + it('testLRUCacheValues002', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + var result = that.values() + expect(result[0]).assertEqual(2) + expect(result[1]).assertEqual(10) + expect(result[2]).assertEqual(15) + expect(result[3]).assertEqual(20) + }) + + /** + * @tc.name: testLRUCacheValues003 + * @tc.desc: Obtains a list of all values in the current buffer. + */ + it('testLRUCacheValues003', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + var result = that.values() + expect(result[0]).assertEqual(2) + expect(result[1]).assertEqual(15) + expect(result[2]).assertEqual(20) + expect(result[3]).assertEqual(10) + }) + + /** + * @tc.name: testLRUCacheValues004 + * @tc.desc: Obtains a list of all values in the current buffer. + */ + it('testLRUCacheValues004', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + that.contains(1) + var result = that.values() + expect(result[0]).assertEqual(15) + expect(result[1]).assertEqual(20) + expect(result[2]).assertEqual(10) + expect(result[3]).assertEqual(2) + }) + + /** + * @tc.name: testLRUCacheValues005 + * @tc.desc: Obtains a list of all values in the current buffer. + */ + it('testLRUCacheValues005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + that.remove(5) + that.contains(3) + that.get(1) + that.contains('abc') + var result = that.values() + expect(result[0]).assertEqual(10) + expect(result[1]).assertEqual(2) + expect(result[2]).assertEqual(20) + }) + + /** + * @tc.name: testLRUCacheToString001 + * @tc.desc: Returns a string representation of the object. + */ + it('testLRUCacheToString001', 0, function () { + var that = new util.LRUCache() + that.put('1111','bcjdshc') + that.put(1,2) + var result = that.toString() + expect(result).assertEqual('LRUCache[ maxSize = 64, hits = 0, misses = 0, hitRate = 0% ]') + }) + + /** + * @tc.name: testLRUCacheToString002 + * @tc.desc: Returns a string representation of the object. + */ + it('testLRUCacheToString002', 0, function () { + var that = new util.LRUCache() + that.put('1111','bcjdshc') + that.put(1,2) + that.get(1) + that.get('1111') + var result = that.toString() + expect(result).assertEqual('LRUCache[ maxSize = 64, hits = 2, misses = 0, hitRate = 100% ]') + }) + + /** + * @tc.name: testLRUCacheToString003 + * @tc.desc: Returns a string representation of the object. + */ + it('testLRUCacheToString003', 0, function () { + var that = new util.LRUCache(100) + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + var result = that.toString() + expect(result).assertEqual('LRUCache[ maxSize = 100, hits = 1, misses = 0, hitRate = 100% ]') + }) + + /** + * @tc.name: testLRUCacheToString004 + * @tc.desc: Returns a string representation of the object. + */ + it('testLRUCacheToString004', 0, function () { + var that = new util.LRUCache(100) + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + that.get(2) + var result = that.toString() + expect(result).assertEqual('LRUCache[ maxSize = 100, hits = 1, misses = 1, hitRate = 50% ]') + }) + + /** + * @tc.name: testLRUCacheToString005 + * @tc.desc: Returns a string representation of the object. + */ + it('testLRUCacheToString005', 0, function () { + var that = new util.LRUCache(100) + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + that.get(2) + that.get(1) + that.contains(5) + var result = that.toString() + expect(result).assertEqual('LRUCache[ maxSize = 100, hits = 3, misses = 1, hitRate = 75% ]') + }) + + /** + * @tc.name: testLRUCacheEntries001 + * @tc.desc: Returns an array of key-value pairs of enumeratable properties of a given object. + */ + it('testLRUCacheEntries001', 0, function () { + var that = new util.LRUCache() + that.put('string','abc') + var i=0; + var arr={}; + for (let entry of that.entries()) { + arr[i]=entry[0]; + i++; + arr[i]=entry[1]; + i++; + } + expect(arr[1]).assertEqual('abc'); + }) + + /** + * @tc.name: testLRUCacheEntries002 + * @tc.desc: Returns an array of key-value pairs of enumeratable properties of a given object. + */ + it('testLRUCacheEntries002', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + var i=0; + var arr={}; + for (let entry of that.entries()) { + arr[i]=entry[0]; + i++; + arr[i]=entry[1]; + i++; + } + expect(arr[1]).assertEqual(2); + }) + + /** + * @tc.name: testLRUCacheEntries003 + * @tc.desc: Returns an array of key-value pairs of enumeratable properties of a given object. + */ + it('testLRUCacheEntries003', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + var i=0; + var arr={}; + for (let entry of that.entries()) { + arr[i]=entry[0]; + i++; + arr[i]=entry[1]; + i++; + } + expect(arr[0]).assertEqual(1); + }) + + /** + * @tc.name: testLRUCacheEntries004 + * @tc.desc: Returns an array of key-value pairs of enumeratable properties of a given object. + */ + it('testLRUCacheEntries004', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + that.contains(1) + var i=0; + var arr={}; + for (let entry of that.entries()) { + arr[i]=entry[0]; + i++; + arr[i]=entry[1]; + i++; + } + expect(arr[1]).assertEqual(15) + expect(arr[3]).assertEqual(20) + }) + + /** + * @tc.name: testLRUCacheEntries005 + * @tc.desc: Returns an array of key-value pairs of enumeratable properties of a given object. + */ + it('testLRUCacheEntries005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + that.remove(5) + that.contains(3) + that.get(1) + that.contains('abc') + var i=0; + var arr={}; + for (let entry of that.entries()) { + arr[i]=entry[0]; + i++; + arr[i]=entry[1]; + i++; + } + expect(arr[1]).assertEqual(10) + expect(arr[3]).assertEqual(2) + expect(arr[5]).assertEqual(20) + }) + + /** + * @tc.name: testLRUCache[Symbol.iterator]001 + * @tc.desc: Returns a two - dimensional array in the form of key - value pairs. + */ + it('testLRUCache[Symbol.iterator]001', 0, function () { + var that = new util.LRUCache() + that.put('string','abc') + that.put('abc',20) + var i=0; + var arr={}; + for (let entry of that[Symbol.iterator]()) { + arr[i]=entry[0]; + i++; + arr[i]=entry[1]; + i++; + } + expect(arr[1]).assertEqual('abc'); + }) + + /** + * @tc.name: testLRUCache[Symbol.iterator]002 + * @tc.desc: Returns a two - dimensional array in the form of key - value pairs. + */ + it('testLRUCache[Symbol.iterator]002', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + var i=0; + var arr={}; + for (let entry of that[Symbol.iterator]()) { + arr[i]=entry[0]; + i++; + arr[i]=entry[1]; + i++; + } + expect(arr[1]).assertEqual(2); + }) + + /** + * @tc.name: testLRUCache[Symbol.iterator]003 + * @tc.desc: Returns a two - dimensional array in the form of key - value pairs. + */ + it('testLRUCache[Symbol.iterator]003', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + var i=0; + var arr={}; + for (let entry of that[Symbol.iterator]()) { + arr[i]=entry[0]; + i++; + arr[i]=entry[1]; + i++; + } + expect(arr[0]).assertEqual(1); + }) + + /** + * @tc.name: testLRUCache[Symbol.iterator]004 + * @tc.desc: Returns a two - dimensional array in the form of key - value pairs. + */ + it('testLRUCache[Symbol.iterator]004', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + that.contains(1) + var i=0; + var arr={}; + for (let entry of that[Symbol.iterator]()) { + arr[i]=entry[0]; + i++; + arr[i]=entry[1]; + i++; + } + expect(arr[1]).assertEqual(15) + expect(arr[3]).assertEqual(20) + }) + + /** + * @tc.name: testLRUCache[Symbol.iterator]005 + * @tc.desc: Returns a two - dimensional array in the form of key - value pairs. + */ + it('testLRUCache[Symbol.iterator]005', 0, function () { + var that = new util.LRUCache() + that.put(1,2) + that.put(3,10) + that.put(5,15) + that.put('abc',20) + that.get(3) + that.remove(5) + that.contains(3) + that.get(1) + that.contains('abc') + var i=0; + var arr={}; + for (let entry of that[Symbol.iterator]()) { + arr[i]=entry[0]; + i++; + arr[i]=entry[1]; + i++; + } + expect(arr[1]).assertEqual(10) + expect(arr[3]).assertEqual(2) + expect(arr[5]).assertEqual(20) + }) + + /** + * @tc.name: testLRUCacheAfterRemoval001 + * @tc.desc: Executes subsequent operations after a value is deleted. + */ + it('testLRUCacheAfterRemoval001', 0, function () { + var arr = []; + class ChildLRUCache extends util.LRUCache + { + constructor() + { + super(); + } + static getInstance() + { + if(this.instance == null) + { + this.instance = new ChildLRUCache(); + } + return this.instance; + } + afterRemoval(isEvict, key, value, newValue) + { + if (isEvict === false) + { + arr = [key, value, newValue]; + } + } + } + ChildLRUCache.getInstance().afterRemoval(false,10,30,null) + expect(arr[0]).assertEqual(10) + }) + + /** + * @tc.name: testLRUCacheAfterRemoval002 + * @tc.desc: Executes subsequent operations after a value is deleted. + */ + it('testLRUCacheAfterRemoval002', 0, function () { + var arr = []; + class ChildLRUCache extends util.LRUCache + { + constructor() + { + super(); + } + static getInstance() + { + if(this.instance == null) + { + this.instance = new ChildLRUCache(); + } + return this.instance; + } + afterRemoval(isEvict, key, value, newValue) + { + if (isEvict === false) + { + arr = [key, value, newValue]; + } + } + } + ChildLRUCache.getInstance().afterRemoval(false,'string',10,null) + expect(arr[0]).assertEqual('string') + }) + + /** + * @tc.name: testLRUCacheAfterRemoval003 + * @tc.desc: Executes subsequent operations after a value is deleted. + */ + it('testLRUCacheAfterRemoval003', 0, function () { + var arr = []; + class ChildLRUCache extends util.LRUCache + { + constructor() + { + super(); + } + static getInstance() + { + if(this.instance == null) + { + this.instance = new ChildLRUCache(); + } + return this.instance; + } + afterRemoval(isEvict, key, value, newValue) + { + if (isEvict === false) + { + arr = [key, value, newValue]; + } + } + } + ChildLRUCache.getInstance().afterRemoval(false,10,30,12) + expect(arr[2]).assertEqual(12) + }) + + /** + * @tc.name: testLRUCacheAfterRemoval004 + * @tc.desc: Executes subsequent operations after a value is deleted. + */ + it('testLRUCacheAfterRemoval004', 0, function () { + var arr = []; + class ChildLRUCache extends util.LRUCache + { + constructor() + { + super(); + } + static getInstance() + { + if(this.instance == null) + { + this.instance = new ChildLRUCache(); + } + return this.instance; + } + afterRemoval(isEvict, key, value, newValue) + { + if (isEvict === false) + { + arr = [key, value, newValue]; + } + } + } + ChildLRUCache.getInstance().afterRemoval(false,'abc',30,'string') + expect(arr[1]).assertEqual(30) + }) + + /** + * @tc.name: testLRUCacheAfterRemoval005 + * @tc.desc: Executes subsequent operations after a value is deleted. + */ + it('testLRUCacheAfterRemoval005', 0, function () { + var arr = []; + class ChildLRUCache extends util.LRUCache + { + constructor() + { + super(); + } + static getInstance() + { + if(this.instance == null) + { + this.instance = new ChildLRUCache(); + } + return this.instance; + } + afterRemoval(isEvict, key, value, newValue) + { + if (isEvict === true) + { + arr = [key, value, newValue]; + } + } + } + ChildLRUCache.getInstance().afterRemoval(true,'abc','ab','string') + expect(arr[2]).assertEqual('string') + }) +}) + +describe('FunctionTest', function () { + /** + * @tc.name: testUtilformat001 + * @tc.desc: Returns the formatted string. + */ + it('testUtilformat001', 0, function () { + var format = "%i,%s"; + var value1 = 1.5; + var value2 = "qwer"; + var value3 = 15; + var result = util.format(format, value1, value2, value3); + expect(result).assertEqual("1,qwer 15"); + }) + + /** + * @tc.name: testUtilformat002 + * @tc.desc: Returns the formatted string. + */ + it('testUtilformat002', 0, function () { + var format = "%O"; + var value = { name: 'jack' ,age: 15 }; + var result = util.format(format, value); + expect(result).assertEqual("{ name: 'jack',\n age: 15 }"); + }) + + /** + * @tc.name: testUtilformat003 + * @tc.desc: Returns the formatted string. + */ + it('testUtilformat003', 0, function () { + var format = "%o"; + var value = [1, 2, 3]; + var result = util.format(format, value); + var res = '[ 1, 2, 3, [length]: 3 ]' + expect(result).assertEqual('[ 1, 2, 3, [length]: 3 ]'); + }) + + /** + * @tc.name: testUtilformat004 + * @tc.desc: Returns the formatted string. + */ + it('testUtilformat004', 0, function () { + var format = "%s,%s,%s"; + var value1 = "1.5"; + var value2 = "qwer"; + var result = util.format(format, value1, value2); + expect(result).assertEqual('1.5,qwer,%s'); + }) + + /** + * @tc.name: testUtilformat005 + * @tc.desc: Returns the formatted string. + */ + it('testUtilformat005', 0, function () { + var format = "%d,%d"; + var value1 = 6; + var value2 = 16; + var result = util.format(format, value1, value2); + expect(result).assertEqual('6,16'); + }) + + /** + * @tc.name: testUtilformat001 + * @tc.desc: Returns the formatted string. + */ + it('testUtilformatThrowError001', 0, function () { + try { + var format = 123; + var value1 = 1.5; + var value2 = "qwer"; + var value3 = 15; + var result = util.format(format, value1, value2, value3); + expect(result).assertEqual("1,qwer 15"); + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of 123 must be string or array"); + } + }) + + /** + * @tc.name: testUtilerrnoToString001 + * @tc.desc: Get the string name of the system errno. + */ + it('testUtilerrnoToString001', 0, async function () { + var errnum = 10; + var result = util.errnoToString(errnum); + expect(result).assertEqual('Unknown system error 10'); + }) + + /** + * @tc.name: testUtilerrnoToString002 + * @tc.desc: Get the string name of the system errno. + */ + it('testUtilerrnoToString002', 0, async function () { + var errnum = 0; + var result = util.errnoToString(errnum); + expect(result).assertEqual('Unknown system error 0'); + }) + + /** + * @tc.name: testUtilerrnoToString003 + * @tc.desc: Get the string name of the system errno. + */ + it('testUtilerrnoToString003', 0, async function () { + var errnum = -1; + var result = util.errnoToString(errnum); + expect(result).assertEqual('operation not permitted'); + }) + + /** + * @tc.name: testUtilerrnoToString004 + * @tc.desc: Get the string name of the system errno. + */ + it('testUtilerrnoToString004', 0, async function () { + var errnum = 9; + var result = util.errnoToString(errnum); + expect(result).assertEqual('Unknown system error 9'); + }) + + /** + * @tc.name: testUtilerrnoToString005 + * @tc.desc: Get the string name of the system errno. + */ + it('testUtilerrnoToString005', 0, async function () { + var errnum = 555; + var result = util.errnoToString(errnum); + expect(result).assertEqual('Unknown system error 555'); + }) + + /** + * @tc.name: testUtilerrnoToStringThrowError001 + * @tc.desc: Get the string name of the system errno. + */ + it('testUtilerrnoToStringThrowError001', 0, async function () { + try { + var errnum = 'str'; + var result = util.errnoToString(errnum); + expect(result).assertEqual('Unknown system error 10'); + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of str must be number"); + } + }) + + /** + * @tc.name: testUtilPromisifyThrowError001 + * @tc.desc: Takes a function following the common error-first callback style, + taking an callback as the last argument, and return a function that returns promises. + */ + it('testUtilPromisifyThrowError001', 0, async function () { + try { + var fn = 'str'; + (async () => { + const value = await util.promisify(fn); + expect(value(null, "Hello")).strictEqual('Hello'); + })(); + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of fn must be function"); + } + }) + + /** + * @tc.name: testUtilRandomUUIDThrowError001 + * @tc.desc: Generate a random RFC 4122 version 4 UUID. + */ + + it('testUtilRandomUUIDThrowError001', 0, async function () { + try { + var result = util.randomUUID(123); + expect(result.length).assertEqual(36); + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of 123 must be boolean"); + } + }) + + /** + * @tc.name: testUtilRandomBinaryUUIDThrowError001 + * @tc.desc: Generate a random RFC 4122 version 4 UUID. + */ + it('testUtilRandomBinaryUUIDThrowError001', 0, async function () { + try { + var result = util.randomBinaryUUID(123); + expect(result.length).assertEqual(16); + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of 123 must be boolean"); + } + }) + + /** + * @tc.name: testUtilParseUUIDThrow001 + * @tc.desc: Generate a random RFC 4122 version 4 UUID. + */ + it('testUtilParseUUIDThrow001', 0, async function () { + try { + var result = util.parseUUID(123); + expect(result.length).assertEqual(16); + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Syntax Error.Invalid 123 string"); + } + }) +}) + +describe('RationalNumberTest', function () { + /** + * @tc.name: test_parseRationalNumber_001 + * @tc.desc: Creates a RationalNumber object based on a given string. + */ + it('test_parseRationalNumber_001', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(1, 2) + var res = pro.createRationalFromString('+2:-4') + var result1 = res.valueOf() + expect(result1).assertEqual(-0.5) + }) + + /** + * @tc.name: test_parseRationalNumberThrowError_001 + * @tc.desc: Creates a RationalNumber object based on a given string. + */ + it('test_parseRationalNumberThrowError_001', 0, function () { + try { + var pro = new util.RationalNumber() + pro.parseRationalNumber('str', 2) + var res = pro.createRationalFromString('+2:-4') + var result1 = res.valueOf() + expect(result1).assertEqual(-0.5) + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of str must be number"); + } + }) + + /** + * @tc.name: test_createRationalFromString_001 + * @tc.desc: Creates a RationalNumber object based on a given string. + */ + it('test_createRationalFromString_001', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(1,2) + var res = pro.createRationalFromString('-1:2') + var result1 = res.valueOf() + expect(result1).assertEqual(-0.5) + }) + + /** + * @tc.name: test_createRationalFromString_002 + * @tc.desc: Creates a RationalNumber object based on a given string. + */ + it('test_createRationalFromString_002', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(1,2) + var res = pro.createRationalFromString('+3/4') + var result1 = res.valueOf() + expect(result1).assertEqual(0.75) + }) + + /** + * @tc.name: test_createRationalFromString_003 + * @tc.desc: Creates a RationalNumber object based on a given string. + */ + it('test_createRationalFromString_003', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(1,2) + var res = pro.createRationalFromString('+3:-4') + var result1 = res.valueOf() + expect(result1).assertEqual(-0.75) + }) + + /** + * @tc.name: test_createRationalFromString_004 + * @tc.desc: Creates a RationalNumber object based on a given string. + */ + it('test_createRationalFromString_004', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(1,2) + var res = pro.createRationalFromString('+2:4') + var result1 = res.valueOf() + expect(result1).assertEqual(0.5) + }) + + /** + * @tc.name: test_createRationalFromString_005 + * @tc.desc: Creates a RationalNumber object based on a given string. + */ + it('test_createRationalFromString_005', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(1,2) + var res = pro.createRationalFromString('+2:-4') + var result1 = res.valueOf() + expect(result1).assertEqual(-0.5) + }) + + /** + * @tc.name: test_createRationalFromStringThrowError_001 + * @tc.desc: Creates a RationalNumber object based on a given string. + */ + it('test_createRationalFromStringThrowError_001', 0, function () { + try { + var pro = new util.RationalNumber() + pro.parseRationalNumber(1, 2) + var res = pro.createRationalFromString(123) + var result1 = res.valueOf() + expect(result1).assertEqual(-0.5) + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of 123 must be string"); + } + }) + + /** + * @tc.name: test_compare_001 + * @tc.desc: Compares the current RationalNumber object with a given object. + */ + it('test_compare_001', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(2, 1) + var proc = new util.RationalNumber() + proc.parseRationalNumber(3, 4) + var res = pro.compare(proc) + expect(res).assertEqual(1) + }) + + /** + * @tc.name: test_compare_002 + * @tc.desc: Compares the current RationalNumber object with a given object. + */ + it('test_compare_002', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(2, 1) + var proc = new util.RationalNumber() + proc.parseRationalNumber(0, 0) + var res = pro.compare(proc) + expect(res).assertEqual(-1) + }) + + /** + * @tc.name: test_compare_003 + * @tc.desc: Compares the current RationalNumber object with a given object. + */ + it('test_compare_003', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(2, 1) + var proc = new util.RationalNumber() + proc.parseRationalNumber(8, 3) + var res = pro.compare(proc) + expect(res).assertEqual(-1) + }) + + /** + * @tc.name: test_compare_004 + * @tc.desc: Compares the current RationalNumber object with a given object. + */ + it('test_compare_004', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(2, 1) + var proc = new util.RationalNumber() + proc.parseRationalNumber(2, 1) + var res = pro.compare(proc) + expect(res).assertEqual(0) + }) + + /** + * @tc.name: test_compare_005 + * @tc.desc: Compares the current RationalNumber object with a given object. + */ + it('test_compare_005', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(0, 0) + var proc = new util.RationalNumber() + proc.parseRationalNumber(2, 1) + var res = pro.compare(proc) + expect(res).assertEqual(1) + }) + + /** + * @tc.name: test_compareThrowError_001 + * @tc.desc: Compares the current RationalNumber object with a given object. + */ + it('test_compareThrowError_001', 0, function () { + try { + var pro = new util.RationalNumber() + pro.parseRationalNumber(2, 1) + var proc = 'str' + var res = pro.compare(proc) + expect(res).assertEqual(1) + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of str must be RationalNumber"); + } + }) + + /** + * @tc.name: testgetCommonFactor001 + * @tc.desc: Obtains the greatest common divisor of two specified numbers. + */ + it('testgetCommonFactor001', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(0, 0) + var res = pro.getCommonFactor(4, 8) + expect(res).assertEqual(4) + }) + + /** + * @tc.name: testgetCommonFactor002 + * @tc.desc: Obtains the greatest common divisor of two specified numbers. + */ + it('testgetCommonFactor002', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(0, 0) + var res = pro.getCommonFactor(10, 15) + expect(res).assertEqual(5) + }) + + /** + * @tc.name: testgetCommonFactor003 + * @tc.desc: Obtains the greatest common divisor of two specified numbers. + */ + it('testgetCommonFactor003', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(0, 0) + var res = pro.getCommonFactor(8, 4) + expect(res).assertEqual(4) + }) + + /** + * @tc.name: testgetCommonFactor004 + * @tc.desc: Obtains the greatest common divisor of two specified numbers. + */ + it('testgetCommonFactor004', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(0, 0) + var res = pro.getCommonFactor(8, 16) + expect(res).assertEqual(8) + }) + + /** + * @tc.name: testgetCommonFactor005 + * @tc.desc: Obtains the greatest common divisor of two specified numbers. + */ + it('testgetCommonFactor005', 0, function () { + var pro = new util.RationalNumber() + pro.parseRationalNumber(0, 0) + var res = pro.getCommonFactor(2, 16) + expect(res).assertEqual(2) + }) + + /** + * @tc.name: testgetCommonFactorThrowError001 + * @tc.desc: Obtains the greatest common divisor of two specified numbers. + */ + it('testgetCommonFactorThrowError001', 0, function () { + try { + var pro = new util.RationalNumber() + pro.parseRationalNumber(0, 0) + var res = pro.getCommonFactor('str', 8) + expect(res).assertEqual(4) + } catch (e) { + expect(e.toString()).assertEqual("BusinessError: Parameter error.The type of str must be number"); + } + }) +}) + +describe('Base64HelperTest', function () { + /** + * @tc.name: test_encodeSync_base64_001 + * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_encodeSync_base64_001', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([115,49,51]); + var rarray = new Uint8Array([99,122,69,122]); + var result = that.encodeSync(array); + for (var i = 0; i < 4; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_encodeSync_base64_002 + * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_encodeSync_base64_002', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); + var rarray = new Uint8Array([81,109,70,122,90,84,89,48,73,69,53,118,90,71,85,117,97,110,77,61]); + var result = that.encodeSync(array); + for (var i = 0; i < 20; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_encodeSync_base64_003 + * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_encodeSync_base64_003', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([66,97,115,101,54,52,32,69,110,99,111,100,105,110,103,32,105, + 110,32,78,111,100,101,46,106,115]); + var rarray = new Uint8Array([81,109,70,122,90,84,89,48,73,69,86,117,89,50,57,107,97,87,53,110, + 73,71,108,117,73,69,53,118,90,71,85,117,97,110,77,61]); + var result = that.encodeSync(array); + for (var i = 0; i < 36; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_encodeSync_base64_004 + * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_encodeSync_base64_004', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([168, 174, 155, 255]); + var rarray = new Uint8Array([113,75,54,98,47,119,61,61]); + var result = that.encodeSync(array); + for (var i = 0; i < 8; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_encodeSync_base64_005 + * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_encodeSync_base64_005', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([66, 97, 115, 101, 54, 52]); + var rarray = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48]); + var result = that.encodeSync(array); + for (var i = 0; i <8; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_encodeSync_base64_006 + * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_encodeSync_base64_006', 0, function () { + try { + var that = new util.Base64Helper(); + var array = new Uint32Array([66, 97, 115, 101, 54, 52]); + var result = that.encodeSync(array); + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be Uint8Array") + } + }) + + /** + * @tc.name: test_encodeToStringSync_base64_001 + * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. + */ + it('test_encodeToStringSync_base64_001', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([115,49,51]); + var result = that.encodeToStringSync(array) + expect(result).assertEqual('czEz') + }) + + /** + * @tc.name: test_encodeToStringSync_base64_002 + * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. + */ + it('test_encodeToStringSync_base64_002', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); + var result = that.encodeToStringSync(array); + expect(result).assertEqual('QmFzZTY0IE5vZGUuanM=') + }) + + /** + * @tc.name: test_encodeToStringSync_base64_003 + * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. + */ + it('test_encodeToStringSync_base64_003', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([66,97,115,101,54,52,32,69,110,99,111,100,105,110,103,32,105,110, + 32,78,111,100,101,46,106,115]); + var result = that.encodeToStringSync(array); + expect(result).assertEqual('QmFzZTY0IEVuY29kaW5nIGluIE5vZGUuanM=') + }) + + /** + * @tc.name: test_encodeToStringSync_base64_004 + * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. + */ + it('test_encodeToStringSync_base64_004', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([168, 174, 155, 255]); + var result = that.encodeToStringSync(array); + expect(result).assertEqual('qK6b/w==') + }) + + /** + * @tc.name: test_encodeToStringSync_base64_005 + * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. + */ + it('test_encodeToStringSync_base64_005', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([66, 97, 115, 101, 54, 52]); + var result = that.encodeToStringSync(array); + expect(result).assertEqual('QmFzZTY0') + }) + + /** + * @tc.name: test_encodeToStringSync_base64_006 + * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. + */ + it('test_encodeToStringSync_base64_006', 0, function () { + try { + var that = new util.Base64Helper() + var array = new Uint32Array([66, 97, 115, 101, 54, 52]); + var result = that.encodeToStringSync(array); + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be Uint8Array") + } + }) + + /** + * @tc.name: test_decodeSync_base64_001 + * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_decodeSync_base64_001', 0, function () { + var that = new util.Base64Helper() + var buff = 'czEz'; + var rarray = new Uint8Array([115,49,51]); + var result = that.decodeSync(buff); + for (var i = 0; i < 3; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_decodeSync_base64_002 + * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_decodeSync_base64_002', 0, function () { + var that = new util.Base64Helper() + var buff = 'QmFzZTY0IE5vZGUuanM='; + var rarray = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); + var result = that.decodeSync(buff); + for (var i = 0; i < 14; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_decodeSync_base64_003 + * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_decodeSync_base64_003', 0, function () { + var that = new util.Base64Helper() + var buff = 'QmFzZTY0IEVuY29kaW5nIGluIE5vZGUuanM='; + var rarray = new Uint8Array([66,97,115,101,54,52,32,69,110,99,111,100,105,110,103,32, + 105,110,32,78,111,100,101,46,106,115]); + var result = that.decodeSync(buff); + for (var i = 0; i < 26; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_decodeSync_base64_004 + * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_decodeSync_base64_004', 0, function () { + var that = new util.Base64Helper() + var buff = 'qK6b/w=='; + var rarray = new Uint8Array([168, 174, 155, 255]); + var result = that.decodeSync(buff); + for (var i = 0; i < 4; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_decodeSync_base64_005 + * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_decodeSync_base64_005', 0, function () { + var that = new util.Base64Helper() + var buff = 'QmFzZTY0'; + var rarray = new Uint8Array([66, 97, 115, 101, 54, 52]); + var result = that.decodeSync(buff); + for (var i = 0; i <6; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_decodeSync_base64_006 + * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_decodeSync_base64_006', 0, function () { + try { + var that = new util.Base64Helper() + var array = new Uint32Array([99,122,69,122]); + var result = that.decodeSync(array); + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be Uint8Array or string") + } + }) + + /** + * @tc.name: test_decodeSync_base64_007 + * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_decodeSync_base64_007', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([81,109,70,122,90,84,89,48,73,69,53,118,90,71,85,117,97,110,77,61]); + var rarray = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); + var result = that.decodeSync(array); + for (var i = 0; i < 14; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_decodeSync_base64_008 + * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_decodeSync_base64_008', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([81,109,70,122,90,84,89,48,73,69,86,117,89,50,57,107,97,87, + 53,110,73,71,108,117,73,69,53,118,90,71,85,117,97,110,77,61]); + var rarray = new Uint8Array([66,97,115,101,54,52,32,69,110,99,111,100,105,110,103,32,105, + 110,32,78,111,100,101,46,106,115]); + var result = that.decodeSync(array); + for (var i = 0; i < 26; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_decodeSync_base64_009 + * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_decodeSync_base64_009', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([113,75,54,98,47,119,61,61]); + var rarray = new Uint8Array([168, 174, 155, 255]); + var result = that.decodeSync(array); + for (var i = 0; i < 4; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + /** + * @tc.name: test_decodeSync_base64_010 + * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 + array using the Base64 encoding scheme. + */ + it('test_decodeSync_base64_010', 0, function () { + var that = new util.Base64Helper() + var array = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48]); + var rarray = new Uint8Array([66, 97, 115, 101, 54, 52]); + var result = that.decodeSync(array); + for (var i = 0; i <6; i++) { + expect(result[i]).assertEqual(rarray[i]); + } + }) + + //base64 EncodeAsync test + /** + * @tc.name: test_encodeSync_base64_001 + * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly + allocated u8 array using the Base64 encoding scheme. + */ + it('test_encodeSync_base64_001', 0, async function () { + var that = await new util.Base64Helper(); + var array = new Uint8Array([115,49,51]); + var rarray = new Uint8Array([99,122,69,122]); + that.encode(array).then(val=>{ + for (var i = 0; i < rarray.length; i++) { + expect(val[i]).assertEqual(rarray[i]) + } + }) + }) + + /** + * @tc.name: test_encodeSync_base64_002 + * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly + allocated u8 array using the Base64 encoding scheme. + */ + it('test_encodeSync_base64_002', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); + var rarray = new Uint8Array([81,109,70,122,90,84,89,48,73,69,53,118,90,71,85,117,97,110,77,61]); + that.encode(array).then(val=>{ + for (var i = 0; i < rarray.length; i++) { + expect(val[i]).assertEqual(rarray[i]) + } + }) + }) + + /** + * @tc.name: test_encodeSync_base64_003 + * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 + array using the Base64 encoding scheme. + */ + it('test_encodeSync_base64_003', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([66,97,115,101,54,52,32,69,110,99,111,100,105,110,103,32,105,110,32, + 78,111,100,101,46,106,115]); + var rarray = new Uint8Array([81,109,70,122,90,84,89,48,73,69,86,117,89,50,57,107,97,87,53,110,73, + 71,108,117,73,69,53,118,90,71,85,117,97,110,77,61]); + that.encode(array).then(val=>{ + for (var i = 0; i < rarray.length; i++) { + expect(val[i]).assertEqual(rarray[i]) + } + }) + }) + + /** + * @tc.name: test_encodeSync_base64_004 + * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 + array using the Base64 encoding scheme. + */ + it('test_encodeSync_base64_004', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([168, 174, 155, 255]); + var rarray = new Uint8Array([113,75,54,98,47,119,61,61]); + that.encode(array).then(val=>{ + for (var i = 0; i < rarray.length; i++) { + expect(val[i]).assertEqual(rarray[i]) + } + }) + }) + + /** + * @tc.name: test_encodeSync_base64_005 + * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 + array using the Base64 encoding scheme. + */ + it('test_encodeSync_base64_005', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([66, 97, 115, 101, 54, 52]); + var rarray = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48]); + that.encode(array).then(val=>{ + for (var i = 0; i < rarray.length; i++) { + expect(val[i]).assertEqual(rarray[i]) + } + }) + }) + + /** + * @tc.name: test_encodeSync_base64_005 + * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 + array using the Base64 encoding scheme. + */ + it('test_encodeSync_base64_005', 0, async function () { + try { + var that = new util.Base64Helper() + var array = new Uint32Array([66, 97, 115, 101, 54, 52]); + that.encode(array) + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be Uint8Array") + } + + }) + + /** + * @tc.name: test_encodeToString_base64_001 + * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. + */ + it('test_encodeToString_base64_001', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([115,49,51]); + that.encodeToString(array).then(val=>{ + expect(val).assertEqual('czEz') + }) + }) + + /** + * @tc.name: test_encodeToString_base64_002 + * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. + */ + it('test_encodeToString_base64_002', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); + that.encodeToString(array).then(val=>{ + expect(val).assertEqual('QmFzZTY0IE5vZGUuanM=') + }) + }) + + /** + * @tc.name: test_encodeToString_base64_003 + * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. + */ + it('test_encodeToString_base64_003', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([81,109,70,122,90,84,89,48,73,69,86,117,89,50,57,107,97,87,53,110,73,71,108, + 117,73,69,53,118,90,71,85,117,97,110,77,61]); + that.encodeToString(array).then(val=>{ + expect(val).assertEqual('QmFzZTY0IEVuY29kaW5nIGluIE5vZGUuanM=') + }) + }) + + /** + * @tc.name: test_encodeToString_base64_004 + * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. + */ + it('test_encodeToString_base64_004', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([168, 174, 155, 255]); + that.encodeToString(array).then(val=>{ + expect(val).assertEqual('qK6b/w==') + }) + }) + + /** + * @tc.name: test_encodeToString_base64_005 + * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. + */ + it('test_encodeToString_base64_005', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([66, 97, 115, 101, 54, 52]); + that.encodeToString(array).then(val=>{ + expect(val).assertEqual('QmFzZTY0') + }) + }) + + /** + * @tc.name: test_encodeToString_base64_006 + * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. + */ + it('test_encodeToString_base64_006', 0, async function () { + try { + var that = new util.Base64Helper() + var array = new Uint32Array([66, 97, 115, 101, 54, 52]); + that.encodeToString(array) + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be Uint8Array") + } + }) + + /** + * @tc.name: test_decode_base64_001 + * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 + array into a newly allocated u8 array. + */ + it('test_decode_base64_001', 0, async function () { + var that = new util.Base64Helper() + var buff = 'czEz'; + var array = new Uint8Array([115,49,51]); + that.decode(buff).then(val=>{ + for (var i = 0; i < array.length; i++) { + expect(val[i]).assertEqual(array[i]) + } + }) + }) + + /** + * @tc.name: test_decode_base64_002 + * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 + array into a newly allocated u8 array. + */ + it('test_decode_base64_002', 0, async function () { + var that = new util.Base64Helper() + var buff = 'QmFzZTY0IE5vZGUuanM='; + var array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); + that.decode(buff).then(val=>{ + for (var i = 0; i < array.length; i++) { + expect(val[i]).assertEqual(array[i]) + } + }) + }) + + /** + * @tc.name: test_decode_base64_003 + * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 + array into a newly allocated u8 array. + */ + it('test_decode_base64_003', 0, async function () { + var that = new util.Base64Helper() + var buff = 'QmFzZTY0IEVuY29kaW5nIGluIE5vZGUuanM='; + var array = new Uint8Array([66,97,115,101,54,52,32,69,110,99,111,100,105,110,103,32,105,110,32,78, + 111,100,101,46,106,115]); + that.decode(buff).then(val=>{ + for (var i = 0; i < array.length; i++) { + expect(val[i]).assertEqual(array[i]) + } + }) + }) + + /** + * @tc.name: test_decode_base64_004 + * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 + array into a newly allocated u8 array. + */ + it('test_decode_base64_004', 0, async function () { + var that = new util.Base64Helper() + var buff = 'qK6b/w=='; + var array = new Uint8Array([168, 174, 155, 255]); + that.decode(buff).then(val=>{ + for (var i = 0; i < array.length; i++) { + expect(val[i]).assertEqual(array[i]) + } + }) + }) + + /** + * @tc.name: test_decode_base64_005 + * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 + array into a newly allocated u8 array. + */ + it('test_decode_base64_005', 0, async function () { + var that = new util.Base64Helper() + var buff = 'QmFzZTY0'; + var rarray = new Uint8Array([66, 97, 115, 101, 54, 52]); + that.decode(buff).then(val=>{ + for (var i = 0; i < rarray.length; i++) { + expect(val[i]).assertEqual(rarray[i]) + } + }) + }) + + /** + * @tc.name: test_decode_base64_006 + * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 + array into a newly allocated u8 array. + */ + it('test_decode_base64_006', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([99,122,69,122]); + var rarray = new Uint8Array([115,49,51]); + that.decode(array).then(val=>{ + for (var i = 0; i < rarray.length; i++) { + expect(val[i]).assertEqual(rarray[i]) + } + }) + }) + + /** + * @tc.name: test_decode_base64_007 + * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 + array into a newly allocated u8 array. + */ + it('test_decode_base64_007', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([81,109,70,122,90,84,89,48,73,69,53,118,90,71,85,117,97,110,77,61]); + var rarray = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); + that.decode(array).then(val=>{ + for (var i = 0; i < rarray.length; i++) { + expect(val[i]).assertEqual(rarray[i]) + } + }) + }) + + /** + * @tc.name: test_decode_base64_008 + * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 + */ + it('test_decode_base64_008', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([81,109,70,122,90,84,89,48,73,69,86,117,89,50,57,107,97,87,53,110,73,71,108, + 117,73,69,53,118,90,71,85,117,97,110,77,61]); + var rarray = new Uint8Array([66,97,115,101,54,52,32,69,110,99,111,100,105,110,103,32,105,110,32,78,111, + 100,101,46,106,115]); + that.decode(array).then(val=>{ + for (var i = 0; i < rarray.length; i++) { + expect(val[i]).assertEqual(rarray[i]) + } + }) + }) + + /** + * @tc.name: test_decode_base64_009 + * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array + into a newly allocated u8 array. + */ + it('test_decode_base64_009', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([113,75,54,98,47,119,61,61]); + var rarray = new Uint8Array([168, 174, 155, 255]); + that.decode(array).then(val=>{ + for (var i = 0; i < rarray.length; i++) { + expect(val[i]).assertEqual(rarray[i]) + } + }) + }) + + /** + * @tc.name: test_decode_base64_010 + * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 + array into a newly allocated u8 array. + */ + it('test_decode_base64_010', 0, async function () { + var that = new util.Base64Helper() + var array = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48]); + var rarray = new Uint8Array([66, 97, 115, 101, 54, 52]); + that.decode(array).then(val=>{ + for (var i = 0; i < rarray.length; i++) { + expect(val[i]).assertEqual(rarray[i]) + } + }) + }) + + /** + * @tc.name: test_decode_base64_011 + * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 + array into a newly allocated u8 array. + */ + it('test_decode_base64_006', 0, async function () { + try { + var that = new util.Base64Helper() + var array = new Uint16Array([99,122,69,122]); + that.decode(array) + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be Uint8Array or string") + } + }) +}) + +describe('DecodeEncodeTest', function () { + /** + * @tc.name: testencoding_textdecoder_001 + * @tc.desc: The source encoding's name, lowercased. + */ + it('testencoding_textdecoder_001', 0, function () { + var that = new util.TextDecoder() + that.create('utf-8', { ignoreBOM : true }) + var retStr = that.encoding + expect(retStr).assertEqual('utf-8') + }) + + /** + * @tc.name: testencoding_textdecoder_002 + * @tc.desc: The source encoding's name, lowercased. + */ + it('testencoding_textdecoder_002', 0, function () { + var that = new util.TextDecoder() + that.create('utf-16le') + var encodingStr = that.encoding + expect(encodingStr).assertEqual('utf-16le') + }) + + /** + * @tc.name: testencoding_textdecoder_003 + * @tc.desc: The source encoding's name, lowercased. + */ + it('testencoding_textdecoder_003', 0, function () { + var that = new util.TextDecoder() + that.create('utf-16be') + var encodingStr = that.encoding + expect(encodingStr).assertEqual('utf-16be') + }) + + /** + * @tc.name: testencoding_textdecoder_004 + * @tc.desc: The source encoding's name, lowercased. + */ + it('testencoding_textdecoder_004', 0, function () { + var that = new util.TextDecoder() + that.create('utf-16be', { ignoreBOM : true }) + var encodingStr = that.encoding + expect(encodingStr).assertEqual('utf-16be') + }) + + /** + * @tc.name: testencoding_textdecoder_005 + * @tc.desc: The source encoding's name, lowercased. + */ + it('testencoding_textdecoder_005', 0, function () { + var that = new util.TextDecoder() + that.create('utf-16be', { ignoreBOM : false }) + var encodingStr = that.encoding + expect(encodingStr).assertEqual('utf-16be') + }) + + /** + * @tc.name: testencoding_textdecoder_ThrowError_001 + * @tc.desc: The source encoding's name, lowercased. + */ + it('testencoding_textdecoder_ThrowError_001', 0, function () { + try { + var that = new util.TextDecoder() + that.create(123, { ignoreBOM : false }) + var encodingStr = that.encoding + expect(encodingStr).assertEqual('utf-16be') + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be string.") + } + }) + + /** + * @tc.name: testencoding_textdecoder_ThrowError_002 + * @tc.desc: The source encoding's name, lowercased. + */ + it('testencoding_textdecoder_ThrowError_002', 0, function () { + try { + var that = new util.TextDecoder() + that.create('utf-16be', 'ignoreBOM') + var encodingStr = that.encoding + expect(encodingStr).assertEqual('utf-16be') + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be object.") + } + }) + + /** + * @tc.name: testencoding_textdecoder_ThrowError_002 + * @tc.desc: The source encoding's name, lowercased. + */ + it('testencoding_textdecoder_ThrowError_002', 0, function () { + try { + var that = new util.TextDecoder() + that.create('utf-16be', 123) + var encodingStr = that.encoding + expect(encodingStr).assertEqual('utf-16be') + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be object.") + } + }) + + /** + * @tc.name: testEncodeInto001 + * @tc.desc: Returns the result of encoder. + */ + it('testencodeInto001', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encodeInto('abc') + expect(result[0]).assertEqual(0x61) + }) + + /** + * @tc.name: testEncodeInto002 + * @tc.desc: Returns the result of encoder. + */ + it('testEncodeInto002', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encodeInto('\uD800楼楼') + expect(result[5]).assertEqual(188) + }) + + /** + * @tc.name: testEncodeInto003 + * @tc.desc: Returns the result of encoder. + */ + it('testEncodeInto003', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encodeInto('a\uD800楼楼') + expect(result[0]).assertEqual(0x61) + }) + + /** + * @tc.name: testEncodeInto004 + * @tc.desc: Returns the result of encoder. + */ + it('testEncodeInto004', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encodeInto('abc\uD800楼楼') + expect(result[1]).assertEqual(0x62) + }) + + /** + * @tc.name: testEncodeInto005 + * @tc.desc: Returns the result of encoder. + */ + it('testEncodeInto005', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encodeInto('123\uD800楼楼') + expect(result[0]).assertEqual(49) + expect(result[9]).assertEqual(230) + }) + + /** + * @tc.name: testEncodeInto006 + * @tc.desc: Returns the result of encoder. + */ + it('testEncodeInto006', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encodeInto('123¥\uD800楼') + expect(result[10]).assertEqual(0xbc) + }) + + /** + * @tc.name: testEncodeInto007 + * @tc.desc: Returns the result of encoder. + */ + it('testEncodeInto007', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encodeInto('¥¥') + expect(result[0]).assertEqual(0xc2) + }) + + /** + * @tc.name: testEncodeInto008 + * @tc.desc: Returns the result of encoder. + */ + it('testEncodeInto008', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encodeInto('$$') + expect(result[0]).assertEqual(0x24) + }) + + /** + * @tc.name: testEncodeInto009 + * @tc.desc: Returns the result of encoder for gb18030. + */ + it('testEncodeInto009', 0, function () { + let that = new util.TextEncoder('gb18030') + let buffer = new ArrayBuffer(20) + let result = new Uint8Array(buffer) + result = that.encodeInto('abc哈哈熠熠') + expect(result[0]).assertEqual(97) + expect(result[3]).assertEqual(185) + expect(result[4]).assertEqual(254) + expect(result[7]).assertEqual(236) + expect(result[8]).assertEqual(218) + }) + + /** + * @tc.name: testEncodeInto010 + * @tc.desc: Returns the result of encoder for GB18030. + */ + it('testEncodeInto0010', 0, function () { + let that = new util.TextEncoder('GB18030') + let buffer = new ArrayBuffer(20) + let result = new Uint8Array(buffer) + result = that.encodeInto('abc哈哈熠熠') + expect(result[0]).assertEqual(97) + expect(result[3]).assertEqual(185) + expect(result[4]).assertEqual(254) + expect(result[7]).assertEqual(236) + expect(result[8]).assertEqual(218) + }) + + /** + * @tc.name: testEncodeIntoThrowError001 + * @tc.desc: Returns the result of encoder. + */ + it('testEncodeIntoThrowError001', 0, function () { + try { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encodeInto(123) + expect(result[0]).assertEqual(0x61) + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be string.") + } + }) + + /** + * @tc.name: testEncodeIntoThrowError002 + * @tc.desc: Returns the result of encoder. + */ + it('testEncodeIntoThrowError002', 0, function () { + try { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encodeInto({ ignoreBOM : true }) + expect(result[0]).assertEqual(0x61) + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be string.") + } + }) + + /** + * @tc.name: testencodeIntoUint8Array001 + * @tc.desc: encode string, write the result to dest array. + */ + it('testencodeIntoUint8Array001', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var dest = new Uint8Array(buffer, 0, 13) + var result = new Uint32Array(20) + result = that.encodeIntoUint8Array('\uD800A\uDF06A楼HiA', dest) + expect(result.read).assertEqual(7) + expect(result.written).assertEqual(13) + }) + + /** + * @tc.name: testencodeIntoUint8Array002 + * @tc.desc: encode string, write the result to dest array. + */ + it('testencodeIntoUint8Array002', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(6) + var dest = new Uint8Array(buffer) + var result = new Object() + result = that.encodeIntoUint8Array('abc\u2603d', dest) + expect(result.read).assertEqual(4) + expect(result.written).assertEqual(6) + }) + + /** + * @tc.name: testencodeIntoUint8Array003 + * @tc.desc: encode string, write the result to dest array. + */ + it('testencodeIntoUint8Array003', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(4) + var dest = new Uint8Array(buffer) + var result = new Object() + result = that.encodeIntoUint8Array('abcd', dest) + expect(result.read).assertEqual(4) + expect(result.written).assertEqual(4) + }) + + /** + * @tc.name: testencodeIntoUint8Array004 + * @tc.desc: encode string, write the result to dest array. + */ + it('testencodeIntoUint8Array004', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(4) + var dest = new Uint8Array(buffer) + var result = new Object() + result = that.encodeIntoUint8Array('12345', dest) + expect(result.read).assertEqual(4) + expect(result.written).assertEqual(4) + }) + + /** + * @tc.name: testencodeIntoUint8Array005 + * @tc.desc: encode string, write the result to dest array. + */ + it('testencodeIntoUint8Array005', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(4) + var dest = new Uint8Array(buffer) + var result = new Object() + result = that.encodeIntoUint8Array('123 4*!@#', dest) + expect(result.read).assertEqual(4) + expect(result.written).assertEqual(4) + }) + + /** + * @tc.name: testencodeIntoUint8Array006 + * @tc.desc: encode string, write the result to dest array. + */ + it('testencodeIntoUint8Array006', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(4) + var dest = new Uint8Array(buffer) + var result = new Object() + result = that.encodeIntoUint8Array('', dest) + expect(result.read).assertEqual(0) + expect(result.written).assertEqual(0) + }) + + /** + * @tc.name: testencodeIntoUint8Array007 + * @tc.desc: encode string, write the result to dest array. + */ + it('testencodeIntoUint8Array007', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var dest = new Uint8Array(buffer) + var result = new Uint32Array(20) + result = that.encodeIntoUint8Array('12ab', dest) + expect(result.read).assertEqual(4) + expect(result.written).assertEqual(4) + }) + + /** + * @tc.name: testencodeIntoUint8Array008 + * @tc.desc: encode string, write the result to dest array. + */ + it('testencodeIntoUint8Array008', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var dest = new Uint8Array(buffer, 0, 0) + var result = new Uint32Array(20) + result = that.encodeIntoUint8Array('\uD800A\uDF06A楼HiA', dest) + expect(result.read).assertEqual(0) + expect(result.written).assertEqual(0) + }) + + /** + * @tc.name: testencodeIntoUint8ArrayThrowError001 + * @tc.desc: encode string, write the result to dest array. + */ + it('testencodeIntoUint8ArrayThrowError001', 0, function () { + try { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var dest = new Uint8Array(buffer, 0, 13) + var result = new Uint32Array(20) + result = that.encodeIntoUint8Array('\uD800A\uDF06A楼HiA', dest) + expect(result.read).assertEqual(7) + expect(result.written).assertEqual(13) + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be string.") + } + }) + + /** + * @tc.name: testencodeIntoUint8ArrayThrowError002 + * @tc.desc: encode string, write the result to dest array. + */ + it('testencodeIntoUint8ArrayThrowError002', 0, function () { + try { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var dest = new Uint8Array(buffer, 0, 13) + var result = new Uint32Array(20) + result = that.encodeIntoUint8Array('\uD800A\uDF06A楼HiA', dest) + expect(result.read).assertEqual(7) + expect(result.written).assertEqual(13) + } catch (e) { + expect(e.toString()).assertEqual("BuisnessError: The type of Parameter must be Uint8Array.") } }) })