Skip to content

Conversation

@nyurik
Copy link
Member

@nyurik nyurik commented Jan 21, 2026

This tests the file submitted by @rnd-ash in #98. It seems the file already generates and compiles correctly.

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the shared test files submodule to the latest version and adds a new test case to verify the fix for bug #98 reported by @rnd-ash. The change confirms that the previously problematic file now generates and compiles correctly.

Changes:

  • Updated shared-test-files submodule to latest commit
  • Added new snapshot test files for bug_dbc-codegen_98 case

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 10 comments.

File Description
tests/fixtures/shared-test-files Updates submodule commit reference to include new test case
tests-snapshots/oxibus/bug_dbc-codegen_98.snap.rs Adds generated Rust code snapshot for the new test case
tests-snapshots/oxibus/bug_dbc-codegen_98.snap Adds metadata file for the new snapshot test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nyurik nyurik merged commit 8744db5 into oxibus:main Jan 23, 2026
7 checks passed
@nyurik nyurik deleted the update-tests branch January 23, 2026 20:55
@nyurik nyurik mentioned this pull request Jan 23, 2026
nyurik added a commit that referenced this pull request Jan 23, 2026
This PR includes #127 which should be merged first

In a case with duplicate names:

```
VAL_TABLE_ Bar 6 "reserved" 5 "reserved" 4 "unused 2" 3 "unused" 2 "unused" 1 "#%=*�'" 0 "With space" -5 "A negative value" ;
VAL_ 0 Foo 6 "reserved" 5 "reserved" 4 "unused 2" 3 "unused" 2 "unused" 1 "#%=*�'" 0 "With space" -5 "A negative value" ;
```

generate parametrized enum instead:

```rust
match signal {
    6 => FooFoo::Reserved(6),
    5 => FooFoo::Reserved(5),
    4 => FooFoo::Unused2,
    3 => FooFoo::Unused(3),
    2 => FooFoo::Unused(2),
    1 => FooFoo::XÄ,
    0 => FooFoo::WithSpace,
    -5 => FooFoo::ANegativeValue,
    _ => FooFoo::_Other(self.foo_raw()),
}
```

* use appropriate signed type too: `u8` -> `i8`

```
let signal = self.raw.view_bits::<Lsb0>()[0..8].load_le::<i8>();
```

* streamline multiplex indicator handling and enhance enum variant
generation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants