Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Creating Error Frames For Test Purposes #46

Closed
Milestone
@sjsimps

Description

@sjsimps

Hello,

In socketcan 1.7.0,CanFrame::new(...) had parameters as options to indicate that the canframe built was intended as an Error frame. See:https://docs.rs/socketcan/1.7.0/socketcan/struct.CANFrame.html#method.new

In 2.0.0, it appears that we cannot constructCanErrorFrames and that this is intentionally not supported. See:https://docs.rs/socketcan/2.0.0/src/socketcan/frame.rs.html#752-754

For my application, I want to mock something that returnsCanFrame data.
I want to be able to createCanErrorFrames to test our error cases.

How would I go about creating a CanErrorFrame for the purposes of mocking in tests? This is currently a requirement for me to move my app from 1.7.0 to 2.0.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp