]> git.lizzy.rs Git - rust.git/commitdiff
test: Move tests with rustc deps into run-pass-fulldeps
authorBrian Anderson <banderson@mozilla.com>
Fri, 1 Jun 2012 23:01:53 +0000 (16:01 -0700)
committerBrian Anderson <banderson@mozilla.com>
Fri, 1 Jun 2012 23:01:56 +0000 (16:01 -0700)
These tests require a lot more to be built before running so are not part of
check-lite

configure
mk/tests.mk
src/test/run-pass-fulldeps/issue-1926.rs [new file with mode: 0644]
src/test/run-pass-fulldeps/issue-2316.rs [new file with mode: 0644]
src/test/run-pass-fulldeps/qquote.rs [new file with mode: 0644]
src/test/run-pass/issue-1926.rs [deleted file]
src/test/run-pass/issue-2316.rs [deleted file]
src/test/run-pass/qquote.rs [deleted file]

index 7ee140e60692219d1b48015ac2b74123b8f6e7d4..f77c726a581bf97447c7c8f8c6a116ad85c7b971 100755 (executable)
--- a/configure
+++ b/configure
@@ -493,6 +493,7 @@ do
     done
 
     make_dir $h/test/run-pass
+    make_dir $h/test/run-pass-fulldeps
     make_dir $h/test/run-fail
     make_dir $h/test/compile-fail
     make_dir $h/test/bench
index 1a25baad8ade31cbf1ed83b29017b8247317a66b..8b8b9867933c8f0a8a5504d71a0d75637e04f472 100644 (file)
@@ -4,6 +4,8 @@
 
 RPASS_RC := $(wildcard $(S)src/test/run-pass/*.rc)
 RPASS_RS := $(wildcard $(S)src/test/run-pass/*.rs)
+RPASS_FULL_RC := $(wildcard $(S)src/test/run-pass-fulldeps/*.rc)
+RPASS_FULL_RS := $(wildcard $(S)src/test/run-pass-fulldeps/*.rs)
 RFAIL_RC := $(wildcard $(S)src/test/run-fail/*.rc)
 RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
 CFAIL_RC := $(wildcard $(S)src/test/compile-fail/*.rc)
@@ -16,6 +18,7 @@ PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
 PERF_RS := $(wildcard $(S)src/test/bench/*.rs)
 
 RPASS_TESTS := $(RPASS_RC) $(RPASS_RS)
+RPASS_FULL_TESTS := $(RPASS_FULL_RC) $(RPASS_FULL_RS)
 RFAIL_TESTS := $(RFAIL_RC) $(RFAIL_RS)
 CFAIL_TESTS := $(CFAIL_RC) $(CFAIL_RS)
 BENCH_TESTS := $(BENCH_RS)
@@ -183,15 +186,20 @@ define TEST_STAGEN
 # Prerequisites for compiletest tests
 TEST_SREQ$(1)_T_$(2)_H_$(3) = \
        $$(HBIN$(1)_H_$(3))/compiletest$$(X) \
-       $$(HSREQ$(1)_$(2)_$(3)) \
-       $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX)
+       $$(HSREQ$(1)_$(2)_$(3)) 
 
+# Prerequisites for compiletest tests that have deps on librustc, etc
+FULL_TEST_SREQ$(1)_T_$(2)_H_$(3) = \
+       $$(HBIN$(1)_H_$(3))/compiletest$$(X) \
+       $$(HSREQ$(1)_$(2)_$(3)) \
+       $$(TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3))
 
 check-stage$(1)-T-$(2)-H-$(3): tidy                            \
        check-stage$(1)-T-$(2)-H-$(3)-rustc                     \
        check-stage$(1)-T-$(2)-H-$(3)-core          \
        check-stage$(1)-T-$(2)-H-$(3)-std                       \
        check-stage$(1)-T-$(2)-H-$(3)-rpass                     \
+       check-stage$(1)-T-$(2)-H-$(3)-rpass-full                        \
        check-stage$(1)-T-$(2)-H-$(3)-rfail                     \
        check-stage$(1)-T-$(2)-H-$(3)-cfail                     \
        check-stage$(1)-T-$(2)-H-$(3)-bench                     \
@@ -218,6 +226,9 @@ check-stage$(1)-T-$(2)-H-$(3)-rfail:                                \
 check-stage$(1)-T-$(2)-H-$(3)-rpass:                           \
        check-stage$(1)-T-$(2)-H-$(3)-rpass-dummy
 
+check-stage$(1)-T-$(2)-H-$(3)-rpass-full:                              \
+       check-stage$(1)-T-$(2)-H-$(3)-rpass-full-dummy
+
 check-stage$(1)-T-$(2)-H-$(3)-bench:                           \
        check-stage$(1)-T-$(2)-H-$(3)-bench-dummy
 
@@ -226,6 +237,7 @@ check-stage$(1)-T-$(2)-H-$(3)-perf:                         \
 
 check-stage$(1)-T-$(2)-H-$(3)-pretty:                  \
        check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass      \
+       check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full \
     check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail \
     check-stage$(1)-T-$(2)-H-$(3)-pretty-bench \
     check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty
@@ -233,6 +245,9 @@ check-stage$(1)-T-$(2)-H-$(3)-pretty:                       \
 check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass:                    \
        check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-dummy
 
+check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full:                       \
+       check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-dummy
+
 check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail:                    \
        check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-dummy
 
@@ -343,6 +358,13 @@ RPASS_ARGS$(1)-T-$(2)-H-$(3) :=                            \
         --mode run-pass                                        \
         $$(CTEST_RUNTOOL)
 
+RPASS_FULL_ARGS$(1)-T-$(2)-H-$(3) :=                           \
+               $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
+        --src-base $$(S)src/test/run-pass-fulldeps/            \
+        --build-base $(3)/test/run-pass-fulldeps/              \
+        --mode run-pass                                        \
+        $$(CTEST_RUNTOOL)
+
 BENCH_ARGS$(1)-T-$(2)-H-$(3) :=                                \
                $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
         --src-base $$(S)src/test/bench/                        \
@@ -363,6 +385,12 @@ PRETTY_RPASS_ARGS$(1)-T-$(2)-H-$(3) :=                     \
         --build-base $(3)/test/run-pass/               \
         --mode pretty
 
+PRETTY_RPASS_FULL_ARGS$(1)-T-$(2)-H-$(3) :=                    \
+               $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
+        --src-base $$(S)src/test/run-pass-fulldeps/            \
+        --build-base $(3)/test/run-pass-fulldeps/              \
+        --mode pretty
+
 PRETTY_RFAIL_ARGS$(1)-T-$(2)-H-$(3) :=                 \
                $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
         --src-base $$(S)src/test/run-fail/             \
@@ -412,11 +440,19 @@ check-stage$(1)-T-$(2)-H-$(3)-rfail-dummy:                \
 check-stage$(1)-T-$(2)-H-$(3)-rpass-dummy:             \
                $$(TEST_SREQ$(1)_T_$(2)_H_$(3))         \
                $$(RPASS_TESTS)
-       @$$(call E, run rpass: $$<)
+       @$$(call E, run rpass-full: $$<)
        $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
                $$(RPASS_ARGS$(1)-T-$(2)-H-$(3)) \
                --logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-rpass.log
 
+check-stage$(1)-T-$(2)-H-$(3)-rpass-full-dummy:                \
+               $$(FULL_TEST_SREQ$(1)_T_$(2)_H_$(3))            \
+               $$(RPASS_FULL_TESTS)
+       @$$(call E, run rpass: $$<)
+       $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
+               $$(RPASS_FULL_ARGS$(1)-T-$(2)-H-$(3)) \
+               --logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-rpass-full.log
+
 check-stage$(1)-T-$(2)-H-$(3)-bench-dummy:             \
                $$(TEST_SREQ$(1)_T_$(2)_H_$(3))         \
                $$(BENCH_TESTS)
@@ -441,6 +477,14 @@ check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-dummy:  \
                $$(PRETTY_RPASS_ARGS$(1)-T-$(2)-H-$(3)) \
                --logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass.log
 
+check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-dummy: \
+               $$(FULL_TEST_SREQ$(1)_T_$(2)_H_$(3))            \
+               $$(RPASS_FULL_TESTS)
+       @$$(call E, run pretty-rpass-full: $$<)
+       $$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
+               $$(PRETTY_RPASS_FULL_ARGS$(1)-T-$(2)-H-$(3)) \
+               --logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full.log
+
 check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-dummy:      \
                $$(TEST_SREQ$(1)_T_$(2)_H_$(3))         \
                $$(RFAIL_TESTS)
@@ -562,6 +606,9 @@ check-stage$(1)-H-$(2)-std:                                 \
 check-stage$(1)-H-$(2)-rpass:                                  \
        $$(foreach target,$$(CFG_TARGET_TRIPLES),       \
         check-stage$(1)-T-$$(target)-H-$(2)-rpass)
+check-stage$(1)-H-$(2)-rpass-full:                                     \
+       $$(foreach target,$$(CFG_TARGET_TRIPLES),       \
+        check-stage$(1)-T-$$(target)-H-$(2)-rpass-full)
 check-stage$(1)-H-$(2)-rfail:                                  \
        $$(foreach target,$$(CFG_TARGET_TRIPLES),       \
         check-stage$(1)-T-$$(target)-H-$(2)-rfail)
@@ -577,6 +624,9 @@ check-stage$(1)-H-$(2)-pretty:                                      \
 check-stage$(1)-H-$(2)-pretty-rpass:                           \
        $$(foreach target,$$(CFG_TARGET_TRIPLES),       \
         check-stage$(1)-T-$$(target)-H-$(2)-pretty-rpass)
+check-stage$(1)-H-$(2)-pretty-rpass-full:                              \
+       $$(foreach target,$$(CFG_TARGET_TRIPLES),       \
+        check-stage$(1)-T-$$(target)-H-$(2)-pretty-rpass-full)
 check-stage$(1)-H-$(2)-pretty-rfail:                           \
        $$(foreach target,$$(CFG_TARGET_TRIPLES),       \
         check-stage$(1)-T-$$(target)-H-$(2)-pretty-rfail)
@@ -631,6 +681,9 @@ check-stage$(1)-H-all-std: \
 check-stage$(1)-H-all-rpass: \
        $$(foreach target,$$(CFG_TARGET_TRIPLES),       \
         check-stage$(1)-H-$$(target)-rpass)
+check-stage$(1)-H-all-rpass-full: \
+       $$(foreach target,$$(CFG_TARGET_TRIPLES),       \
+        check-stage$(1)-H-$$(target)-rpass-full)
 check-stage$(1)-H-all-rfail: \
        $$(foreach target,$$(CFG_TARGET_TRIPLES),       \
         check-stage$(1)-H-$$(target)-rfail)
@@ -646,6 +699,9 @@ check-stage$(1)-H-all-pretty: \
 check-stage$(1)-H-all-pretty-rpass: \
        $$(foreach target,$$(CFG_TARGET_TRIPLES),       \
         check-stage$(1)-H-$$(target)-pretty-rpass)
+check-stage$(1)-H-all-pretty-rpass-full: \
+       $$(foreach target,$$(CFG_TARGET_TRIPLES),       \
+        check-stage$(1)-H-$$(target)-pretty-rpass-full)
 check-stage$(1)-H-all-pretty-rfail: \
        $$(foreach target,$$(CFG_TARGET_TRIPLES),       \
         check-stage$(1)-H-$$(target)-pretty-rfail)
@@ -678,11 +734,13 @@ check-stage$(1)-rustc: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rustc
 check-stage$(1)-core: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-core
 check-stage$(1)-std: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-std
 check-stage$(1)-rpass: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rpass
+check-stage$(1)-rpass-full: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rpass-full
 check-stage$(1)-rfail: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rfail
 check-stage$(1)-cfail: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-cfail
 check-stage$(1)-bench: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-bench
 check-stage$(1)-pretty: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty
 check-stage$(1)-pretty-rpass: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-rpass
+check-stage$(1)-pretty-rpass-full: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-rpass-full
 check-stage$(1)-pretty-rfail: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-rfail
 check-stage$(1)-pretty-bench: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-bench
 check-stage$(1)-pretty-pretty: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-pretty
diff --git a/src/test/run-pass-fulldeps/issue-1926.rs b/src/test/run-pass-fulldeps/issue-1926.rs
new file mode 100644 (file)
index 0000000..383a1ac
--- /dev/null
@@ -0,0 +1,53 @@
+// xfail-test
+// fails pretty printing for some reason
+use syntax;
+import syntax::diagnostic;
+import syntax;
+import syntax::ast;
+import syntax::codemap;
+import syntax::print::pprust;
+import syntax::parse::parser;
+
+fn new_parse_sess() -> parser::parse_sess {
+    let cm = codemap::new_codemap();
+    let handler = diagnostic::mk_handler(option::none);
+    let sess = @{
+        cm: cm,
+        mut next_id: 1,
+        span_diagnostic: diagnostic::mk_span_handler(handler, cm),
+        mut chpos: 0u,
+        mut byte_pos: 0u
+    };
+    ret sess;
+}
+
+iface fake_ext_ctxt {
+    fn session() -> fake_session;
+    fn cfg() -> ast::crate_cfg;
+    fn parse_sess() -> parser::parse_sess;
+}
+
+type fake_options = {cfg: ast::crate_cfg};
+
+type fake_session = {opts: @fake_options,
+                     parse_sess: parser::parse_sess};
+
+impl of fake_ext_ctxt for fake_session {
+    fn session() -> fake_session {self}
+    fn cfg() -> ast::crate_cfg { self.opts.cfg }
+    fn parse_sess() -> parser::parse_sess { self.parse_sess }
+}
+
+fn mk_ctxt() -> fake_ext_ctxt {
+    let opts : fake_options = {cfg: []};
+    {opts: @opts, parse_sess: new_parse_sess()} as fake_ext_ctxt
+}
+
+
+fn main() {
+    let ext_cx = mk_ctxt();
+    let s = #ast(expr){__s};
+    let e = #ast(expr){__e};
+    let f = #ast(expr){$(s).foo {|__e| $(e)}};
+    log(error, pprust::expr_to_str(f));
+}
diff --git a/src/test/run-pass-fulldeps/issue-2316.rs b/src/test/run-pass-fulldeps/issue-2316.rs
new file mode 100644 (file)
index 0000000..a95b984
--- /dev/null
@@ -0,0 +1,5 @@
+use rustc;
+import rustc::middle::ty;
+fn main() {
+  let _t: ty::sty = rustc::middle::ty::ty_nil;
+}
diff --git a/src/test/run-pass-fulldeps/qquote.rs b/src/test/run-pass-fulldeps/qquote.rs
new file mode 100644 (file)
index 0000000..b2c0bf9
--- /dev/null
@@ -0,0 +1,111 @@
+// xfail-pretty
+
+use std;
+use syntax;
+
+import io::*;
+
+import syntax::diagnostic;
+import syntax::ast;
+import syntax::codemap;
+import syntax::parse;
+import syntax::print::*;
+
+fn new_parse_sess() -> parse::parse_sess {
+    let cm = codemap::new_codemap();
+    let handler = diagnostic::mk_handler(option::none);
+    let sess = @{
+        cm: cm,
+        mut next_id: 1,
+        span_diagnostic: diagnostic::mk_span_handler(handler, cm),
+        mut chpos: 0u,
+        mut byte_pos: 0u
+    };
+    ret sess;
+}
+
+iface fake_ext_ctxt {
+    fn cfg() -> ast::crate_cfg;
+    fn parse_sess() -> parse::parse_sess;
+}
+
+type fake_session = ();
+
+impl of fake_ext_ctxt for fake_session {
+    fn cfg() -> ast::crate_cfg { [] }
+    fn parse_sess() -> parse::parse_sess { new_parse_sess() }
+}
+
+fn mk_ctxt() -> fake_ext_ctxt {
+    () as fake_ext_ctxt
+}
+
+
+fn main() {
+    let ext_cx = mk_ctxt();
+
+    let abc = #ast{23};
+    check_pp(abc,  pprust::print_expr, "23");
+
+    let expr3 = #ast{2 - $(abc) + 7};
+    check_pp(expr3,  pprust::print_expr, "2 - 23 + 7");
+
+    let expr4 = #ast{2 - $(#ast{3}) + 9};
+    check_pp(expr4,  pprust::print_expr, "2 - 3 + 9");
+
+    let ty = #ast(ty){int};
+    check_pp(ty, pprust::print_type, "int");
+
+    let ty2 = #ast(ty){option<$(ty)>};
+    check_pp(ty2, pprust::print_type, "option<int>");
+
+    let item = #ast(item){const x : int = 10;};
+    check_pp(item, pprust::print_item, "const x: int = 10;");
+
+    let item2: @ast::item = #ast(item){const x : int = $(abc);};
+    check_pp(item2, pprust::print_item, "const x: int = 23;");
+
+    let stmt = #ast(stmt){let x = 20;};
+    check_pp(*stmt, pprust::print_stmt, "let x = 20;");
+
+    let stmt2 = #ast(stmt){let x : $(ty) = $(abc);};
+    check_pp(*stmt2, pprust::print_stmt, "let x: int = 23;");
+
+    let pat = #ast(pat){some(_)};
+    check_pp(pat, pprust::print_pat, "some(_)");
+
+    // issue #1785
+    let x = #ast{1};
+    let test1 = #ast{1+$(x)};
+    check_pp(test1, pprust::print_expr, "1 + 1");
+
+    let test2 = #ast{$(x)+1};
+    check_pp(test2, pprust::print_expr, "1 + 1");
+
+    let y = #ast{2};
+    let test3 = #ast{$(x) + $(y)};
+    check_pp(test3, pprust::print_expr, "1 + 2");
+
+    let crate = #ast(crate) { fn a() { } };
+    check_pp(crate, pprust::print_crate_, "fn a() { }\n");
+
+    // issue #1926
+    let s = #ast(expr){__s};
+    let e = #ast(expr){__e};
+    let call = #ast(expr){$(s).foo {|__e| $(e)}};
+    check_pp(call, pprust::print_expr, "__s.foo {|__e| __e }")
+}
+
+fn check_pp<T>(expr: T, f: fn(pprust::ps, T), expect: str) {
+    let buf = mem_buffer();
+    let pp = pprust::rust_printer(buf as io::writer);
+    f(pp, expr);
+    pp::eof(pp.s);
+    let str = mem_buffer_str(buf);
+    stdout().write_line(str);
+    if expect != "" {
+        #error("expect: '%s', got: '%s'", expect, str);
+        assert str == expect;
+    }
+}
+
diff --git a/src/test/run-pass/issue-1926.rs b/src/test/run-pass/issue-1926.rs
deleted file mode 100644 (file)
index 383a1ac..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// xfail-test
-// fails pretty printing for some reason
-use syntax;
-import syntax::diagnostic;
-import syntax;
-import syntax::ast;
-import syntax::codemap;
-import syntax::print::pprust;
-import syntax::parse::parser;
-
-fn new_parse_sess() -> parser::parse_sess {
-    let cm = codemap::new_codemap();
-    let handler = diagnostic::mk_handler(option::none);
-    let sess = @{
-        cm: cm,
-        mut next_id: 1,
-        span_diagnostic: diagnostic::mk_span_handler(handler, cm),
-        mut chpos: 0u,
-        mut byte_pos: 0u
-    };
-    ret sess;
-}
-
-iface fake_ext_ctxt {
-    fn session() -> fake_session;
-    fn cfg() -> ast::crate_cfg;
-    fn parse_sess() -> parser::parse_sess;
-}
-
-type fake_options = {cfg: ast::crate_cfg};
-
-type fake_session = {opts: @fake_options,
-                     parse_sess: parser::parse_sess};
-
-impl of fake_ext_ctxt for fake_session {
-    fn session() -> fake_session {self}
-    fn cfg() -> ast::crate_cfg { self.opts.cfg }
-    fn parse_sess() -> parser::parse_sess { self.parse_sess }
-}
-
-fn mk_ctxt() -> fake_ext_ctxt {
-    let opts : fake_options = {cfg: []};
-    {opts: @opts, parse_sess: new_parse_sess()} as fake_ext_ctxt
-}
-
-
-fn main() {
-    let ext_cx = mk_ctxt();
-    let s = #ast(expr){__s};
-    let e = #ast(expr){__e};
-    let f = #ast(expr){$(s).foo {|__e| $(e)}};
-    log(error, pprust::expr_to_str(f));
-}
diff --git a/src/test/run-pass/issue-2316.rs b/src/test/run-pass/issue-2316.rs
deleted file mode 100644 (file)
index a95b984..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-use rustc;
-import rustc::middle::ty;
-fn main() {
-  let _t: ty::sty = rustc::middle::ty::ty_nil;
-}
diff --git a/src/test/run-pass/qquote.rs b/src/test/run-pass/qquote.rs
deleted file mode 100644 (file)
index b2c0bf9..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-// xfail-pretty
-
-use std;
-use syntax;
-
-import io::*;
-
-import syntax::diagnostic;
-import syntax::ast;
-import syntax::codemap;
-import syntax::parse;
-import syntax::print::*;
-
-fn new_parse_sess() -> parse::parse_sess {
-    let cm = codemap::new_codemap();
-    let handler = diagnostic::mk_handler(option::none);
-    let sess = @{
-        cm: cm,
-        mut next_id: 1,
-        span_diagnostic: diagnostic::mk_span_handler(handler, cm),
-        mut chpos: 0u,
-        mut byte_pos: 0u
-    };
-    ret sess;
-}
-
-iface fake_ext_ctxt {
-    fn cfg() -> ast::crate_cfg;
-    fn parse_sess() -> parse::parse_sess;
-}
-
-type fake_session = ();
-
-impl of fake_ext_ctxt for fake_session {
-    fn cfg() -> ast::crate_cfg { [] }
-    fn parse_sess() -> parse::parse_sess { new_parse_sess() }
-}
-
-fn mk_ctxt() -> fake_ext_ctxt {
-    () as fake_ext_ctxt
-}
-
-
-fn main() {
-    let ext_cx = mk_ctxt();
-
-    let abc = #ast{23};
-    check_pp(abc,  pprust::print_expr, "23");
-
-    let expr3 = #ast{2 - $(abc) + 7};
-    check_pp(expr3,  pprust::print_expr, "2 - 23 + 7");
-
-    let expr4 = #ast{2 - $(#ast{3}) + 9};
-    check_pp(expr4,  pprust::print_expr, "2 - 3 + 9");
-
-    let ty = #ast(ty){int};
-    check_pp(ty, pprust::print_type, "int");
-
-    let ty2 = #ast(ty){option<$(ty)>};
-    check_pp(ty2, pprust::print_type, "option<int>");
-
-    let item = #ast(item){const x : int = 10;};
-    check_pp(item, pprust::print_item, "const x: int = 10;");
-
-    let item2: @ast::item = #ast(item){const x : int = $(abc);};
-    check_pp(item2, pprust::print_item, "const x: int = 23;");
-
-    let stmt = #ast(stmt){let x = 20;};
-    check_pp(*stmt, pprust::print_stmt, "let x = 20;");
-
-    let stmt2 = #ast(stmt){let x : $(ty) = $(abc);};
-    check_pp(*stmt2, pprust::print_stmt, "let x: int = 23;");
-
-    let pat = #ast(pat){some(_)};
-    check_pp(pat, pprust::print_pat, "some(_)");
-
-    // issue #1785
-    let x = #ast{1};
-    let test1 = #ast{1+$(x)};
-    check_pp(test1, pprust::print_expr, "1 + 1");
-
-    let test2 = #ast{$(x)+1};
-    check_pp(test2, pprust::print_expr, "1 + 1");
-
-    let y = #ast{2};
-    let test3 = #ast{$(x) + $(y)};
-    check_pp(test3, pprust::print_expr, "1 + 2");
-
-    let crate = #ast(crate) { fn a() { } };
-    check_pp(crate, pprust::print_crate_, "fn a() { }\n");
-
-    // issue #1926
-    let s = #ast(expr){__s};
-    let e = #ast(expr){__e};
-    let call = #ast(expr){$(s).foo {|__e| $(e)}};
-    check_pp(call, pprust::print_expr, "__s.foo {|__e| __e }")
-}
-
-fn check_pp<T>(expr: T, f: fn(pprust::ps, T), expect: str) {
-    let buf = mem_buffer();
-    let pp = pprust::rust_printer(buf as io::writer);
-    f(pp, expr);
-    pp::eof(pp.s);
-    let str = mem_buffer_str(buf);
-    stdout().write_line(str);
-    if expect != "" {
-        #error("expect: '%s', got: '%s'", expect, str);
-        assert str == expect;
-    }
-}
-