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 <noreply@anthropic.com>
v0.12
dev 6 days ago
parent edff5d1004
commit 0e7ec36e77

@ -69,6 +69,7 @@ func TestTSTInfoStrict(t *testing.T) {
"only micros": {[][]byte{cmstest.Seq(us(7))}, 7 * time.Microsecond}, "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 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 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}, "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}, "2^31 - 1 seconds": {[][]byte{cmstest.Seq(cmstest.Int(1<<31 - 1))}, (1<<31 - 1) * time.Second},
"ordering TRUE": {[][]byte{cmstest.Bool(true)}, 0}, "ordering TRUE": {[][]byte{cmstest.Bool(true)}, 0},

Loading…
Cancel
Save

Powered by TurnKey Linux.