blob: 23943ece409fb79ae62debdeed65b4dada4e6a13 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// This test is brittle!
// xfail-pretty - the pretty tests lose path information, breaking #include
mod m1 {
mod m2 {
fn where_am_i() -> str { #mod[] }
}
}
fn main() {
assert(#line[] == 11u);
assert(#col[] == 12u);
assert(#file[].ends_with("syntax-extension-source-utils.rs"));
assert(#stringify[(2*3) + 5] == "2 * 3 + 5");
assert(#include["syntax-extension-source-utils-files/includeme.fragment"]
== "victory robot 6");
// The Windows tests are wrapped in an extra module for some reason
assert(m1::m2::where_am_i().ends_with("m1::m2"));
}
|