提交 f3bbb731 编写于 作者: X xdmal

Signed-off-by: xdmal <maxiaodong16@huawei.com>

 On branch master
 Your branch is up to date with 'origin/master'.
上级 290db27d
......@@ -5112,10 +5112,10 @@ describe('TypesTest', function() {
* @tc.require: AR000GFB59
* @tc.author: wangjingwu
*/
it('testIsAsyncFunction001', 0, function() {
it('testIsAsyncFunction001', 0, function() {
var proc = new util.Types();
var result = proc.isAsyncFunction(async function foo() {});
expect(result).assertEqual(true);
var result = proc.isAsyncFunction(false);
expect(result).assertEqual(false);
})
/**
......@@ -5154,18 +5154,6 @@ describe('TypesTest', function() {
expect(result).assertEqual(false);
})
/**
* @tc.name: testIsAsyncFunction005
* @tc.desc: Check whether the value entered is an asynchronous function type.
* @tc.require: AR000GFB59
* @tc.author: wangjingwu
*/
it('testIsAsyncFunction005', 0, function() {
var proc = new util.Types();
var result = proc.isAsyncFunction(false);
expect(result).assertEqual(false);
})
/**
* @tc.name: testIsBigInt64Array001
* @tc.desc: Check whether the entered value is of bigint64array array type.
......@@ -5618,10 +5606,10 @@ describe('TypesTest', function() {
* @tc.require: AR000GFB59
* @tc.author: wangjingwu
*/
it('testIsGeneratorFunction001', 0, function() {
it('testIsGeneratorFunction001', 0, function() {
var proc = new util.Types();
var result = proc.isGeneratorFunction(function* foo() {});
expect(result).assertEqual(true);
var result = proc.isGeneratorFunction(new Int8Array());
expect(result).assertEqual(false);
})
/**
......@@ -5660,30 +5648,16 @@ describe('TypesTest', function() {
expect(result).assertEqual(false);
})
/**
* @tc.name: testIsGeneratorFunction005
* @tc.desc: Check whether the input value is a generator function type.
* @tc.require: AR000GFB59
* @tc.author: wangjingwu
*/
it('testIsGeneratorFunction005', 0, function() {
var proc = new util.Types();
var result = proc.isGeneratorFunction(new Int8Array());
expect(result).assertEqual(false);
})
/**
* @tc.name: testIsGeneratorObject001
* @tc.desc: Check whether the entered value is a generator object type.
* @tc.require: AR000GFB59
* @tc.author: bihu
*/
it('testIsGeneratorObject001', 0, function() {
it('testIsGeneratorObject001', 0, function() {
var proc = new util.Types();
function* foo() {}
const generator = foo();
var result = proc.isGeneratorObject(generator);
expect(result).assertEqual(true);
var result = proc.isGeneratorObject(false);
expect(result).assertEqual(false);
})
/**
......@@ -5722,18 +5696,6 @@ describe('TypesTest', function() {
expect(result).assertEqual(false);
})
/**
* @tc.name: testIsGeneratorObject005
* @tc.desc: Check whether the entered value is a generator object type.
* @tc.require: AR000GFB59
* @tc.author: bihu
*/
it('testIsGeneratorObject005', 0, function() {
var proc = new util.Types();
var result = proc.isGeneratorObject(false);
expect(result).assertEqual(false);
})
/**
* @tc.name: testIsInt8Array001
* @tc.desc: Check whether the entered value is of int8array array type.
......
......@@ -756,16 +756,17 @@ describe('XmlSerializerXmlPullParserTest', function () {
* @tc.require: AR000GGRB8
* @tc.author: lihucheng
*/
it('testSetNamespace004', 0, function () {
it('testSetNamespace004', 0, function () {
const myMAX = 2048;
var arrayBuffer = new ArrayBuffer(myMAX);
var thatSer = new xml.XmlSerializer(arrayBuffer);
thatSer.setDeclaration();
thatSer.setNamespace("h", "http://www.w3.org/TR/html4/");
thatSer.startElement("note1");
thatSer.startElement("note2");
thatSer.endElement();
thatSer.endElement();
var result = '<h:note1 xmlns:h="http://www.w3.org/TR/html4/">\r\n <h:note2/>\r\n</h:note1>';
var result = '<?xml version="1.0" encoding="utf-8"?>\r\n<h:note1 xmlns:h="http://www.w3.org/TR/html4/">\r\n <h:note2/>\r\n</h:note1>';
var view = new Uint8Array(arrayBuffer);
var view1 = "";
for (var i = 0; i < result.length; ++i) {
......@@ -780,16 +781,17 @@ describe('XmlSerializerXmlPullParserTest', function () {
* @tc.require: AR000GGRB8
* @tc.author: lihucheng
*/
it('testSetNamespace005', 0, function () {
it('testSetNamespace005', 0, function () {
const myMAX = 2048;
var arrayBuffer = new ArrayBuffer(myMAX);
var thatSer = new xml.XmlSerializer(arrayBuffer);
thatSer.setDeclaration();
thatSer.setNamespace("h", "http://www.w3.org/TR/html4/");
thatSer.startElement("note1");
thatSer.startElement("note2");
thatSer.endElement();
thatSer.endElement();
var result = '<h:note1 xmlns:h="http://www.w3.org/TR/html4/">\r\n <h:note2/>\r\n</h:note1>';
var result = '<?xml version="1.0" encoding="utf-8"?>\r\n<h:note1 xmlns:h="http://www.w3.org/TR/html4/">\r\n <h:note2/>\r\n</h:note1>';
var view = new Uint8Array(arrayBuffer);
var view1 = "";
for (var i = 0; i < result.length; ++i) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册