Skip to content

Commit

Permalink
Made testing work
Browse files Browse the repository at this point in the history
  • Loading branch information
html committed Oct 31, 2012
1 parent 1bffa30 commit d80b712
Show file tree
Hide file tree
Showing 150 changed files with 42,503 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.txt
@@ -0,0 +1,8 @@
To test weblocks just execute test-weblocks.sh

If you want to test weblocks from another repository do following.
cd weblocks-quicklisp/local-projects/weblocks/
git remote add <some-name> <repository address>
git pull <name-from-previous-command> master

and then execute test-weblocks.sh
2 changes: 2 additions & 0 deletions compile-weblocks-tests.lisp
@@ -0,0 +1,2 @@
(load "weblocks-quicklisp/setup.lisp")
(require :weblocks-test)
3 changes: 3 additions & 0 deletions test-weblocks.lisp
@@ -0,0 +1,3 @@
(load "weblocks-quicklisp/setup.lisp")
(require :weblocks-test)
(weblocks-test:test-weblocks)
3 changes: 3 additions & 0 deletions test-weblocks.sh
@@ -0,0 +1,3 @@
# First time, just compiling some of tests will not pass
sbcl --non-interactive --quit --load "compile-weblocks-tests" &> /dev/null
sbcl --non-interactive --quit --load "test-weblocks.lisp"
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
dists/quicklisp/software/lift-20120909-git/
@@ -0,0 +1 @@
dists/quicklisp/software/rt-20101006-git/
@@ -0,0 +1 @@
dists/quicklisp/software/lift-20120909-git/lift-documentation.asd
@@ -0,0 +1 @@
dists/quicklisp/software/lift-20120909-git/lift-test.asd
@@ -0,0 +1 @@
dists/quicklisp/software/lift-20120909-git/lift.asd
@@ -0,0 +1 @@
dists/quicklisp/software/rt-20101006-git/rt.asd
@@ -0,0 +1,42 @@
# Boring file regexps:
\.hi$
\.o$
\.o\.cmd$
# *.ko files aren't boring by default because they might
# be Korean translations rather than kernel modules.
# \.ko$
\.ko\.cmd$
\.mod\.c$
(^|/)\.tmp_versions($|/)
(^|/)CVS($|/)
(^|/)RCS($|/)
~$
#(^|/)\.[^/]
(^|/)_darcs($|/)
\.bak$
\.BAK$
\.orig$
(^|/)vssver\.scc$
\.swp$
(^|/)MT($|/)
(^|/)\{arch\}($|/)
(^|/).arch-ids($|/)
(^|/),
\.class$
\.prof$
(^|/)\.DS_Store$
(^|/)BitKeeper($|/)
(^|/)ChangeSet($|/)
(^|/)\.svn($|/)
\.py[co]$
\#
\.cvsignore$
(^|/)Thumbs\.db$
(^|/)autom4te\.cache($|/)
(^|/)scratch($|/)
(^|/)two words($|/)
(^|/)test-results($|/)
\.dribble
(^|/)make($|/)
(^|/)benchmark-data($|/)
(^|/)timeout($|/)
@@ -0,0 +1,17 @@
# really this is private to my build process
make/
common-lisp.net
.vcs
GNUmakefile
init-lisp.lisp
website/changelog.xml


lift.tar.gz
website/output/
test-results*/
lift-local.config
*.dribble
*.fasl

benchmark-data/
@@ -0,0 +1,82 @@
Copyright (c) 2002-2010 Gary Warren King (gwking@metabang.com)

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Portions

;;; Copyright (c) 2004-2007, Dr. Edmund Weitz. All rights reserved.

;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:

;;; * Redistributions of source code must retain the above copyright
;;; notice, this list of conditions and the following disclaimer.

;;; * Redistributions in binary form must reproduce the above
;;; copyright notice, this list of conditions and the following
;;; disclaimer in the documentation and/or other materials
;;; provided with the distribution.

;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
;;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

;;; -----------------------------------------------------------------------

Copyright (c) 1994-2004 University of Massachusetts
Department of Computer Science
Experimental Knowledge Systems Laboratory
Professor Paul Cohen, Director.
All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

EKSL makes no representation about the suitability of this software for any
purposes. It is provided "AS IS", without express or implied warranties
including (but not limited to) all implied warranties of merchantability
and fitness for a particular purpose, and notwithstanding any other
provision contained herein. In no event shall EKSL be liable for any
special, indirect or consequential damages whatsoever resulting from loss
of use, data or profits, whether in an action of contract, negligence or
other tortuous action, arising out of or in connection with the use or
performance of this software, even if EKSL is advised of the possibility
of such damages.

Thanks to

Marc Atkin, Brendan Burns, Andrew Hannon, Anuan Gao, Brent Heeringa,
Joshua Moody, Tim Oates, Michael O'Neil, Rob St. Amant, Charles Sutton,
Louis Theran, David Westbrook, and other former students and staff of
EKSL.


@@ -0,0 +1,7 @@
2006-09-18 Gary King <gwking@metabang.com>

* moved with-timeout code here and made :timeouts part of the defautl LIFT

2006-09-08 Gary King <gwking@metabang.com>

* addtest no longer defines the defgeneric of a test method because some Lisps (notably Allegro) remove existing methods when you do this.
@@ -0,0 +1,14 @@
(defpackage "KMRCL-TESTS-5AM"
(:use "COMMON-LISP" "KMRCL" "5AM"))
(in-package #:kmrcl-tests-5am)

(def-suite test-strings :description "Test some KMRCL string tests.")
(in-suite test-strings)
(test :str.0
(is (substitute-chars-strings "" nil) ""))
(test :str.1
(is (substitute-chars-strings "abcd" nil) "abcd"))
(test :str.2
(is (substitute-chars-strings "abcd" nil) "abcde"))

(run! 'test-strings)
@@ -0,0 +1,13 @@
(defpackage "KMRCL-TESTS-LIFT"
(:use "COMMON-LISP" "KMRCL" "LIFT"))
(in-package #:kmrcl-tests-lift)

(deftestsuite test-strings () ())
(addtest :str.0
(ensure-same (substitute-chars-strings "" nil) ""))
(addtest :str.1
(ensure-same (substitute-chars-strings "abcd" nil) "abcd"))
(addtest :str.2
(ensure-same (substitute-chars-strings "abcd" nil) "abcde"))

(run-tests)
@@ -0,0 +1,45 @@
RT

non-interactive
no, can use *do-tests-when-defined*
samep only??
equalp-with-case

more verbose than RT

+ optimization settings
+ expected failures
+ notes

(rem-all-tests)
(deftest :zero-check -0.0 0.0)
(do-test)


;;; ---------------------------------------------------------------------------
FiveAM

No hierarchy
No setup / teardown
"is" is nice but seems

requires arnesi

includes random testing (cf. Click Check)

;;; ---------------------------------------------------------------------------
LIFT


;;; ---------------------------------------------------------------------------
xlunit

#|
no dependencies

How can you run all of the tests in a hierarchy?
Verbose

It times the tests
|#

@@ -0,0 +1,16 @@
#|
can you change the equality test?
|#

(in-package #:cl)
(defpackage #:kmrcl-tests-rt
(:use #:kmrcl #:cl #:rtest))
(in-package #:kmrcl-tests-rt)

(rem-all-tests)

(deftest :str.0 (substitute-chars-strings "" nil) "")
(deftest :str.1 (substitute-chars-strings "abcd" nil) "abcd")
(deftest :str.2 (substitute-chars-strings "abcd" nil) "abcde")

(do-tests)
@@ -0,0 +1,15 @@
(in-package #:cl)
(defpackage #:kmrcl-tests-xlunit
(:use #:kmrcl #:cl #:xlunit))
(in-package #:kmrcl-tests-xlunit)

(defclass string-test-case (test-case)
())
(def-test-method :str.0 ((test string-test-case) :run nil)
(assert-true (string-equal (substitute-chars-strings "" nil) "")))
(def-test-method :str.1 ((test string-test-case) :run nil)
(assert-true (string-equal (substitute-chars-strings "abcd" nil) "abcd")))
(def-test-method :str.1 ((test string-test-case) :run nil)
(assert-true (string-equal (substitute-chars-strings "abcd" nil) "abcde")))

(textui-test-run (get-suite string-test-case))

0 comments on commit d80b712

Please sign in to comment.