diff options
Diffstat (limited to 'crates/ra_hir/src/ty/tests.rs')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index fb53fcf0b..97c466890 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -153,6 +153,23 @@ impl S { | |||
153 | ); | 153 | ); |
154 | } | 154 | } |
155 | 155 | ||
156 | #[test] | ||
157 | fn infer_boolean_op() { | ||
158 | check_inference( | ||
159 | r#" | ||
160 | fn test() { | ||
161 | let x = a && b; | ||
162 | let y = true || false; | ||
163 | let z = x == y; | ||
164 | let h = CONST_1 <= CONST_2; | ||
165 | |||
166 | 10 < 3 | ||
167 | } | ||
168 | "#, | ||
169 | "0008_boolean_op.txt", | ||
170 | ); | ||
171 | } | ||
172 | |||
156 | fn infer(content: &str) -> String { | 173 | fn infer(content: &str) -> String { |
157 | let (db, _, file_id) = MockDatabase::with_single_file(content); | 174 | let (db, _, file_id) = MockDatabase::with_single_file(content); |
158 | let source_file = db.source_file(file_id); | 175 | let source_file = db.source_file(file_id); |