Add test for using line! in a macro
This commit is contained in:
parent
f2a8a71266
commit
d48bc263b5
@ -17,9 +17,12 @@ pub mod m1 {
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! indirect_line( () => ( line!() ) )
|
||||
|
||||
pub fn main() {
|
||||
assert(line!() == 21);
|
||||
assert(line!() == 23);
|
||||
assert(col!() == 11);
|
||||
assert(indirect_line!() == 25);
|
||||
assert(file!().to_owned().ends_with(~"syntax-extension-source-utils.rs"));
|
||||
assert(stringify!((2*3) + 5).to_owned() == ~"( 2 * 3 ) + 5");
|
||||
assert(include!("syntax-extension-source-utils-files/includeme.fragment").to_owned()
|
||||
|
Loading…
x
Reference in New Issue
Block a user