microsoft / microsoft/typespec

Check parse results in parser tests

Open
#1,314 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

We have a lot of parser tests that only check 1) there are no parse errors 2) various invariants in the parse tree are respected, but they don't assert anything about the shape of the parse tree. Basically everything that uses parseEach without a callback, which is most of the positive parse tests.

You can make these tests pass with completely incorrect results. For example, if you returned an empty script.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.