]> Cypherpunks repositories - keks.git/commitdiff
Fix terminology
authorSergey Matveev <stargrave@stargrave.org>
Tue, 3 Dec 2024 10:17:50 +0000 (13:17 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 3 Dec 2024 14:24:07 +0000 (17:24 +0300)
There is no general view on how to count the bit indexes.
Usually people use most/least significant bit terminology.

pyac/tests/test_tai.py

index 5262e695fc348324ac1c9ab9423c3c9add83ec6c297d3a3d81b430b163b4e5e9..a04220e9a161991ebf530bac868fcbf218e37ed4bc1430ad6e1d06277e87a6d6 100644 (file)
@@ -85,7 +85,7 @@ class TestTAI64(TestCase):
         self.assertEqual(decoded, Raw(t=0x18, v=bytes.fromhex("7000000065195F65")))
         self.assertSequenceEqual(tail, b"")
 
-    def test_throws_when_first_bit_is_in_use(self) -> None:
+    def test_throws_when_msb_is_set(self) -> None:
         with self.assertRaises(DecodeError) as err:
             loads(bytes.fromhex("188000000065195F65"))
         self.assertEqual(str(err.exception), "reserved TAI64 value is in use")
@@ -139,7 +139,7 @@ class TestTAI64N(TestCase):
         )
         self.assertSequenceEqual(tail, b"")
 
-    def test_throws_when_first_bit_is_in_use(self) -> None:
+    def test_throws_when_msb_is_set(self) -> None:
         with self.assertRaises(DecodeError) as err:
             loads(
                 bytes.fromhex("198000000065195F65") +
@@ -195,7 +195,7 @@ class TestTAI64NA(TestCase):
         ))
         self.assertSequenceEqual(tail, b"")
 
-    def test_throws_when_first_bit_is_in_use(self) -> None:
+    def test_throws_when_msb_is_set(self) -> None:
         with self.assertRaises(DecodeError) as err:
             loads(
                 bytes.fromhex("1A8000000065195F65") +