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

Add tests for ClosureOnce.#41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
tov wants to merge1 commit intomaster
base:master
Choose a base branch
Loading
fromclosure-once-test
Draft

Conversation

@tov
Copy link
Collaborator

@tovtov commentedDec 20, 2021

We check that we can call aClosureOnce once successfully, but calling it a second time is an error. Normally if this error occurs, the program exits (code 2), because it isn’t safe to panic when calling an FFI callback. However, incfg(test) this error instead causes a panic, so that we can test the error using#[should_panic].

We check that we can call a ClosureOnce once successfully,but it’s an error to call it twice. Normally if this erroroccurs, the program exits (code 2), because it isn’tsafe to panic when calling a callback. However, incfg(test) this error results in a panic so that we cantest the error using #[should_panic].
@tovtov marked this pull request as draftDecember 20, 2021 19:47
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@tov

[8]ページ先頭

©2009-2025 Movatter.jp