GOOPS cosmetics
[bpt/guile.git] / test-suite / tests / 00-socket.test
index 5093575..211aaaf 100644 (file)
@@ -1,7 +1,7 @@
-;;;; socket.test --- test socket functions     -*- scheme -*-
+;;;; 00-socket.test --- test socket functions     -*- scheme -*-
 ;;;;
 ;;;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-;;;;   2011, 2013 Free Software Foundation, Inc.
+;;;;   2011, 2012, 2013, 2014 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
@@ -17,6 +17,9 @@
 ;;;; License along with this library; if not, write to the Free Software
 ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
+;; This test runs early, so that we can fork before any threads are
+;; created in other tests.
+
 (define-module (test-suite test-socket)
   #:use-module (rnrs bytevectors)
   #:use-module (srfi srfi-26)
 
 \f
 
-;;;
-;;; htonl
-;;;
-
-(if (defined? 'htonl)
-    (with-test-prefix "htonl"
-
-      (pass-if "0" (eqv? 0 (htonl 0)))
-
-      (pass-if-exception "-1" exception:out-of-range
-        (htonl -1))
-
-      ;; prior to guile 1.6.9 and 1.8.1, systems with 64-bit longs didn't detect
-      ;; an overflow for values 2^32 <= x < 2^63
-      (pass-if-exception "2^32" exception:out-of-range
-        (htonl (ash 1 32)))
-
-      (pass-if-exception "2^1024" exception:out-of-range
-        (htonl (ash 1 1024)))))
-
-
 ;;;
 ;;; inet-ntop
 ;;;
          (and (= (sockaddr:fam sa) AF_UNIX)
               (string=? (sockaddr:path sa) "/tmp/unix-socket"))))))
 
-;;;
-;;; ntohl
-;;;
-
-(if (defined? 'ntohl)
-    (with-test-prefix "ntohl"
-
-      (pass-if "0" (eqv? 0 (ntohl 0)))
-
-      (pass-if-exception "-1" exception:out-of-range
-        (ntohl -1))
-
-      ;; prior to guile 1.6.9 and 1.8.1, systems with 64-bit longs didn't detect
-      ;; an overflow for values 2^32 <= x < 2^63
-      (pass-if-exception "2^32" exception:out-of-range
-        (ntohl (ash 1 32)))
-
-      (pass-if-exception "2^1024" exception:out-of-range
-        (ntohl (ash 1 1024)))))
-
-
 \f
 ;;;
 ;;; AF_UNIX sockets and `make-socket-address'