mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 12:20:26 +02:00
43 lines
1.4 KiB
Scheme
43 lines
1.4 KiB
Scheme
;;;; socket.test --- test socket functions -*- scheme -*-
|
|
;;;;
|
|
;;;; Copyright (C) 2004 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
|
|
;;;; License as published by the Free Software Foundation; either
|
|
;;;; version 2.1 of the License, or (at your option) any later version.
|
|
;;;;
|
|
;;;; This library 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
|
|
;;;; Lesser General Public License for more details.
|
|
;;;;
|
|
;;;; You should have received a copy of the GNU Lesser General Public
|
|
;;;; License along with this library; if not, write to the Free Software
|
|
;;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
(define-module (test-suite test-numbers)
|
|
#:use-module (test-suite lib))
|
|
|
|
;;;
|
|
;;; inet-ntop
|
|
;;;
|
|
|
|
(if (defined? 'inet-ntop)
|
|
(with-test-prefix "inet-ntop"
|
|
|
|
(with-test-prefix "ipv6"
|
|
(pass-if "0"
|
|
(string? (inet-ntop AF_INET6 0)))
|
|
|
|
(pass-if "2^128-1"
|
|
(string? (inet-ntop AF_INET6 (1- (ash 1 128)))))
|
|
|
|
(pass-if-exception "-1" exception:out-of-range
|
|
(inet-ntop AF_INET6 -1))
|
|
|
|
(pass-if-exception "2^128" exception:out-of-range
|
|
(inet-ntop AF_INET6 (ash 1 128)))
|
|
|
|
(pass-if-exception "2^1024" exception:out-of-range
|
|
(inet-ntop AF_INET6 (ash 1 1024))))))
|