aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/tests.rs')
-rw-r--r--crates/ra_hir/src/ty/tests.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs
index e6c7e225b..2749d740c 100644
--- a/crates/ra_hir/src/ty/tests.rs
+++ b/crates/ra_hir/src/ty/tests.rs
@@ -157,7 +157,7 @@ impl S {
157} 157}
158 158
159#[test] 159#[test]
160fn infer_boolean_op() { 160fn infer_binary_op() {
161 check_inference( 161 check_inference(
162 r#" 162 r#"
163fn f(x: bool) -> i32 { 163fn f(x: bool) -> i32 {
@@ -168,15 +168,18 @@ fn test() {
168 let x = a && b; 168 let x = a && b;
169 let y = true || false; 169 let y = true || false;
170 let z = x == y; 170 let z = x == y;
171 let h = CONST_1 <= CONST_2; 171 let minus_forty: isize = -40isize;
172 let h = minus_forty <= CONST_2;
172 let c = f(z || y) + 5; 173 let c = f(z || y) + 5;
173 let d = b; 174 let d = b;
174 let e = 3i32 && "hello world"; 175 let g = minus_forty ^= i;
176 let ten: usize = 10;
177 let ten_is_eleven = ten == some_num;
175 178
176 10 < 3 179 ten < 3
177} 180}
178"#, 181"#,
179 "boolean_op.txt", 182 "binary_op.txt",
180 ); 183 );
181} 184}
182 185