|
102 | 102 | ; A little hack, the analyze below uses hint from the previous run |
103 | 103 | ; The analyze results must be equal. If not, something wrong has happened |
104 | 104 | (match-define (list res* hint* converged?*) (rival-analyze machine hyperrect hint)) |
105 | | - (check-equal? hint hint*) |
106 | | - (check-equal? res res*) |
107 | | - (check-equal? converged? converged?*) |
| 105 | + |
| 106 | + (with-check-info (['hyperrect hyperrect] ['hint hint]) |
| 107 | + (check-equal? hint hint*) |
| 108 | + (check-equal? res res*) |
| 109 | + (check-equal? converged? converged?*)) |
108 | 110 |
|
109 | 111 | (for ([_ (in-range number-of-random-pts-per-rect)]) |
110 | 112 | (define pt (sample-pts hyperrect)) |
111 | | - (define-values (no-hint-cnt* hint-cnt*) (rival-check-hint machine hint pt)) |
| 113 | + (define-values (no-hint-cnt* hint-cnt*) |
| 114 | + (with-check-info (['pt pt] ['hint hint]) |
| 115 | + (rival-check-hint machine hint pt))) |
112 | 116 | (set! hint-cnt (+ hint-cnt hint-cnt*)) |
113 | 117 | (set! no-hint-cnt (+ no-hint-cnt no-hint-cnt*)))) |
114 | 118 | (define skipped-percentage (* (/ hint-cnt no-hint-cnt) 100)) |
|
119 | 123 | (define vars '(x y)) |
120 | 124 | (define varc (length vars)) |
121 | 125 | (define machine (rival-compile expressions vars discs)) |
122 | | - (define skipped-instr (hints-random-checks machine (first rect) (second rect) varc)) |
| 126 | + (define skipped-instr |
| 127 | + (with-check-info (['expressions expressions]) |
| 128 | + (hints-random-checks machine (first rect) (second rect) varc))) |
123 | 129 | (check-true (< skipped-instr 99) |
124 | 130 | (format "Almost no instructions got skipped by hint at ~a" expressions))) |
125 | 131 |
|
|
0 commit comments