]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/format_strings/issue-202.rs
Rollup merge of #85326 - infinity0:fix-cross-compile-tools, r=Mark-Simulacrum
[rust.git] / src / tools / rustfmt / tests / target / format_strings / issue-202.rs
1 // rustfmt-format_strings: true
2
3 #[test]
4 fn compile_empty_program() {
5     let result = get_result();
6     let expected = "; ModuleID = \'foo\'
7
8 ; Function Attrs: nounwind
9 declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) #0
10
11 declare i32 @write(i32, i8*, i32)
12
13 declare i32 @putchar(i32)
14
15 declare i32 @getchar()
16
17 define i32 @main() {
18 entry:
19   ret i32 0
20 }
21
22 attributes #0 = { nounwind }
23 ";
24     assert_eq!(result, CString::new(expected).unwrap());
25 }