Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a test for complex integer divide by zero. #16475

Merged
merged 1 commit into from
Aug 16, 2014
Merged

Add a test for complex integer divide by zero. #16475

merged 1 commit into from
Aug 16, 2014

Conversation

treeman
Copy link
Contributor

@treeman treeman commented Aug 13, 2014

Did not find a test for it.

@brson
Copy link
Contributor

brson commented Aug 13, 2014

Thanks! Can this go in the num crate instead? Generally, crate unit tests should be in the crate they are testing.

@treeman
Copy link
Contributor Author

treeman commented Aug 14, 2014

I did not find any run-fail tests anywhere except in the src/test folder. Shall I create the directory src/libnum/test/run-fail and place the file there?

@huonw
Copy link
Member

huonw commented Aug 14, 2014

You can use the #[should_fail] directive,

#[test]
#[should_fail]
fn divide_by_zero() {
   ...
}

@treeman
Copy link
Contributor Author

treeman commented Aug 14, 2014

I see thanks. I realized this isn't a check for #5736, this is just a test for Complex<int>. It's still a relevant test however.

@treeman treeman changed the title Add a test for complex divide by zero. Add a test for complex integer divide by zero. Aug 14, 2014
@treeman
Copy link
Contributor Author

treeman commented Aug 16, 2014

retry?

bors added a commit that referenced this pull request Aug 16, 2014
@bors bors closed this Aug 16, 2014
@bors bors merged commit 0f40cf1 into rust-lang:master Aug 16, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 25, 2024
…t-edit, r=Veykril

feat: Support multiple tab stops for completions in VSCode

Uses the native VSCode support for `SnippetTextEdit`s. Fixes rust-lang#13229 and fixes rust-lang#8531.

https://github.com/rust-lang/rust-analyzer/assets/13354275/a2d2c033-bb30-4f34-92ca-bf3f4f744cdc

This is done in a slightly hacky way, as `vscode-languageclient` can't convert RA's `SnippetTextEdit`s into vscode `SnippetTextEdit`s and will appear to use a [different format](https://github.com/microsoft/vscode-languageserver-node/blob/295aaa393fda8ecce110c38880a00466b9320e63/types/src/main.ts#L1501-L1516) in the future.

---

~~Marked as draft since as-is, this will cause completions to double-indent any multi-line code generated.~~
**Update:** This also fixes up edits so that any multi-line code won't be double-indented.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 25, 2024
…cape-left-curly, r=Veykril

fix: Don't add `\` before `{`

Fixes rust-lang#16607 for `{`. The `}` case is already fixed by rust-lang#16475.

The [LSP snippet grammar](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax) only specifies that `$`, `}`, and `\` can be escaped with backslashes, but not `{`.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants