aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix 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.
;;;
;;; GNU Guix 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
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (test-sets)
  #:use-module (guix sets)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-26)
  #:use-module (srfi srfi-64))


(test-begin "sets")

(test-assert "set-contains?"
  (let* ((lst (iota 123))
         (set (list->set lst)))
    (and (every (cut set-contains? set <>)
                lst)
         (not (set-contains? set -1)))))

(test-assert "set->list"
  (let* ((lst (iota 123))
         (set (list->set lst)))
    (lset= = lst (set->list set))))

(test-assert "set-union"
  (let* ((a  (list 'a))
         (b  (list 'b))
         (s1 (setq a))
         (s2 (setq b))
         (s3 (set-union s1 s2)))
    (and (set-contains? s3 a)
         (set-contains? s3 b))))

(test-end)
.Florian Pelz 2020-04-08installer: Add proxy support....Mathieu Othacehe 2020-04-08installer: Turn help menu into parameters menu....Mathieu Othacehe 2020-04-07installer: Reduce height of the help window....Ludovic Courtès 2020-04-06installer: Adapt to Guile-newt revision 2....Mathieu Othacehe 2020-04-06installer: Add a help page....Mathieu Othacehe 2020-03-26installer: tests: Use a filter to select desktop-environments....Mathieu Othacehe 2020-03-23installer: Fix cow-store umount issue....Mathieu Othacehe 2020-03-05installer: Fix cow-store umount....Mathieu Othacehe 2020-03-05tests: install: Add "gui-installed-os"....Ludovic Courtès 2020-03-05installer: Honor /tmp/installer-system-init-options....Ludovic Courtès 2020-03-05installer: Run commands without hopping through the shell....Ludovic Courtès 2020-03-05installer: Bypass connectivity check when /tmp/installer-assume-online exists....Ludovic Courtès 2020-03-05installer: Implement a dialog on /var/guix/installer-socket....Ludovic Courtès 2020-02-22installer: Log important bits to syslog....Ludovic Courtès 2020-02-22installer: Add 'syslog' macro to write to syslog....Ludovic Courtès 2020-02-12installer: Fix installer restart dialog....Mathieu Othacehe 2020-02-12installer: Remove the cow-store overlay after system installation....Mathieu Othacehe 2020-01-23installer: Make "TRANSLATORS" comment visible....Ludovic Courtès 2020-01-20installer: Disable F12 hot key....Ludovic Courtès 2020-01-20installer: Makes sure the installer proceeds after hitting "Edit"....Ludovic Courtès 2020-01-12installer: Add an "Edit" button on the final page....Ludovic Courtès 2020-01-05installer: Add JFS support....Tobias Geerinckx-Rice 2020-01-05installer: Fix typo....Tobias Geerinckx-Rice 2019-12-29installer: Pass '--fallback' to 'guix system init'....Ludovic Courtès 2019-09-25installer: Update to Guile-Parted 0.0.2 release....Mathieu Othacehe 2019-09-23installer: Fix run-input-page calls....Mathieu Othacehe