From b0535ffead7bf1f214bc84d578bab6f2be4d4358 Mon Sep 17 00:00:00 2001 From: zhangrengao Date: Wed, 20 Jul 2022 11:19:18 +0800 Subject: [PATCH] Fix UT, tonumber ins modified to toumeric ins Signed-off-by: zhangrengao Change-Id: I19f25740e10513ec199897aa3f44d90044f5051b --- ts2panda/tests/expression/cmpBinary.test.ts | 4 ++-- ts2panda/tests/expression/postfixOperations.test.ts | 6 +++--- ts2panda/tests/lexenv.test.ts | 4 ++-- ts2panda/tests/statements/for.test.ts | 6 +++--- ts2panda/tests/watch_expression/addWatch.test.ts | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ts2panda/tests/expression/cmpBinary.test.ts b/ts2panda/tests/expression/cmpBinary.test.ts index 55ad541245..9d9c6dd635 100644 --- a/ts2panda/tests/expression/cmpBinary.test.ts +++ b/ts2panda/tests/expression/cmpBinary.test.ts @@ -33,7 +33,7 @@ import { EcmaStlettoglobalrecord, EcmaStricteqdyn, EcmaStrictnoteqdyn, - EcmaTonumber, + EcmaTonumeric, EcmaTryldglobalbyname, EcmaTrystglobalbyname, EcmaXor2dyn, @@ -295,7 +295,7 @@ describe("CmpBinaryOperators", function () { new StaDyn(lhs), new EcmaIncdyn(lhs), new EcmaTrystglobalbyname('x'), - new EcmaTonumber(variable), + new EcmaTonumeric(variable), new StaDyn(rhs), new EcmaTryldglobalbyname('x'), new EcmaTrystglobalbyname('x'), diff --git a/ts2panda/tests/expression/postfixOperations.test.ts b/ts2panda/tests/expression/postfixOperations.test.ts index 355649dc9c..fdd7ad6d1c 100644 --- a/ts2panda/tests/expression/postfixOperations.test.ts +++ b/ts2panda/tests/expression/postfixOperations.test.ts @@ -22,7 +22,7 @@ import { EcmaIncdyn, EcmaReturnundefined, EcmaStlettoglobalrecord, - EcmaTonumber, + EcmaTonumeric, EcmaTryldglobalbyname, EcmaTrystglobalbyname, Imm, @@ -45,7 +45,7 @@ describe("PostfixOperationsTest", function () { new StaDyn(temp), new EcmaIncdyn(temp), new EcmaTrystglobalbyname('i'), - new EcmaTonumber(i), + new EcmaTonumeric(i), new EcmaReturnundefined() ]; expect(checkInstructions(insns, expected)).to.be.true; @@ -62,7 +62,7 @@ describe("PostfixOperationsTest", function () { new StaDyn(temp), new EcmaDecdyn(temp), new EcmaTrystglobalbyname('i'), - new EcmaTonumber(i), + new EcmaTonumeric(i), new EcmaReturnundefined() ]; expect(checkInstructions(insns, expected)).to.be.true; diff --git a/ts2panda/tests/lexenv.test.ts b/ts2panda/tests/lexenv.test.ts index c54daff6d0..a2180a6a15 100644 --- a/ts2panda/tests/lexenv.test.ts +++ b/ts2panda/tests/lexenv.test.ts @@ -32,7 +32,7 @@ import { EcmaStlexvardyn, EcmaThrowconstassignment, EcmaThrowundefinedifhole, - EcmaTonumber, + EcmaTonumeric, EcmaTrystglobalbyname, Imm, IRNode, @@ -520,7 +520,7 @@ describe("lexenv-compile-testcase in lexenv.test.ts", function () { new EcmaIncdyn(new VReg()), new StaDyn(new VReg()), ...MicroStoreLexVar(1, 0), - new EcmaTonumber(new VReg()), // this is redundant load varialbe + new EcmaTonumeric(new VReg()), // this is redundant load varialbe ...MicroLoadLexVar(1, 0), new StaDyn(new VReg), ...MicroLoadLexVar(1, 1), diff --git a/ts2panda/tests/statements/for.test.ts b/ts2panda/tests/statements/for.test.ts index de8617947f..47bfce8d47 100644 --- a/ts2panda/tests/statements/for.test.ts +++ b/ts2panda/tests/statements/for.test.ts @@ -21,7 +21,7 @@ import { EcmaIncdyn, EcmaLessdyn, EcmaReturnundefined, - EcmaTonumber, + EcmaTonumeric, Imm, Jeqz, Jmp, @@ -228,7 +228,7 @@ describe("LoopWithLabelTests", function () { new StaDyn(j), new EcmaIncdyn(j), new StaDyn(j), - new EcmaTonumber(j), + new EcmaTonumeric(j), // jump to the loop header new Jmp(labelPre1), labelPost1, @@ -299,7 +299,7 @@ describe("LoopWithLabelTests", function () { new StaDyn(j), new EcmaIncdyn(j), new StaDyn(j), - new EcmaTonumber(j), + new EcmaTonumeric(j), // jump to the loop header new Jmp(labelPre1), labelPost1, diff --git a/ts2panda/tests/watch_expression/addWatch.test.ts b/ts2panda/tests/watch_expression/addWatch.test.ts index 7eacad422c..53ccee3695 100644 --- a/ts2panda/tests/watch_expression/addWatch.test.ts +++ b/ts2panda/tests/watch_expression/addWatch.test.ts @@ -48,7 +48,7 @@ import { EcmaStricteqdyn, EcmaSuspendgenerator, EcmaThrowdyn, - EcmaTonumber, + EcmaTonumeric, EcmaTypeofdyn, FldaiDyn, Imm, @@ -661,7 +661,7 @@ describe("WatchExpressions", function () { new LdaStr('a'), new StaDyn(new VReg()), new EcmaCallargs2dyn(new VReg(), new VReg(), new VReg()), - new EcmaTonumber(new VReg()), + new EcmaTonumeric(new VReg()), new ReturnDyn() ]; -- Gitee