[usocket-cvs] r228 - in usocket/trunk: . test
ehuelsmann at common-lisp.net
ehuelsmann at common-lisp.net
Sun Apr 8 21:56:25 UTC 2007
Author: ehuelsmann
Date: Sun Apr 8 17:56:25 2007
New Revision: 228
Modified:
usocket/trunk/README
usocket/trunk/test/test-usocket.lisp
Log:
Document tests a bit more and move config section to the beginning of the file.
Modified: usocket/trunk/README
==============================================================================
--- usocket/trunk/README (original)
+++ usocket/trunk/README Sun Apr 8 17:56:25 2007
@@ -8,6 +8,7 @@
* Introduction
* Non-support for :external-format
* API definition
+ * Test suite
* Known problems
Introduction
@@ -112,6 +113,20 @@
- unkown-condition
+Test suite
+==========
+
+The test suite unfortunately isn't mature enough yet to run without
+some manual configuration. Several elements are required which are
+hard to programatically detect. Please adjust the test file before
+running the tests, for these variables:
+
+- +non-existing-host+: The stringified IP address of a host on the
+ same subnet. No physical host may be present.
+- +unused-local-port+: A port number of a port not in use on the
+ machine the tests run on.
+- +common-lisp-net+: A vector with 4 integer elements which make up
+ an IP address. This must be the IP "common-lisp.net" resolves to.
Known problems
Modified: usocket/trunk/test/test-usocket.lisp
==============================================================================
--- usocket/trunk/test/test-usocket.lisp (original)
+++ usocket/trunk/test/test-usocket.lisp Sun Apr 8 17:56:25 2007
@@ -5,6 +5,15 @@
(in-package :usocket-test)
+;; The parameters below may need adjustments to match the system
+;; the tests are run on.
+(defparameter +non-existing-host+ "192.168.1.1")
+(defparameter +unused-local-port+ 15213)
+(defparameter *soc1* (usocket::make-stream-socket :socket :my-socket
+ :stream :my-stream))
+(eval-when (:compile-toplevel :load-toplevel :execute)
+ (defparameter +common-lisp-net+ #(80 68 86 115))) ;; common-lisp.net IP
+
(defmacro with-caught-conditions ((expect throw) &body body)
`(catch 'caught-error
(handler-case
@@ -34,13 +43,6 @@
(describe c)
c))))))
-(defparameter +non-existing-host+ "192.168.1.1")
-(defparameter +unused-local-port+ 15213)
-(defparameter *soc1* (usocket::make-stream-socket :socket :my-socket
- :stream :my-stream))
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (defparameter +common-lisp-net+ #(80 68 86 115))) ;; common-lisp.net IP
-
(deftest make-socket.1 (usocket:socket *soc1*) :my-socket)
(deftest make-socket.2 (usocket:socket-stream *soc1*) :my-stream)
More information about the usocket-cvs
mailing list