From df3d7981c6be6f5c7466b2021ffaf0a32e5d93eeba19765ee2f2f2e35eef1b1d Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 25 Jun 2025 15:09:58 +0300 Subject: [PATCH] Fix test --- py3/tests/test_fuzz_inputs.py | 5 ++--- tcl/keks.tcl | 2 +- tcl/mk-fuzz-inputs | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/py3/tests/test_fuzz_inputs.py b/py3/tests/test_fuzz_inputs.py index 0b78db7..d6312eb 100644 --- a/py3/tests/test_fuzz_inputs.py +++ b/py3/tests/test_fuzz_inputs.py @@ -8,7 +8,6 @@ from unittest import TestCase from keks import _byte from keks import Blob -from keks import Leapsecs1972 from keks import loads from keks import Raw from keks import TagTAI64 @@ -71,10 +70,10 @@ class TestFuzzInputs(TestCase): _byte(TagTAI64) + bytes.fromhex("40000000586846A4"), )) self.assertEqual(readInput("tai-ns"), Raw(_byte(TagTAI64N) + ( - (TAI64Base + Leapsecs1972 + 1234).to_bytes(8, "big") + + (TAI64Base + 1234).to_bytes(8, "big") + (1234).to_bytes(4, "big") ))) self.assertEqual(readInput("tai-as"), Raw(_byte(TagTAI64NA) + ( - (TAI64Base + Leapsecs1972 + 1234).to_bytes(8, "big") + + (TAI64Base + 1234).to_bytes(8, "big") + 2 * (1234).to_bytes(4, "big") ))) diff --git a/tcl/keks.tcl b/tcl/keks.tcl index 8da7348..af5501e 100755 --- a/tcl/keks.tcl +++ b/tcl/keks.tcl @@ -312,7 +312,7 @@ proc ToTAI {v} { break } } - if {$v > 0} { + if {$v >= 0} { incr v 10 } incr v $i diff --git a/tcl/mk-fuzz-inputs b/tcl/mk-fuzz-inputs index 614e29b..65f1eb1 100755 --- a/tcl/mk-fuzz-inputs +++ b/tcl/mk-fuzz-inputs @@ -27,7 +27,7 @@ dump 'LIST {TRUE FALSE}' >list-bool dump 'MAP {}' >map-empty dump 'MAP {a {LIST {NIL}}}' >map-foo dump 'TAI64 [ToTAI [ISOToSec "1970-01-01 00:00:00"]]' >tai-utc0 -dump 'TAI64 -11' >tai-before +dump 'TAI64 -1' >tai-before dump 'RAW [binary decode hex "1840000000586846A4"]' >tai-leap dump 'TAI64 1234 1234' >tai-ns dump 'TAI64 1234 1234 1234' >tai-as -- 2.50.0