Skip to content

Commit bed2d33

Browse files
author
Thomas Jespersen
committed
Add "run-make" test for trace-macros flag
1 parent d14109e commit bed2d33

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This test verifies that "-Z trace-macros" works as it should. The traditional
2+
# "hello world" program provides a small example of this as not only println! is
3+
# listed, but also print! (since println! expands to this)
4+
5+
-include ../tools.mk
6+
7+
all:
8+
$(RUSTC) -o $(TMPDIR)/hello -Z trace-macros hello.rs &> $(TMPDIR)/hello.trace
9+
diff -u $(TMPDIR)/hello.trace hello.trace
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
fn main() {
12+
println!("Hello, World!");
13+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
println! { "Hello, World!" }
2+
print! { concat ! ( "Hello, World!" , "\n" ) }

0 commit comments

Comments
 (0)