Skip to content

Commit d4b9677

Browse files
committed
chore: Import from typegpu in public API tests
1 parent 17b7556 commit d4b9677

File tree

112 files changed

+387
-371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+387
-371
lines changed

apps/typegpu-docs/tests/individual-example-tests/oklab.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ describe('oklab example', () => {
182182
let g2 = (((-1.2684380046f * ldt2) + (2.6097574011f * mdt2)) - (0.3413193965f * sdt2));
183183
let u_g = (g1 / ((g1 * g1) - ((0.5f * g) * g2)));
184184
var t_g = (-(g) * u_g);
185-
let b_1 = ((((-0.0041960863f * l) - (0.7034186147f * m)) + (1.707614701f * s)) - 1f);
185+
let b2 = ((((-0.0041960863f * l) - (0.7034186147f * m)) + (1.707614701f * s)) - 1f);
186186
let b1 = (((-0.0041960863f * ldt) - (0.7034186147f * mdt)) + (1.707614701f * sdt));
187-
let b2 = (((-0.0041960863f * ldt2) - (0.7034186147f * mdt2)) + (1.707614701f * sdt2));
188-
let u_b = (b1 / ((b1 * b1) - ((0.5f * b_1) * b2)));
189-
var t_b = (-(b_1) * u_b);
187+
let b22 = (((-0.0041960863f * ldt2) - (0.7034186147f * mdt2)) + (1.707614701f * sdt2));
188+
let u_b = (b1 / ((b1 * b1) - ((0.5f * b2) * b22)));
189+
var t_b = (-(b2) * u_b);
190190
t_r = select(FLT_MAX, t_r, (u_r >= 0f));
191191
t_g = select(FLT_MAX, t_g, (u_g >= 0f));
192192
t_b = select(FLT_MAX, t_b, (u_b >= 0f));

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"dev": "DEV=true pnpm run --filter typegpu-docs dev",
2323
"dev:host": "DEV=true pnpm run --filter typegpu-docs dev --host --mode https",
2424
"fix": "oxlint -c oxlint.config.ts --fix && oxfmt",
25-
"test": "pnpm run test:types && pnpm run test:style && pnpm run test:unit-and-attest && pnpm run test:circular-deps",
25+
"test": "pnpm -r run build && pnpm run test:types && pnpm run test:style && TEST_BUILT_CODE=true pnpm run test:unit-and-attest && pnpm run test:circular-deps",
2626
"test:circular-deps": "pnpm dpdm -T --exit-code circular:1 packages/**/src/index.ts packages/**/src/index.js !packages/**/node_modules",
2727
"test:types": "pnpm run --filter typegpu-docs transform-overloads && pnpm run -r --parallel test:types",
2828
"test:style": "oxlint -c oxlint.config.ts --max-warnings=0 --type-aware --report-unused-disable-directives && oxfmt --check",

packages/typegpu/tests/accessor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, expectTypeOf } from 'vitest';
2-
import tgpu, { d, std, type TgpuAccessor } from '../src/index.js';
2+
import tgpu, { d, std, type TgpuAccessor } from 'typegpu';
33
import { it } from 'typegpu-testing-utility';
44

55
const RED = d.vec3f(1, 0, 0);

packages/typegpu/tests/align.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, expectTypeOf, it } from 'vitest';
2-
import { d, tgpu } from '../src/index.js';
2+
import { d, tgpu } from 'typegpu';
33

44
describe('d.align', () => {
55
it('adds @align attribute for custom aligned struct members', () => {

packages/typegpu/tests/array.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { attest } from '@ark/attest';
22
import { BufferReader, BufferWriter } from 'typed-binary';
33
import { describe, expect, expectTypeOf, it } from 'vitest';
44
import { readData, writeData } from '../src/data/dataIO.ts';
5-
import { d, tgpu } from '../src/index.js';
5+
import { d, tgpu } from 'typegpu';
66
import { namespace } from '../src/core/resolve/namespace.ts';
77
import { resolve } from '../src/resolutionCtx.ts';
88
import type { Infer } from '../src/shared/repr.ts';

packages/typegpu/tests/attributes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, expectTypeOf, it } from 'vitest';
2-
import { d, tgpu } from '../src/index.js';
2+
import { d, tgpu } from 'typegpu';
33

44
describe('attributes', () => {
55
it('adds attributes in the correct order', () => {

packages/typegpu/tests/bindGroupLayout.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
type TgpuBuffer,
77
type TgpuTextureView,
88
type UniformFlag,
9-
} from '../src/index.js';
9+
} from 'typegpu';
1010
import {
1111
type ExtractBindGroupInputFromLayout,
1212
MissingBindingError,

packages/typegpu/tests/buffer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { describe, expect, expectTypeOf, vi } from 'vitest';
33
import * as common from '../src/common/index.ts';
44
import * as d from '../src/data/index.ts';
55
import { sizeOf } from '../src/data/sizeOf.ts';
6-
import type { ValidateBufferSchema, ValidUsagesFor } from '../src/index.js';
6+
import type { ValidateBufferSchema, ValidUsagesFor } from 'typegpu';
77
import { getName } from '../src/shared/meta.ts';
88
import type { InferPatch, IsValidBufferSchema, IsValidUniformSchema } from '../src/shared/repr.ts';
99
import type { TypedArray } from '../src/shared/utilityTypes.ts';

packages/typegpu/tests/bufferShorthands.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type {
88
TgpuReadonly,
99
TgpuUniform,
1010
UniformFlag,
11-
} from '../src/index.js';
11+
} from 'typegpu';
1212
import { attest } from '@ark/attest';
1313

1414
describe('root.createMutable', () => {

packages/typegpu/tests/bufferUsage.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expect, expectTypeOf } from 'vitest';
22

3-
import { d, tgpu } from '../src/index.js';
3+
import { d, tgpu } from 'typegpu';
44
import type { Infer } from '../src/shared/repr.ts';
55
import { it } from 'typegpu-testing-utility';
66

0 commit comments

Comments
 (0)