summaryrefslogtreecommitdiff
path: root/test-suite/tests/coverage.test
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2012-06-22 13:18:02 +0200
committerAndy Wingo <wingo@pobox.com>2012-06-22 13:18:02 +0200
commit0dd7c5407599b65a1a3da4b9bd8feccc715b51f7 (patch)
tree7e54c75087c5ea3f876bcb54cc49c70ec87ae0b5 /test-suite/tests/coverage.test
parent747747ee06ac64c224b91e8f64f810a1159c1675 (diff)
parent2874f66017b7bfae256e85af84689d00ecc418ab (diff)
downloadguile-0dd7c5407599b65a1a3da4b9bd8feccc715b51f7.tar.gz
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts: libguile/deprecated.c libguile/ports.c libguile/ports.h libguile/strports.c test-suite/tests/cse.test
Diffstat (limited to 'test-suite/tests/coverage.test')
-rw-r--r--test-suite/tests/coverage.test12
1 files changed, 11 insertions, 1 deletions
diff --git a/test-suite/tests/coverage.test b/test-suite/tests/coverage.test
index 4ac404344..b29de0f20 100644
--- a/test-suite/tests/coverage.test
+++ b/test-suite/tests/coverage.test
@@ -1,6 +1,6 @@
;;;; coverage.test --- Code coverage. -*- mode: scheme; coding: utf-8; -*-
;;;;
-;;;; Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+;;;; Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@@ -216,6 +216,16 @@
(= 3 result)
(not (procedure-execution-count data proc))))))
+ (pass-if "applicable struct"
+ (let* ((<box> (make-struct <applicable-struct-vtable> 0 'pw))
+ (proc (lambda args (length args)))
+ (b (make-struct <box> 0 proc)))
+ (let-values (((data result)
+ (with-code-coverage %test-vm b)))
+ (and (coverage-data? data)
+ (= 0 result)
+ (= (procedure-execution-count data proc) 1)))))
+
(pass-if "called from C"
;; The `scm_call_N' functions use the VM returned by `the-vm'. This
;; test makes sure that they get to use %TEST-VM.