Skip to content

Commit 53f1046

Browse files
committed
test: Test built package
1 parent 6942210 commit 53f1046

116 files changed

Lines changed: 242 additions & 347 deletions

File tree

Some content is hidden

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

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/arrayBufferIO.test.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
import { attest } from '@ark/attest';
2-
import { describe, expect, expectTypeOf, vi } from 'vitest';
3-
import * as common from '../src/common/index.ts';
4-
import * as d from '../src/data/index.ts';
5-
import { sizeOf } from '../src/data/sizeOf.ts';
1+
import { describe, expect } from 'vitest';
62
import {
3+
d,
74
patchArrayBuffer,
85
readFromArrayBuffer,
96
writeToArrayBuffer,
10-
type ValidateBufferSchema,
11-
type ValidUsagesFor,
12-
} from '../src/index.js';
13-
import { getName } from '../src/shared/meta.ts';
14-
import type { InferPatch, IsValidBufferSchema, IsValidUniformSchema } from '../src/shared/repr.ts';
15-
import type { TypedArray } from '../src/shared/utilityTypes.ts';
7+
} from 'typegpu';
168
import { it } from 'typegpu-testing-utility';
179

1810
describe('arrayBufferIO', () => {

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/bufferShorthands.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, expectTypeOf } from 'vitest';
2-
import * as d from '../src/data/index.ts';
2+
import * as d from 'typegpu/data';
33
import { it } from 'typegpu-testing-utility';
44
import type {
55
StorageFlag,
@@ -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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, expectTypeOf } from 'vitest';
22

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

77
describe('TgpuBufferUniform', () => {

packages/typegpu/tests/constant.test.ts

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

55
const Boid = d.struct({

packages/typegpu/tests/data/atomic.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 * as d from '../../src/data/index.ts';
2+
import * as d from 'typegpu/data';
33

44
describe('d.atomic', () => {
55
it('creates a u32 atomic schema', () => {

packages/typegpu/tests/data/deepEqual.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ import {
2121
vec2f,
2222
vec2u,
2323
vec3f,
24-
} from '../../src/data/index.ts';
25-
import { ptrPrivate, ptrStorage, ptrWorkgroup } from '../../src/data/ptr.ts';
24+
ptrPrivate,
25+
ptrStorage,
26+
ptrWorkgroup,
27+
} from 'typegpu/data';
2628

2729
describe('deepEqual', () => {
2830
it('compares simple types', () => {

packages/typegpu/tests/data/ptr.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.ptrFn', () => {
55
it('wraps a schema and infers type properly', () => {

0 commit comments

Comments
 (0)