Skip to content

Commit dc1724c

Browse files
committed
Update unit-test largedata.
1 parent 743c49e commit dc1724c

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

tests/largedata.test.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
import { DataType } from "../src/DataType";
22
import { SerializeField } from "../src/SerializeField";
33
import * as fs from "fs";
4-
import { BinarySerialize, BinaryDeserialize } from "../src/BinarySerializer";
4+
import { BinarySerialize, BinaryDeserialize, BinarySerializer } from "../src/BinarySerializer";
55

66

77
describe("largedata", () => {
88

99
it("case", () => {
10+
11+
var c= new Curve(null);
12+
1013
let buffer = fs.readFileSync("./testdata/prefab.json");
1114
let jstr = buffer.toString();
1215
let jobj = <GameObjectInfo>JSON.parse(jstr);
13-
let sd = BinarySerialize(jobj,GameObjectInfo);
16+
let [sd,sinfo] = BinarySerializer.SerializeWithDebugInfo(jobj,GameObjectInfo);
17+
18+
let [jobjd,dbginfo] = BinarySerializer.DeserializeWithDebugInfo(sd,GameObjectInfo,sinfo);
1419
});
1520
})
1621

@@ -120,9 +125,9 @@ class Curve {
120125
private framesDic: { [key: number]: number | string } = {}
121126

122127
public constructor(info: Curve) {
123-
this.aim = info.aim;
124-
this.type = info.type;
125-
this.frames = info.frames;
128+
// this.aim = info.aim;
129+
// this.type = info.type;
130+
// this.frames = info.frames;
126131
}
127132
}
128133

0 commit comments

Comments
 (0)