gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-scheme] 04/07: tests/config-value-parser: Test value->float of n


From: gnunet
Subject: [gnunet-scheme] 04/07: tests/config-value-parser: Test value->float of negative numbers.
Date: Sun, 28 Aug 2022 22:03:10 +0200

This is an automated email from the git hooks/post-receive script.

maxime-devos pushed a commit to branch master
in repository gnunet-scheme.

commit 9deb75f616d254404a8ac4d1552bc19dae5a9d5d
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Sun Aug 28 21:50:15 2022 +0200

    tests/config-value-parser: Test value->float of negative numbers.
    
    * tests/config-value-parser.scm
    ("value->float, negative 0 (a)")
    ("value->float, negative 0 (b)")
    ("value->float, negative 0 (c)")
    ("value->float, negative 0 (d)"): New tests.
---
 tests/config-value-parser.scm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/tests/config-value-parser.scm b/tests/config-value-parser.scm
index c440b7a..0ac1947 100644
--- a/tests/config-value-parser.scm
+++ b/tests/config-value-parser.scm
@@ -1,5 +1,5 @@
 ;; This file is part of scheme-GNUnet.
-;; Copyright (C) 2021 GNUnet e.V.
+;; Copyright © 2021--2022 GNUnet e.V.
 ;;
 ;; scheme-GNUnet is free software: you can redistribute it and/or modify it
 ;; under the terms of the GNU Affero General Public License as published
@@ -113,6 +113,20 @@
   0.0
   (value->float "0"))
 
+(test-expect-fail 4)
+(test-eqv "value->float, negative 0 (a)"
+  -0.0
+  (value->float "-0.0"))
+(test-eqv "value->float, negative 0 (b)"
+  -0.0
+  (value->float "-0."))
+(test-eqv "value->float, negative 0 (c)"
+  -0.0
+  (value->float "-.0"))
+(test-eqv "value->float, negative 0 (d)"
+  -0.0
+  (value->float "-0"))
+
 (test-equal "value->float, nothing before dot"
   (list 0.1 0.3 0.19 0.22)
   (map value->float '(".1" ".3" ".19" ".22")))

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]