Skip to content

Latest commit

 

History

114 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 conditionalTranslation.json

TypeScript version: ImportCases.ts ImportSyntaxCases.ts ConditionalTranslation.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 build

Generate JSON test cases from TypeScript continuously

pnpm build:watch

License

Except where noted (below and/or in individual files), all code in this repository is dual-licensed under either:

at your option.

Your contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Shared tests for WESL

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages