;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; This file is part of "NOVA": NOVA = search + COCOMO tools ; Copyright, 2008, Tim Menzies tim@menzies.us ; ; NOVA is free software: you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation, either version 3 of the License, or ; (at your option) any later version. ; ; NOVA is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; You should have received a copy of the GNU General Public License ; a long with NOVA. If not, see . ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package :xomo-test.model) (deftestsuite defects-model-xomo-test-suite (fresh-default-xomo-db-test-suite-mixin xomo-tests) ()) (addtest check-em2xin (let ((sym 'acap)) (dolist (stage '(requirements design coding)) (ensure-no-warning (em2xin stage sym)) (ensure (numberp (em2xin stage sym)))))) (addtest check-sf2xin (let ((sym 'flex)) (dolist (stage '(requirements design coding)) (ensure-no-warning (sf2xin stage sym)) (ensure (numberp (sf2xin stage sym)))))) (addtest check-dr2xout (let ((sym 'etat)) (dolist (stage '(requirements design coding)) (ensure-no-warning (dr2xout stage sym)) (ensure (numberp (dr2xout stage sym)))))) (addtest check-unweighted-defects-introduced (dolist (stage '(requirements design coding)) (ensure-no-warning (unweighted-defects-introduced stage)) (ensure (numberp (unweighted-defects-introduced stage))))) (addtest check-defects-introduced (dolist (stage '(requirements design coding)) (ensure-no-warning (defects-introduced stage)) (ensure (numberp (defects-introduced stage))))) (addtest check-defects-remaining-ratio (dolist (stage '(requirements design coding)) (ensure-no-warning (defects-remaining-ratio stage)) (ensure (numberp (defects-remaining-ratio stage))))) (addtest check-stage-defects (dolist (stage '(requirements design coding)) (ensure-no-warning (stage-defects stage)) (ensure (numberp (stage-defects stage))))) (addtest check-defects (ensure-no-warning (defects)) (ensure (numberp (defects)))) (addtest demo-defects (ensure-no-warning (let (out) (format t "~&Defects estimates, sorted~%") (format t "~a" (dotimes (i 10 (sort out #'<)) (zaps) (push (defects) out)))))) (addtest demo-defects-distogram (ensure-no-warning (let ((d (make-dist :fuzz 20))) (dotimes (i 1000) (zaps) (dist-add (defects) d)) (format t "~&Defects estimates, rounded to the nearest 20~%") (distogram d :shrink 20 :lwidth 10 :rwidth 6))))