about summary refs log tree commit diff
path: root/tests/coverage/branch/if-let.coverage
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-04-17 11:41:41 +1000
committerZalathar <Zalathar@users.noreply.github.com>2024-04-30 22:35:55 +1000
commit7c87ad043098c8d668b25fe09e9b0806d7cb41c5 (patch)
treeb0b5d9744e13a13cc15de86a13595dcc038aa54a /tests/coverage/branch/if-let.coverage
parentc9dd07dd5e7eb84ac4b1cc27fc2ee620b2a2dfd2 (diff)
downloadrust-7c87ad043098c8d668b25fe09e9b0806d7cb41c5.tar.gz
rust-7c87ad043098c8d668b25fe09e9b0806d7cb41c5.zip
coverage: Add branch coverage support for if-let and let-chains
Diffstat (limited to 'tests/coverage/branch/if-let.coverage')
-rw-r--r--tests/coverage/branch/if-let.coverage9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/coverage/branch/if-let.coverage b/tests/coverage/branch/if-let.coverage
index f30c5d34eca..9a3f0113f75 100644
--- a/tests/coverage/branch/if-let.coverage
+++ b/tests/coverage/branch/if-let.coverage
@@ -14,6 +14,9 @@
    LL|       |
    LL|      3|    if let Some(x) = input {
                               ^2
+  ------------------
+  |  Branch (LL:12): [True: 2, False: 1]
+  ------------------
    LL|      2|        say(x);
    LL|      2|    } else {
    LL|      1|        say("none");
@@ -24,8 +27,14 @@
    LL|     15|fn if_let_chain(a: Option<&str>, b: Option<&str>) {
    LL|     15|    if let Some(x) = a
                               ^12
+  ------------------
+  |  Branch (LL:12): [True: 12, False: 3]
+  ------------------
    LL|     12|        && let Some(y) = b
                                   ^8
+  ------------------
+  |  Branch (LL:16): [True: 8, False: 4]
+  ------------------
    LL|      8|    {
    LL|      8|        say(x);
    LL|      8|        say(y);