Skip to content

Commit 3ed1634

Browse files
committed
adding preconition to output programs
1 parent 997e8be commit 3ed1634

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/reports/make-graph.rkt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
(define (make-graph result-hash output? profile?)
3232
(define backend (hash-ref result-hash 'backend))
3333
(define test (car (load-tests (open-input-string (hash-ref result-hash 'test)))))
34+
(define pre (test-pre test))
35+
3436
(define time (hash-ref result-hash 'time))
3537
(define warnings (hash-ref result-hash 'warnings))
3638
(define repr (test-output-repr test))
@@ -131,7 +133,7 @@
131133
"alternatives. Up and to the right is better. The red square shows "
132134
"the initial program, and each blue circle shows an alternative."
133135
"The line shows the best available speed-accuracy tradeoffs."))
134-
,(let-values ([(dropdown body) (render-program start-expr ctx #:ident identifier)])
136+
,(let-values ([(dropdown body) (render-program start-expr ctx #:ident identifier #:pre pre)])
135137
`(section ([id "initial"] (class "programs"))
136138
(h2 "Initial Program"
137139
": "
@@ -150,7 +152,7 @@
150152
[history end-histories]
151153
#:unless (equal? start-expr expr))
152154
(set! alt-number (add1 alt-number))
153-
(define-values (dropdown body) (render-program expr ctx #:ident identifier))
155+
(define-values (dropdown body) (render-program expr ctx #:ident identifier #:pre pre))
154156
`(section ([id ,(format "alternative~a" i)] (class "programs"))
155157
(h2 "Alternative "
156158
,(~a alt-number)

0 commit comments

Comments
 (0)