Update test to include cone and torus brushes
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import {
|
||||
createConeBrush,
|
||||
createRadialPrismBrush,
|
||||
createTorusBrush,
|
||||
createWedgeBrush
|
||||
} from "../../src/document/brushes";
|
||||
import { createEmptySceneDocument } from "../../src/document/scene-document";
|
||||
@@ -11,7 +13,7 @@ import {
|
||||
} from "../../src/serialization/scene-document-json";
|
||||
|
||||
describe("whitebox primitive scene JSON", () => {
|
||||
it("round-trips wedge and cylinder brushes through scene JSON", () => {
|
||||
it("round-trips wedge, cylinder, cone, and torus brushes through scene JSON", () => {
|
||||
const document = createEmptySceneDocument({ name: "Primitive Scene" });
|
||||
const wedge = createWedgeBrush({
|
||||
id: "brush-wedge-json"
|
||||
@@ -20,9 +22,20 @@ describe("whitebox primitive scene JSON", () => {
|
||||
id: "brush-cylinder-json",
|
||||
sideCount: 12
|
||||
});
|
||||
const cone = createConeBrush({
|
||||
id: "brush-cone-json",
|
||||
sideCount: 12
|
||||
});
|
||||
const torus = createTorusBrush({
|
||||
id: "brush-torus-json",
|
||||
majorSegmentCount: 16,
|
||||
tubeSegmentCount: 8
|
||||
});
|
||||
|
||||
document.brushes[wedge.id] = wedge;
|
||||
document.brushes[cylinder.id] = cylinder;
|
||||
document.brushes[cone.id] = cone;
|
||||
document.brushes[torus.id] = torus;
|
||||
|
||||
expect(parseSceneDocumentJson(serializeSceneDocument(document))).toEqual(
|
||||
document
|
||||
|
||||
Reference in New Issue
Block a user