More robust coverage tests
authorAndy Wingo <wingo@pobox.com>
Wed, 16 Apr 2014 17:13:49 +0000 (19:13 +0200)
committerAndy Wingo <wingo@pobox.com>
Wed, 16 Apr 2014 17:13:49 +0000 (19:13 +0200)
* test-suite/tests/coverage.test ("line-execution-counts"): Allow zero
  or one count on the loop head.

test-suite/tests/coverage.test

index 822d06e..1a63353 100644 (file)
                (every (lambda (line+count)
                         (let ((line  (car line+count))
                               (count (cdr line+count)))
+                          ;; The actual line counts for aliasing
+                          ;; operations, like the loop header that
+                          ;; initializes "x" to "x", are sensitive to
+                          ;; whether there is an associated "mov"
+                          ;; instruction, or whether the value is left
+                          ;; in place.  Currently there are no
+                          ;; instructions for line 2, but we allow 1 as
+                          ;; well.
                           (case line
-                            ((0 1 2) (= count 1))
+                            ((0 1)   (= count 1))
+                            ((2)     (<= 0 count 1))
                             ((3)     (= count 78))
                             ((4 5 6) (= count 77))
                             ((7)     (= count 1))