gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 03/04: tests/network-size: Verify +nan.0 and +inf.0 are


From: gnunet
Subject: [gnunet-scheme] 03/04: tests/network-size: Verify +nan.0 and +inf.0 are allowed as stddev.
Date: Wed, 22 Sep 2021 20:56:53 +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 04115082a527413f573c075c5685021b038e81cd
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Wed Sep 22 20:51:49 2021 +0200

    tests/network-size: Verify +nan.0 and +inf.0 are allowed as stddev.
    
    * tests/network-size.scm (%estimates): Add two cases.
    * gnu/gnunet/nse/client.scm
      (reconnect)[handlers]<msg:nse:estimate>{well-formed?}: Adjust XXX.
---
 gnu/gnunet/nse/client.scm | 3 ++-
 tests/network-size.scm    | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/gnunet/nse/client.scm b/gnu/gnunet/nse/client.scm
index d240c28..3bb1095 100644
--- a/gnu/gnunet/nse/client.scm
+++ b/gnu/gnunet/nse/client.scm
@@ -145,7 +145,8 @@ even if not connected.  This is an idempotent operation."
          ((well-formed? slice)
           (and (= (slice-length slice)
                   (sizeof /:msg:nse:estimate '()))
-               ;; XXX: these two lines below are not tested
+               ;; XXX: there is no test verifying these two expressions
+               ;; are present
                (>= (read% /:msg:nse:estimate '(size-estimate) slice) 0)
                ;; See <https://bugs.gnunet.org/view.php?id=7021#c18399> for
                ;; situations in which the deviation can be infinite or NaN.
diff --git a/tests/network-size.scm b/tests/network-size.scm
index 7ad56d1..1c8d4da 100644
--- a/tests/network-size.scm
+++ b/tests/network-size.scm
@@ -77,7 +77,10 @@
        #t))))
 
 (define %estimates
-  `((0. ,(expt 2.0 0.) 0.1 0)
+  `((0. ,(expt 2.0 0.) 0. 0) ; stddev can theoretically be zero
+    (0. ,(expt 2.0 0.) +nan.0 0) ; see 
<https://bugs.gnunet.org/view.php?id=7021#c18399>
+    (0. ,(expt 2.0 0.) +inf.0 0) ; likewise
+    (0. ,(expt 2.0 0.) 0.1 0)
     (1. ,(expt 2.0 1.) 0.11 10)
     (2. ,(expt 2.0 2.) 0.111 100)
     (3. ,(expt 2.0 3.) 0.1111 1000)))

-- 
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]