forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue rust-lang#3263 (rust-lang#3264)
- Loading branch information
1 parent
84702bc
commit 09c9cd4
Showing
2 changed files
with
33 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// rustfmt-format_strings: true | ||
// rustfmt-newline_style: Windows | ||
|
||
#[test] | ||
fn compile_empty_program() { | ||
let result = get_result(); | ||
let expected = "; ModuleID = \'foo\' | ||
; Function Attrs: nounwind | ||
declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) #0 | ||
declare i32 @write(i32, i8*, i32) | ||
declare i32 @putchar(i32) | ||
declare i32 @getchar() | ||
define i32 @main() { | ||
entry: | ||
ret i32 0 | ||
} | ||
attributes #0 = { nounwind } | ||
"; | ||
assert_eq!(result, CString::new(expected).unwrap()); | ||
} |