更新测试代码和测试快照.

pull/72/head
ChenX_AMD 6 years ago
parent 7c1d038093
commit 5954f75fb3

@ -29,9 +29,8 @@ test('旋转量', () =>
});
test('排序点', () =>
describe('排序测试', () =>
{
let pts = [
new Vector3(6, 2, 4),
new Vector3(1, 4, 3),
@ -40,12 +39,21 @@ test('排序点', () =>
new Vector3(1, 3, 1),
new Vector3(1, 2, 1),
]
pts.sort(comparePoint("xyz"));
expect(pts).toMatchSnapshot();
pts.sort(comparePoint("Xyz"));
expect(pts).toMatchSnapshot();
pts.sort(comparePoint("Zx"));
expect(pts).toMatchSnapshot();
test('排序点xyz', () =>
{
pts.sort(comparePoint("xyz"));
expect(pts).toMatchSnapshot();
});
test('排序点Xyz', () =>
{
pts.sort(comparePoint("Xyz"));
expect(pts).toMatchSnapshot();
});
test('排序点Zx', () =>
{
pts.sort(comparePoint("Zx"));
expect(pts).toMatchSnapshot();
});
});

@ -40,7 +40,112 @@ Vector3 {
}
`;
exports[`should behave... 1`] = `
exports[`排序点Xyz 1`] = `
Array [
Vector3 {
"x": 6,
"y": 2,
"z": 4,
},
Vector3 {
"x": 3,
"y": 3,
"z": 1,
},
Vector3 {
"x": 2,
"y": 2,
"z": 2,
},
Vector3 {
"x": 1,
"y": 2,
"z": 1,
},
Vector3 {
"x": 1,
"y": 3,
"z": 1,
},
Vector3 {
"x": 1,
"y": 4,
"z": 3,
},
]
`;
exports[`排序点Zx 1`] = `
Array [
Vector3 {
"x": 6,
"y": 2,
"z": 4,
},
Vector3 {
"x": 1,
"y": 4,
"z": 3,
},
Vector3 {
"x": 2,
"y": 2,
"z": 2,
},
Vector3 {
"x": 1,
"y": 2,
"z": 1,
},
Vector3 {
"x": 1,
"y": 3,
"z": 1,
},
Vector3 {
"x": 3,
"y": 3,
"z": 1,
},
]
`;
exports[`排序点xyz 1`] = `
Array [
Vector3 {
"x": 1,
"y": 2,
"z": 1,
},
Vector3 {
"x": 1,
"y": 3,
"z": 1,
},
Vector3 {
"x": 1,
"y": 4,
"z": 3,
},
Vector3 {
"x": 2,
"y": 2,
"z": 2,
},
Vector3 {
"x": 3,
"y": 3,
"z": 1,
},
Vector3 {
"x": 6,
"y": 2,
"z": 4,
},
]
`;
exports[`旋转量 1`] = `
Vector3 {
"x": 0.8775825618903728,
"y": 0.479425538604203,
@ -48,7 +153,7 @@ Vector3 {
}
`;
exports[`should behave... 2`] = `
exports[`旋转量 2`] = `
Vector3 {
"x": 1,
"y": 0,

@ -4,13 +4,13 @@ exports[`三维空间圆圆相交测试 1`] = `
Array [
Vector3 {
"x": 3.8465654731285666,
"y": -0.4898400510314999,
"z": 0.3777515851723181,
"y": -0.48984005103149847,
"z": 0.3777515851723183,
},
Vector3 {
"x": 4.518686772594937,
"y": -2.2643579789591692,
"z": -0.09066385360916451,
"x": 4.518686772594938,
"y": -2.26435797895917,
"z": -0.09066385360916496,
},
]
`;
@ -60,7 +60,15 @@ Array [
]
`;
exports[`三维空间圆圆相交测试 5`] = `Array []`;
exports[`三维空间圆圆相交测试 5`] = `
Array [
Vector3 {
"x": 2.5,
"y": 0,
"z": 0,
},
]
`;
exports[`三维空间直线和圆相交测试 1`] = `
Array [

@ -2,8 +2,8 @@
exports[`坐标系对齐 1`] = `
Vector3 {
"x": -5,
"y": -1,
"x": 4,
"y": 2,
"z": 0,
}
`;

Loading…
Cancel
Save