]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: fix null_nttime() tests
authorRalph Boehme <slow@samba.org>
Wed, 27 Oct 2021 15:02:48 +0000 (17:02 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 28 Oct 2021 18:11:28 +0000 (18:11 +0000)
The test was checking -1 twice:

torture_assert(tctx, null_nttime(-1), "-1");
torture_assert(tctx, null_nttime(-1), "-1");

The first line was likely supposed to test the value "0".

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14127

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/tests/time.c

index 039f7f4ccf894ee35195870f36248c23608d5bb7..6742e7fd3fea9d83b15ab9323ead29c89a807bfe 100644 (file)
@@ -34,7 +34,7 @@ static bool test_null_time(struct torture_context *tctx)
 
 static bool test_null_nttime(struct torture_context *tctx)
 {
-       torture_assert(tctx, null_nttime(-1), "-1");
+       torture_assert(tctx, null_nttime(0), "0");
        torture_assert(tctx, null_nttime(-1), "-1");
        torture_assert(tctx, !null_nttime(42), "42");
        return true;