From 97f1b3f9ef9fafbffeb2a316fc9d491a3fcd982e Mon Sep 17 00:00:00 2001 From: Jonathan Casey Date: Thu, 9 Nov 2023 16:49:01 +0000 Subject: [PATCH] test(*): fix test regression Signed-off-by: Jonathan Casey --- .../fromcto/xmlschema/xmlschemavisitor.js | 86 +++++++------------ 1 file changed, 31 insertions(+), 55 deletions(-) diff --git a/test/codegen/fromcto/xmlschema/xmlschemavisitor.js b/test/codegen/fromcto/xmlschema/xmlschemavisitor.js index b9cf89aa..0f673c71 100644 --- a/test/codegen/fromcto/xmlschema/xmlschemavisitor.js +++ b/test/codegen/fromcto/xmlschema/xmlschemavisitor.js @@ -411,17 +411,13 @@ describe('XmlSchemaVisitor', function () { xmlSchemaVisitor.visitMapDeclaration(mockMapDeclaration, param); - param.fileWriter.writeLine.callCount.should.deep.equal(10); + param.fileWriter.writeLine.callCount.should.deep.equal(7); param.fileWriter.writeLine.getCall(0).args.should.deep.equal([0, '']); param.fileWriter.writeLine.getCall(1).args.should.deep.equal([1, '']); - param.fileWriter.writeLine.getCall(2).args.should.deep.equal([2, '']); - param.fileWriter.writeLine.getCall(3).args.should.deep.equal([3, '']); - param.fileWriter.writeLine.getCall(4).args.should.deep.equal([4, '']); - param.fileWriter.writeLine.getCall(5).args.should.deep.equal([4, '']); - param.fileWriter.writeLine.getCall(6).args.should.deep.equal([3, '']); - param.fileWriter.writeLine.getCall(7).args.should.deep.equal([2, '']); - param.fileWriter.writeLine.getCall(8).args.should.deep.equal([1, '']); - param.fileWriter.writeLine.getCall(9).args.should.deep.equal([0, '']); + param.fileWriter.writeLine.getCall(2).args.should.deep.equal([2, '']); + param.fileWriter.writeLine.getCall(3).args.should.deep.equal([2, '']); + param.fileWriter.writeLine.getCall(4).args.should.deep.equal([1, '']); + param.fileWriter.writeLine.getCall(5).args.should.deep.equal([0, '']); }); @@ -455,17 +451,13 @@ describe('XmlSchemaVisitor', function () { xmlSchemaVisitor.visitMapDeclaration(mockMapDeclaration, param); - param.fileWriter.writeLine.callCount.should.deep.equal(10); + param.fileWriter.writeLine.callCount.should.deep.equal(7); param.fileWriter.writeLine.getCall(0).args.should.deep.equal([0, '']); param.fileWriter.writeLine.getCall(1).args.should.deep.equal([1, '']); - param.fileWriter.writeLine.getCall(2).args.should.deep.equal([2, '']); - param.fileWriter.writeLine.getCall(3).args.should.deep.equal([3, '']); - param.fileWriter.writeLine.getCall(4).args.should.deep.equal([4, '']); - param.fileWriter.writeLine.getCall(5).args.should.deep.equal([4, '']); - param.fileWriter.writeLine.getCall(6).args.should.deep.equal([3, '']); - param.fileWriter.writeLine.getCall(7).args.should.deep.equal([2, '']); - param.fileWriter.writeLine.getCall(8).args.should.deep.equal([1, '']); - param.fileWriter.writeLine.getCall(9).args.should.deep.equal([0, '']); + param.fileWriter.writeLine.getCall(2).args.should.deep.equal([2, '']); + param.fileWriter.writeLine.getCall(3).args.should.deep.equal([2, '']); + param.fileWriter.writeLine.getCall(4).args.should.deep.equal([1, '']); + param.fileWriter.writeLine.getCall(5).args.should.deep.equal([0, '']); }); it('should write the map declaration for a map ', () => { @@ -496,17 +488,13 @@ describe('XmlSchemaVisitor', function () { xmlSchemaVisitor.visitMapDeclaration(mockMapDeclaration, param); - param.fileWriter.writeLine.callCount.should.deep.equal(10); + param.fileWriter.writeLine.callCount.should.deep.equal(7); param.fileWriter.writeLine.getCall(0).args.should.deep.equal([0, '']); param.fileWriter.writeLine.getCall(1).args.should.deep.equal([1, '']); - param.fileWriter.writeLine.getCall(2).args.should.deep.equal([2, '']); - param.fileWriter.writeLine.getCall(3).args.should.deep.equal([3, '']); - param.fileWriter.writeLine.getCall(4).args.should.deep.equal([4, '']); - param.fileWriter.writeLine.getCall(5).args.should.deep.equal([4, '']); - param.fileWriter.writeLine.getCall(6).args.should.deep.equal([3, '']); - param.fileWriter.writeLine.getCall(7).args.should.deep.equal([2, '']); - param.fileWriter.writeLine.getCall(8).args.should.deep.equal([1, '']); - param.fileWriter.writeLine.getCall(9).args.should.deep.equal([0, '']); + param.fileWriter.writeLine.getCall(2).args.should.deep.equal([2, '']); + param.fileWriter.writeLine.getCall(3).args.should.deep.equal([2, '']); + param.fileWriter.writeLine.getCall(4).args.should.deep.equal([1, '']); + param.fileWriter.writeLine.getCall(5).args.should.deep.equal([0, '']); }); @@ -536,17 +524,13 @@ describe('XmlSchemaVisitor', function () { xmlSchemaVisitor.visitMapDeclaration(mockMapDeclaration, param); - param.fileWriter.writeLine.callCount.should.deep.equal(10); + param.fileWriter.writeLine.callCount.should.deep.equal(7); param.fileWriter.writeLine.getCall(0).args.should.deep.equal([0, '']); param.fileWriter.writeLine.getCall(1).args.should.deep.equal([1, '']); - param.fileWriter.writeLine.getCall(2).args.should.deep.equal([2, '']); - param.fileWriter.writeLine.getCall(3).args.should.deep.equal([3, '']); - param.fileWriter.writeLine.getCall(4).args.should.deep.equal([4, '']); - param.fileWriter.writeLine.getCall(5).args.should.deep.equal([4, '']); - param.fileWriter.writeLine.getCall(6).args.should.deep.equal([3, '']); - param.fileWriter.writeLine.getCall(7).args.should.deep.equal([2, '']); - param.fileWriter.writeLine.getCall(8).args.should.deep.equal([1, '']); - param.fileWriter.writeLine.getCall(9).args.should.deep.equal([0, '']); + param.fileWriter.writeLine.getCall(2).args.should.deep.equal([2, '']); + param.fileWriter.writeLine.getCall(3).args.should.deep.equal([2, '']); + param.fileWriter.writeLine.getCall(4).args.should.deep.equal([1, '']); + param.fileWriter.writeLine.getCall(5).args.should.deep.equal([0, '']); }); it('should write the map declaration for a map ', () => { @@ -576,17 +560,13 @@ describe('XmlSchemaVisitor', function () { xmlSchemaVisitor.visitMapDeclaration(mockMapDeclaration, param); - param.fileWriter.writeLine.callCount.should.deep.equal(10); + param.fileWriter.writeLine.callCount.should.deep.equal(7); param.fileWriter.writeLine.getCall(0).args.should.deep.equal([0, '']); param.fileWriter.writeLine.getCall(1).args.should.deep.equal([1, '']); - param.fileWriter.writeLine.getCall(2).args.should.deep.equal([2, '']); - param.fileWriter.writeLine.getCall(3).args.should.deep.equal([3, '']); - param.fileWriter.writeLine.getCall(4).args.should.deep.equal([4, '']); - param.fileWriter.writeLine.getCall(5).args.should.deep.equal([4, '']); - param.fileWriter.writeLine.getCall(6).args.should.deep.equal([3, '']); - param.fileWriter.writeLine.getCall(7).args.should.deep.equal([2, '']); - param.fileWriter.writeLine.getCall(8).args.should.deep.equal([1, '']); - param.fileWriter.writeLine.getCall(9).args.should.deep.equal([0, '']); + param.fileWriter.writeLine.getCall(2).args.should.deep.equal([2, '']); + param.fileWriter.writeLine.getCall(3).args.should.deep.equal([2, '']); + param.fileWriter.writeLine.getCall(4).args.should.deep.equal([1, '']); + param.fileWriter.writeLine.getCall(5).args.should.deep.equal([0, '']); }); it('should write the map declaration for a map ', () => { @@ -616,17 +596,13 @@ describe('XmlSchemaVisitor', function () { xmlSchemaVisitor.visitMapDeclaration(mockMapDeclaration, param); - param.fileWriter.writeLine.callCount.should.deep.equal(10); + param.fileWriter.writeLine.callCount.should.deep.equal(7); param.fileWriter.writeLine.getCall(0).args.should.deep.equal([0, '']); param.fileWriter.writeLine.getCall(1).args.should.deep.equal([1, '']); - param.fileWriter.writeLine.getCall(2).args.should.deep.equal([2, '']); - param.fileWriter.writeLine.getCall(3).args.should.deep.equal([3, '']); - param.fileWriter.writeLine.getCall(4).args.should.deep.equal([4, '']); - param.fileWriter.writeLine.getCall(5).args.should.deep.equal([4, '']); - param.fileWriter.writeLine.getCall(6).args.should.deep.equal([3, '']); - param.fileWriter.writeLine.getCall(7).args.should.deep.equal([2, '']); - param.fileWriter.writeLine.getCall(8).args.should.deep.equal([1, '']); - param.fileWriter.writeLine.getCall(9).args.should.deep.equal([0, '']); + param.fileWriter.writeLine.getCall(2).args.should.deep.equal([2, '']); + param.fileWriter.writeLine.getCall(3).args.should.deep.equal([2, '']); + param.fileWriter.writeLine.getCall(4).args.should.deep.equal([1, '']); + param.fileWriter.writeLine.getCall(5).args.should.deep.equal([0, '']); }); }); @@ -794,4 +770,4 @@ describe('XmlSchemaVisitor', function () { param.fileWriter.writeLine.withArgs(1, '+ string Bob'); }); }); -}); \ No newline at end of file +});