Merge pull request #97 from marcusklaas/issue-64

Regression test for UFCS function calls
This commit is contained in:
Nick Cameron 2015-06-09 08:40:57 +12:00
commit 81c581ee5c
4 changed files with 11 additions and 1 deletions

View File

@ -26,8 +26,11 @@ fn get_path_string(dir_entry: io::Result<fs::DirEntry>) -> String {
path.to_str().expect("Couldn't stringify path.").to_owned()
}
// For now, the only supported regression tests are idempotent tests - the input and
// Integration tests and idempotence tests. The files in the tests/source are
// formatted and compared to their equivalent in tests/target. The target file
// and config can be overriden by annotations in the source file. The input and
// output must match exactly.
// Files in tests/target are checked to be unaltered by rustfmt.
// FIXME(#28) would be good to check for error messages and fail on them, or at least report.
#[test]
fn system_tests() {

7
tests/target/issue-64.rs Normal file
View File

@ -0,0 +1,7 @@
// Regression test for issue 64
pub fn header_name<T: Header>() -> &'static str {
let name = <T as Header>::header_name();
let func = <T as Header>::header_name;
name
}