From 0e7ec36e77335fe1a085525155f5fa83d032c670 Mon Sep 17 00:00:00 2001 From: dev Date: Fri, 2 Oct 2026 04:53:30 +0200 Subject: [PATCH] Tests: millis of 300, two bytes whose low byte is under 0x80 The check of a minimal INTEGER in the millis of an accuracy was tested only with 128 and 999, whose low byte has its high bit set: a check that took every two-byte value under 0x8000 for one that is not minimal left them all passing. 300, 01 2c, is minimal and must read. Co-Authored-By: Claude Opus 5.5 --- internal/cms/hostile_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/cms/hostile_test.go b/internal/cms/hostile_test.go index 41e35a6..af515e6 100644 --- a/internal/cms/hostile_test.go +++ b/internal/cms/hostile_test.go @@ -69,6 +69,7 @@ func TestTSTInfoStrict(t *testing.T) { "only micros": {[][]byte{cmstest.Seq(us(7))}, 7 * time.Microsecond}, "millis and micros of 999": {[][]byte{cmstest.Seq(ms(0x03, 0xe7), us(0x03, 0xe7))}, 999*time.Millisecond + 999*time.Microsecond}, "millis of 128": {[][]byte{cmstest.Seq(ms(0, 0x80))}, 128 * time.Millisecond}, + "millis of 300": {[][]byte{cmstest.Seq(ms(0x01, 0x2c))}, 300 * time.Millisecond}, "seconds, millis and micros": {[][]byte{cmstest.Seq(cmstest.Int(1), ms(5), us(7))}, time.Second + 5*time.Millisecond + 7*time.Microsecond}, "2^31 - 1 seconds": {[][]byte{cmstest.Seq(cmstest.Int(1<<31 - 1))}, (1<<31 - 1) * time.Second}, "ordering TRUE": {[][]byte{cmstest.Bool(true)}, 0},