llvm / llvm/circt

Use `CHECK{LITERAL}` in tests

Open
#2,441 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

There are bunch of tests like this:
```
// CHECK-NEXT: sv.verbatim "assign {{[{][{]0[}][}]}}.baz = {{[{][{]1[}][}]}}.{{[{][{]2[}][}]}}.{{[{][{]3[}][}]}};"
```
This is very hard to read. It is possible to simplify like this using LITERAL directive.
https://llvm.org/docs/CommandGuide/FileCheck.html#directive-modifiers
```
// CHECK-NEXT{LITERAL}: sv.verbatim "assign {{0}}.foo = {{1}}.{{2}}.{{3}};"
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the CIRCT test suite for CHECK directives with escaped literal braces like the example, then read the surrounding FileCheck tests and the LITERAL directive documentation. Replace applicable patterns with CHECK-NEXT{LITERAL} while preserving the expected output, and run the affected test commands to confirm they still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.