@@ -1044,9 +1044,13 @@ public static void TestCompareToOne(byte[] bytes) {
10441044 if (!cbor .equals (cbor2 )) {
10451045 String sbytes = TestCommon .ToByteArrayString (bytes );
10461046 Assert .assertEquals (sbytes , cbor , cbor2 );
1047- Assert .assertEquals (sbytes , 0 , cbor .compareTo (cbor2 ));
10481047 } else {
10491048 Assert .assertEquals (cbor , cbor2 );
1049+ }
1050+ if (cbor .compareTo (cbor2 ) != 0 ) {
1051+ String sbytes = TestCommon .ToByteArrayString (bytes );
1052+ Assert .assertEquals (sbytes , 0 , cbor .compareTo (cbor2 ));
1053+ } else {
10501054 Assert .assertEquals (0 , cbor .compareTo (cbor2 ));
10511055 }
10521056 }
@@ -1057,6 +1061,66 @@ public void TestCompareToSpecificA() {
10571061TestCompareToOne (bytes );
10581062 }
10591063
1064+ @ Test
1065+ public void TestCompareToSpecificE () {
1066+ byte [] bytes = new byte [] {
1067+ (byte )0xbf ,
1068+ (byte )0xf9 ,
1069+ (byte )0xce ,
1070+ (byte )0xdc ,
1071+ (byte )0x99 , 0x00 , 0x01 ,
1072+ (byte )0xf8 ,
1073+ (byte )0xa0 , 0x61 , 0x37 , 0x12 , 0x7f , 0x78 , 0x0d , 0x1c , 0x78 , 0x4a , 0x48 , 0x3e ,
1074+ (byte )0xe1 ,
1075+ (byte )0xa5 ,
1076+ (byte )0xb2 ,
1077+ (byte )0xf4 ,
1078+ (byte )0x82 ,
1079+ (byte )0x8f ,
1080+ (byte )0x8a , 0x32 , 0x7b , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x04 ,
1081+ 0x2d , 0x57 , 0x55 , 0x08 , 0x7b , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
1082+ 0x02 , 0x41 , 0x28 ,
1083+ (byte )0xff , (byte )0xe3 , (byte )0xff ,
1084+ };
1085+ TestCompareToOne (bytes );
1086+ }
1087+
1088+ @ Test
1089+ public void TestCompareToSpecificC () {
1090+ byte [] bytes = new byte [] {
1091+ (byte )0xb9 , 0x00 , 0x02 ,
1092+ (byte )0xfa ,
1093+ (byte )0x93 ,
1094+ (byte )0x96 ,
1095+ (byte )0xf3 ,
1096+ (byte )0xcb , 0x1b ,
1097+ (byte )0xe7 , 0x65 , 0x72 ,
1098+ (byte )0x83 ,
1099+ (byte )0xa0 , 0x39 ,
1100+ (byte )0xa0 ,
1101+ (byte )0xfe , 0x7f , 0x7b , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x01 ,
1102+ 0x2e , 0x7a , 0x00 , 0x00 , 0x00 , 0x03 , 0x1e , 0x33 , 0x52 , 0x60 , 0x7a , 0x00 ,
1103+ 0x00 , 0x00 , 0x03 , 0x62 , 0x1e , 0x23 ,
1104+ (byte )0xff , 0x18 , (byte )0x89 ,
1105+ };
1106+ TestCompareToOne (bytes );
1107+ }
1108+
1109+ @ Test
1110+ public void TestCompareToSpecificD () {
1111+ byte [] bytes = new byte [] {
1112+ (byte )0xbf , 0x00 , 0x00 ,
1113+ (byte )0xe0 , 0x00 , 0x7f , 0x78 , 0x10 , 0x64 , 0x6b , 0x05 , 0x77 , 0x38 , 0x3c ,
1114+ 0x51 , 0x66 , 0x7c , 0x02 , 0x31 , 0x51 , 0x56 , 0x33 , 0x56 , 0x6a , 0x7b , 0x00 ,
1115+ 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x07 , 0x70 , 0x16 , 0x20 , 0x2f , 0x29 ,
1116+ 0x1a , 0x1f , 0x7b , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x78 ,
1117+ 0x01 , 0x5c ,
1118+ (byte )0xff , (byte )0xfa , (byte )0xa1 , (byte )0xeb , (byte )0xc3 , 0x1d ,
1119+ (byte )0xff ,
1120+ };
1121+ TestCompareToOne (bytes );
1122+ }
1123+
10601124 @ Test
10611125 public void TestCompareToSpecificB () {
10621126byte [] bytes = new byte [] {
0 commit comments