Hello,
I've attatched a file archiving modules of my recent version of SRFI-64 implementation and SRFI-78.
SRFI-64 is "A Scheme API for test suites."
SRFI-78 is "Lightweight testing."
If you want to test your code, there are 5 options; using SRFI-64, SRFI-78, unit-test of guile-lib, lib of test-suite in Guile source archive or your own test suite. Here is four examples:
;;; filename: srfi-64-example.scm
(use-modules (srfi srfi-64))
(test-begin "vec-test")
(define v (make-vector 5 99))
(test-assert (vector? v))
(test-eqv 99 (vector-ref v 2))
(vector-set! v 2 7)
(test-eqv 7 (vector-ref v 2))
(test-end "vec-test")
;;; filename: srfi-78-example.scm
(use-modules (srfi srfi-78))
(define v (make-vector 5 99))
(check (vector? v) => #t)
(check (vector-ref v 2) => 99)
(vector-set! v 2 7)
(check (vector-ref v 2) => 7)
;;; filename: unit-test-example.scm
(use-modules (unit-test) (oop goops))
(define v (make-vector 5 99))
(define-class <vec-test> (<test-case>))
(define-method (test-vector? (self <vec-test>))
(assert-true (vector? v)))
(define-method (test-99 (self <vec-test>))
(assert-equal 99 (vector-ref v 2)))
(define-method (test-7 (self <vec-test>))
(vector-set! v 2 7)
(assert-equal 7 (vector-ref v 2)))
(exit-with-summary (run-all-defined-test-cases))
;;; filename: test-suite-example.scm
(use-modules (test-suite lib))
(define v (make-vector 5 99))
(pass-if "vector?" (vector? v))
(pass-if "99" (eqv? 99 (vector-ref v 2)))
(vector-set! v 2 7)
(pass-if "7" (eqv? 7 (vector-ref v 2)))