From 93d64a811074d0b273f3ba6e1faff9026cec1e4b Mon Sep 17 00:00:00 2001 From: ChenX Date: Thu, 30 Nov 2023 15:46:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91:=E6=9B=B4=E6=96=B0=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=BF=AB=E7=85=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __test__/FileSystem/__snapshots__/file.test.ts.snap | 6 +++--- __test__/FileSystem/file.test.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/__test__/FileSystem/__snapshots__/file.test.ts.snap b/__test__/FileSystem/__snapshots__/file.test.ts.snap index 6a5dbf5b3..6381e2b91 100644 --- a/__test__/FileSystem/__snapshots__/file.test.ts.snap +++ b/__test__/FileSystem/__snapshots__/file.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`changev 1`] = `"[11,101,1,2,1,0,0,1,\\"\\",2,2,0,0,1,\\"Line\\",10,2,100,0,1,7,0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,1,[2,3,4],[0,0,0],2,4,0,0,5,0,2,3,0,0,5,0,0,0,0,0,1,0,1,\\"CommandHistoryRecord\\",1,\\"\\",2,2,1,\\"HistorycRecord\\",1,\\"RemoveObjectData\\",1,0,\\"CreateObjectData\\",1,[\\"Line\\",10,2,100,0,1,7,0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,1,[0,0,0],[0,0,0]],\\"\\",100,1,\\"ObjectAllDataHistoryRecord\\",1,1,\\"AllObjectData\\",1,[10,2,100,0,1,7,0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,1,[0,0,0],[0,0,0]],\\"\\",\\"\\",100,2,5,0,0,0,1,2,6,0,0,0,1,2,7,0,0,1,\\"\\",2,8,0,0,0,2,9,0,0,0,1,2,10,0,0,1,\\"\\",2,11,0,0,0,0,1,2,12,0,0,5,0,0,null]"`; +exports[`changev 1`] = `"[11,101,1,2,1,0,0,1,\\"\\",2,2,0,0,1,\\"Line\\",10,2,100,0,1,7,0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,1,[2,3,4],[0,0,0],2,4,0,0,5,0,2,3,0,0,5,0,0,0,0,0,1,0,1,\\"CommandHistoryRecord\\",1,\\"\\",2,2,1,\\"HistorycRecord\\",2,\\"RemoveObjectData\\",1,0,\\"CreateObjectData\\",1,[\\"Line\\",10,2,100,0,1,7,0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,1,[0,0,0],[0,0,0]],100,1,\\"ObjectAllDataHistoryRecord\\",1,2,\\"AllObjectData\\",1,[10,2,100,0,1,7,0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,1,[0,0,0],[0,0,0]],\\"\\",100,2,5,0,0,0,1,2,6,0,0,0,1,2,7,0,0,1,\\"\\",2,8,0,0,0,2,9,0,0,0,1,2,10,0,0,1,\\"\\",2,11,0,0,0,0,1,2,12,0,0,5,0,0,null]"`; exports[`创建 修改 撤销撤销 重做重做 撤销 重做 1`] = `"[11,101,1,2,1,0,0,1,\\"\\",2,2,0,0,1,\\"Line\\",10,2,100,0,1,7,0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,1,[1,2,3],[0,0,0],2,4,0,0,5,0,2,3,0,0,5,0,0,0,0,0,1,0,1,\\"CommandHistoryRecord\\",1,\\"\\",1,2,1,\\"HistorycRecord\\",1,\\"RemoveObjectData\\",1,0,\\"CreateObjectData\\",1,[\\"Line\\",10,2,100,0,1,7,0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,1,[1,2,3],[0,0,0]],\\"\\",2,5,0,0,0,1,2,6,0,0,0,1,2,7,0,0,1,\\"\\",2,8,0,0,0,2,9,0,0,0,1,2,10,0,0,1,\\"\\",2,11,0,0,0,0,1,2,12,0,0,5,0,0,null]"`; @@ -14,10 +14,10 @@ exports[`测试创建 3`] = `"[\\"CommandHistoryRecord\\",1,\\"\\",0]"`; exports[`测试创建 4`] = `"[\\"CreateObjectData\\",1,[]]"`; -exports[`测试创建 5`] = `"[\\"HistorycRecord\\",1,\\"\\",\\"\\",\\"\\"]"`; +exports[`测试创建 5`] = `"[\\"HistorycRecord\\",2,\\"\\",\\"\\"]"`; exports[`测试创建 6`] = `"[\\"Line\\",10,2,0,0,0,7,0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0,0,1,1,[0,0,0],[0,0,0]]"`; -exports[`测试创建 7`] = `"[\\"ObjectAllDataHistoryRecord\\",1,1,\\"\\",\\"\\",\\"\\",0]"`; +exports[`测试创建 7`] = `"[\\"ObjectAllDataHistoryRecord\\",1,2,\\"\\",\\"\\",0]"`; exports[`测试创建 8`] = `"[\\"RemoveObjectData\\",1,null]"`; diff --git a/__test__/FileSystem/file.test.ts b/__test__/FileSystem/file.test.ts index a9a38db0e..4216c9763 100644 --- a/__test__/FileSystem/file.test.ts +++ b/__test__/FileSystem/file.test.ts @@ -169,7 +169,7 @@ test('创建 修改 撤销撤销 重做重做 撤销 重做', () => let line = new Line(); db.ModelSpace.Append(line); - db.hm.StartCmd("U"); + db.hm.StartCmd(""); line.StartPoint = new Vector3(1, 2, 3); db.hm.EndCmd();