|
14 | 14 | * limitations under the License.
|
15 | 15 | */
|
16 | 16 |
|
17 |
| -import { describe, it, expect } from "vitest"; |
| 17 | +import { it, expect } from "vitest"; |
18 | 18 | import type { SingleTextureChunkFormat } from "#src/sliceview/single_texture_chunk_format.js";
|
19 | 19 | import { defineChunkDataShaderAccess } from "#src/sliceview/volume/frontend.js";
|
20 | 20 | import type { TypedArray } from "#src/util/array.js";
|
@@ -43,7 +43,7 @@ export function chunkFormatTest<TextureLayout extends Disposable>(
|
43 | 43 | for (let channelIndex = 0; channelIndex < numChannels; ++channelIndex) {
|
44 | 44 | outputs[`output${channelIndex}`] = dataType;
|
45 | 45 | }
|
46 |
| - describe( |
| 46 | + it( |
47 | 47 | `volumeSize = ${volumeSize.join()}, numChannels = ${volumeSize[3]}, ` +
|
48 | 48 | `dataType = ${DataType[dataType]}`,
|
49 | 49 | () => {
|
@@ -116,28 +116,25 @@ output${channel} = getDataValue(${channel});
|
116 | 116 | const values = tester.values;
|
117 | 117 | for (let channel = 0; channel < numChannels; ++channel) {
|
118 | 118 | const curOffset = offset + channel * strides[3];
|
119 |
| - it( |
| 119 | + const msg = |
120 | 120 | `volumeSize = ${vec3Key(volumeSize)}, ` +
|
121 |
| - `positionInChunk = ${vec3Key(positionInChunk)}, ` + |
122 |
| - `channel = ${channel}, offset = ${curOffset}`, |
123 |
| - () => { |
124 |
| - switch (dataType) { |
125 |
| - case DataType.UINT64: { |
126 |
| - const result = values[`output${channel}`] as Uint64; |
127 |
| - expect([result.low, result.high]).toEqual([ |
128 |
| - rawData[curOffset * 2], |
129 |
| - rawData[curOffset * 2 + 1], |
130 |
| - ]); |
131 |
| - break; |
132 |
| - } |
133 |
| - default: { |
134 |
| - const result = values[`output${channel}`]; |
135 |
| - expect(result).toBe(rawData[curOffset]); |
136 |
| - break; |
137 |
| - } |
138 |
| - } |
139 |
| - }, |
140 |
| - ); |
| 121 | + `positionInChunk = ${vec3Key(positionInChunk)}, ` + |
| 122 | + `channel = ${channel}, offset = ${curOffset}`; |
| 123 | + switch (dataType) { |
| 124 | + case DataType.UINT64: { |
| 125 | + const result = values[`output${channel}`] as Uint64; |
| 126 | + expect([result.low, result.high], msg).toEqual([ |
| 127 | + rawData[curOffset * 2], |
| 128 | + rawData[curOffset * 2 + 1], |
| 129 | + ]); |
| 130 | + break; |
| 131 | + } |
| 132 | + default: { |
| 133 | + const result = values[`output${channel}`]; |
| 134 | + expect(result, msg).toBe(rawData[curOffset]); |
| 135 | + break; |
| 136 | + } |
| 137 | + } |
141 | 138 | }
|
142 | 139 | }
|
143 | 140 | checkPosition(vec3.fromValues(0, 0, 0));
|
|
0 commit comments