guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 09/10: Fix coverage test for top-level binding optimizat


From: Andy Wingo
Subject: [Guile-commits] 09/10: Fix coverage test for top-level binding optimization
Date: Sun, 18 Aug 2019 17:12:20 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit 6cf2fc1b9bb6f73d7de10d2653e96d6967509dc0
Author: Andy Wingo <address@hidden>
Date:   Sun Aug 18 22:26:46 2019 +0200

    Fix coverage test for top-level binding optimization
    
    * test-suite/tests/coverage.test ("line-execution-counts"): Fix
      expectations for tail-call test.
---
 test-suite/tests/coverage.test | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/test-suite/tests/coverage.test b/test-suite/tests/coverage.test
index 96d1744..5f393b6 100644
--- a/test-suite/tests/coverage.test
+++ b/test-suite/tests/coverage.test
@@ -213,8 +213,12 @@
                     (with-code-coverage
                       (lambda () (with-output-to-string proc)))))
         (let ((counts (line-execution-counts data "tail-calls.scm")))
-          (lset= equal? '((1 . 1) (2 . 1) (3 . 1) (5 . 1) (6 . 1))
-                 counts))))))
+          (define (lset-contains? eq? a b)
+            (lset= eq? b (lset-intersection eq? a b)))
+          ;; Due to top-level binding optimization, the target may be
+          ;; inlined or into the caller.  All we can say is that the
+          ;; entry was seen, and the two displays were called.
+          (lset-contains? equal? counts '((1 . 1) (2 . 1) (6 . 1))))))))
 
 
 (with-test-prefix "procedure-execution-count"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]