Skip to content

wgsl-tooling-wg/wesl-testsuite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WESL Examples for Testing

This package contains wesl source texts useful for tool builders to verify WESL parsing and linking.

Test Format

The source texts are published as an array of objects in both JSON and TypeScript format. The format is described in: TestSchema.ts

JSON version: importCases.json importSyntaxCases.json

TypeScript version: ImportCases.ts ImportSyntaxCases.ts

Adding New Tests

Author new examples in TypeScript. (TypeScript is similar to JSON but a little more user friendly for authoring.)

A tool is included in the package to convert the TypeScript objects to JSON.

Convert TypeScript Tests to JSON

Install dependencies

pnpm install

Generate JSON test cases from TypeScript

pnpm cases

Generate JSON test cases from TypeScript continuously

pnpm cases:watch

About

Shared tests for WGSL imports

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published