Repository navigation
Commit c2c1259
## Summary
Issue #128 reported a `System.FormatException` when converting binary
int constants such as `0b10`. **That crash is already fixed on master**
— commit 9957153 ("Support binary literals, #83") landed after the 3.0.0
build the reporter was using.
Verified with the reporter's exact snippet through the CLI:
```java
static final int FLAG_LONG_FRAME = 0b10;
static final int FLAG_COMMAND_FRAME = 0b100;
```
converts cleanly to:
```csharp
static readonly int FLAG_LONG_FRAME = 0b10;
static readonly int FLAG_COMMAND_FRAME = 0b100;
```
## Why this PR
The binary literal path only had indirect coverage via the
`BinaryLiterals.java` integration test, and only for local variables —
never for fields, and never at the visitor level.
`IntegerLiteralExpressionVisitor` and `LongLiteralExpressionVisitor` had
no direct unit tests at all.
This adds two theories covering both visitors across every base they
handle:
- binary, including uppercase `0B` and underscore separators
(`0b1_0000`)
- hex (`0x1F`)
- octal (`010`)
- decimal
No production code changes. This PR is test-only coverage; #128 can be
closed as already fixed.
## Test plan
- [x] `dotnet test` — 284 passed, 0 failed
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 30b0894 commit c2c1259
1 file changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
21 | 46 | | |
22 | 47 | | |
0 commit comments