From 7348f7883fa2bd571fff036c82e98c102d05c362 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 23 Dec 2018 12:05:54 +0100 Subject: Add testing infrastructure for type inference - move dir_tests to test_utils for that. --- crates/ra_hir/src/ty/tests/data/0001_basics.rs | 11 +++++++++++ crates/ra_hir/src/ty/tests/data/0001_basics.txt | 13 +++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 crates/ra_hir/src/ty/tests/data/0001_basics.rs create mode 100644 crates/ra_hir/src/ty/tests/data/0001_basics.txt (limited to 'crates/ra_hir/src/ty/tests') diff --git a/crates/ra_hir/src/ty/tests/data/0001_basics.rs b/crates/ra_hir/src/ty/tests/data/0001_basics.rs new file mode 100644 index 000000000..59a60d031 --- /dev/null +++ b/crates/ra_hir/src/ty/tests/data/0001_basics.rs @@ -0,0 +1,11 @@ + +fn test(a: u32, b: isize, c: !, d: &str) { + a; + b; + c; + d; + 1usize; + 1isize; + "test"; + 1.0f32; +} diff --git a/crates/ra_hir/src/ty/tests/data/0001_basics.txt b/crates/ra_hir/src/ty/tests/data/0001_basics.txt new file mode 100644 index 000000000..0c46f243a --- /dev/null +++ b/crates/ra_hir/src/ty/tests/data/0001_basics.txt @@ -0,0 +1,13 @@ +[33; 34) 'd': [unknown] +[88; 94) '1isize': [unknown] +[48; 49) 'a': u32 +[55; 56) 'b': isize +[112; 118) '1.0f32': [unknown] +[76; 82) '1usize': [unknown] +[9; 10) 'a': u32 +[27; 28) 'c': ! +[62; 63) 'c': ! +[17; 18) 'b': isize +[100; 106) '"test"': [unknown] +[42; 121) '{ ...f32; }': () +[69; 70) 'd': [unknown] -- cgit v1.2.3