Next: , Previous: Problems Linking, Up: Troubleshooting and Testing


2.6.3 Testing

Loading r4rstest.scm in the distribution will run an [R4RS] conformance test on scm.

     > (load "r4rstest.scm")
     -|
     ;loading r4rstest.scm
     SECTION(2 1)
     SECTION(3 4)
      #<primitive-procedure boolean?>
         #<primitive-procedure char?>
            #<primitive-procedure null?>
               #<primitive-procedure number?>
     ...

Loading pi.scm in the distribution will enable you to compute digits of pi.

     > (load "pi.scm")
     ;loading pi.scm
     ;done loading pi.scm
     #<unspecified>
     > (pi 100 5)
     00003 14159 26535 89793 23846 26433 83279 50288 41971 69399
     37510 58209 74944 59230 78164 06286 20899 86280 34825 34211
     70679
     ;Evaluation took 550 ms (60 in gc) 36976 cells work, 1548.B other
     #<unspecified>

Performance

Loading bench.scm will compute and display performance statistics of SCM running pi.scm. ‘make bench’ or ‘make benchlit’ appends the performance report to the file BenchLog, facilitating tracking effects of changes to SCM on performance.