gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 93/324: doc: Some tips on testing.


From: gnunet
Subject: [gnunet-scheme] 93/324: doc: Some tips on testing.
Date: Tue, 21 Sep 2021 13:22:13 +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 270f5f45b167638108973145b80e14b2a5ad5936
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Wed Mar 17 12:58:08 2021 +0100

    doc: Some tips on testing.
    
    * README.org (Convention)[Tests]: Recommend some kinds of tests.
---
 README.org | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/README.org b/README.org
index 0df441e..2c10948 100644
--- a/README.org
+++ b/README.org
@@ -133,6 +133,27 @@
    and ‘no-index’ should be ‘passed’ using SRFI-39 parameters,
    and not with positional or keyword arguments,
    as they are just passed through unchanged most of the time.
+** Tests
+   Read --> [[https://sqlite.org/testing.html][How SQLite Is Tested]] 
(accessed: 2021)
+
+   This GNUnet implementation isn't quite that well-tested,
+   and most likely won't be for the foreseeable future.  However,
+   when defining new code, try to define the following kind of
+   tests where reasonable (non-exhaustive);
+
+   + verify (iso-)morphisms and similar properties are upheld (e.g.
+     using guile-quickcheck for generating test cases).  E.g. if there
+     is a conversion function f : X -> Y and g : Y -> X, verify
+     (compose f g) = id = (compose g f).  Verify morphisms like
+     (length (append x y)) = length (x) + length (y).
+   + Run mutation tests!  That is, replace < with <=, 0 by 1, a variable
+     reference ‘i’ by a variable reference ‘j’, swap destination and source
+     arguments ... and verify whether the tests catch these little mutations!
+   + Verify argument checking!
+     (basic non-dependent type checking, in-bounds, right capabilities ...,
+     appropriate exception).   An &assertion is usually fine, though
+     occassionally a more informative condition may be in-place.
+
 * Wishlist
   + Schemification
 

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