google / google/xls

DSLX assert_ne, etc.

Open
#4,227 0 comments 0 reactions 0 assignees View on GitHub
dslx enhancement testing
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

### What's hard to do? (limit 100 words)

DSLX unit tests only provide `assert_eq`. Sometimes you don't know what value it should be but know its bounds or what it shouldn't be (e.g. no longer zero).

### Current best alternative workaround (limit 100 words)

Use something like `assert_eq(x != 0, true);`. This is not as readable.

### Your view of the "best case XLS enhancement" (limit 100 words)

At least have some wider set of assertions, e.g. https://google.github.io/googletest/reference/assertions.html#boolean.

Rust has `assert_ne` but the others were rejected...some discussion can be found at https://internals.rust-lang.org/t/reviving-rfc-1662-assert-lt-assert-le-assert-gt-assert-ge/12643

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.