[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/09: tests: Add sanitizer test.
From: |
guix-commits |
Subject: |
09/09: tests: Add sanitizer test. |
Date: |
Fri, 1 Jul 2022 06:27:36 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 741895676b124a8a9a6656a54b5b58fd35d8e0f9
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Jul 1 12:08:22 2022 +0200
tests: Add sanitizer test.
* tests/records.scm ("define-record-type* & sanitize without default
value"): New test.
---
tests/records.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/records.scm b/tests/records.scm
index d014e7a995..00c58b0736 100644
--- a/tests/records.scm
+++ b/tests/records.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Ludovic
Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2016, 2018-2022 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -300,6 +300,15 @@
(string=? (foo-bar r) "baz!")
(equal? s r)))))
+(test-equal "define-record-type* & sanitize without default value"
+ 42
+ (begin
+ (define-record-type* <foo> foo make-foo
+ foo?
+ (bar foo-bar (sanitize 1+)))
+
+ (foo-bar (foo (bar 41)))))
+
(test-assert "define-record-type* & sanitize & thunked"
(let ((sanitized 0))
(define-record-type* <foo> foo make-foo
@@ -321,6 +330,7 @@
(let ((r (foo (inherit q))))
(and (string=? (foo-bar r) "baz!")
(= sanitized 2))))))))) ;no re-sanitization
+
(test-assert "define-record-type* & wrong field specifier"
(let ((exp '(begin
(define-record-type* <foo> foo make-foo
- branch master updated (b5c6062bce -> 741895676b), guix-commits, 2022/07/01
- 03/09: services: root-file-system: Cleanly unmount upon shutdown., guix-commits, 2022/07/01
- 08/09: image: Add sanitizers for 'format' and 'partition-table-type'., guix-commits, 2022/07/01
- 02/09: file-systems: Add 'cleanly-unmounted-ext2?'., guix-commits, 2022/07/01
- 06/09: image: Avoid use of the deprecated 'gpt' option of genimage., guix-commits, 2022/07/01
- 04/09: image: 'system-image' throws when given an incorrect image format., guix-commits, 2022/07/01
- 05/09: image: Add default value for partition initializer., guix-commits, 2022/07/01
- 01/09: gnu: texlive-fmtcount: Add proper 'license' value., guix-commits, 2022/07/01
- 07/09: image: Raise an error when an image lacks a bootable partition., guix-commits, 2022/07/01
- 09/09: tests: Add sanitizer test.,
guix-commits <=