Skip to content

Commit 83d5a37

Browse files
committed
---
yaml --- r: 4334 b: refs/heads/master c: a601eb1 h: refs/heads/master v: v3
1 parent b804570 commit 83d5a37

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 59691b084fd64c6e98c36f8c738abe4a6fe6f89e
2+
refs/heads/master: a601eb169ee5748b7afebab12d75ecc3ad3b47bc

trunk/src/test/compiletest/runtest.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fn run_pretty_test(cx: &cx, props: &test_props, testfile: &str) {
100100
compare_source(expected, actual);
101101

102102
// Finally, let's make sure it actually appears to remain valid code
103-
let procres = typecheck_source(cx, actual);
103+
let procres = typecheck_source(cx, testfile, actual);
104104

105105
if procres.status != 0 {
106106
fatal_procres("pretty-printed source does not typecheck",
@@ -139,9 +139,15 @@ actual:\n\
139139
}
140140
}
141141

142-
fn typecheck_source(cx: &cx, src: &str) -> procres {
143-
// FIXME
144-
ret {status: 0, stdout: src, stderr: "", cmdline: ""};
142+
fn typecheck_source(cx: &cx, testfile: &str, src: &str) -> procres {
143+
compose_and_run(cx, testfile, make_typecheck_args,
144+
cx.config.compile_lib_path, option::some(src))
145+
}
146+
147+
fn make_typecheck_args(config: &config, testfile: &str) -> procargs {
148+
let prog = config.rustc_path;
149+
let args = ["-", "--no-trans"];
150+
ret {prog: prog, args: args};
145151
}
146152
}
147153

0 commit comments

Comments
 (0)