Debian Codegraph @

test-suite/tests/srfi-64.test

raw
1 ;;;; srfi-64.test --- Test suite for SRFI-64. -*- scheme -*-
2 ;;;;
3 ;;;; Copyright (C) 2014 Free Software Foundation, Inc.
4 ;;;;
5 ;;;; This library is free software; you can redistribute it and/or
6 ;;;; modify it under the terms of the GNU Lesser General Public
7 ;;;; License as published by the Free Software Foundation; either
8 ;;;; version 3 of the License, or (at your option) any later version.
9 ;;;;
10 ;;;; This library is distributed in the hope that it will be useful,
11 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ;;;; Lesser General Public License for more details.
14 ;;;;
15 ;;;; You should have received a copy of the GNU Lesser General Public
16 ;;;; License along with this library; if not, write to the Free Software
17 ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
19 (define-module (test-srfi-64)
20 #:use-module (srfi srfi-64))
21
22 (define report (@@ (test-suite lib) report))
23
24 (define (guile-test-runner)
25 (let ((runner (test-runner-null)))
26 (test-runner-on-test-end! runner
27 (lambda (runner)
28 (let* ((result-alist (test-result-alist runner))
29 (result-kind (assq-ref result-alist 'result-kind))
30 (test-name (list (assq-ref result-alist 'test-name))))
31 (case result-kind
32 ((pass) (report 'pass test-name))
33 ((xpass) (report 'upass test-name))
34 ((skip) (report 'untested test-name))
35 ((fail xfail)
36 (apply report result-kind test-name result-alist))
37 (else #t)))))
38 runner))
39
40 (test-with-runner
41 (guile-test-runner)
42 (primitive-load-path "tests/srfi-64-test.scm"))
43
44 ;;; Local Variables:
45 ;;; eval: (put 'test-runner-on-test-end! 'scheme-indent-function 1)
46 ;;; End: