Lines Matching refs:EXPECT

212 	EXPECT(GUID_EXPECTED_SIZE == sizeof(Guid));  in StructSizeTest()
213 EXPECT(GPTHEADER_EXPECTED_SIZE == sizeof(GptHeader)); in StructSizeTest()
214 EXPECT(GPTENTRY_EXPECTED_SIZE == sizeof(GptEntry)); in StructSizeTest()
226 EXPECT(GPT_SUCCESS == GptInit(gpt)); in TestBuildTestGptData()
228 EXPECT(GPT_ERROR_INVALID_SECTOR_SIZE == GptInit(gpt)); in TestBuildTestGptData()
262 EXPECT(cases[i].expected_retval == CheckParameters(gpt)); in ParameterTests()
275 EXPECT(HeaderCrc(h1) == h1->header_crc32); in HeaderCrcTest()
280 EXPECT(HeaderCrc(h1) != h1->header_crc32); in HeaderCrcTest()
285 EXPECT(HeaderCrc(h1) != h1->header_crc32); in HeaderCrcTest()
290 EXPECT(HeaderCrc(h1) == h1->header_crc32); in HeaderCrcTest()
303 EXPECT(0 == HeaderFieldsSame(h1, h2)); in HeaderSameTest()
307 EXPECT(1 == HeaderFieldsSame(h1, &h3)); in HeaderSameTest()
311 EXPECT(1 == HeaderFieldsSame(h1, &h3)); in HeaderSameTest()
315 EXPECT(1 == HeaderFieldsSame(h1, &h3)); in HeaderSameTest()
319 EXPECT(1 == HeaderFieldsSame(h1, &h3)); in HeaderSameTest()
323 EXPECT(1 == HeaderFieldsSame(h1, &h3)); in HeaderSameTest()
327 EXPECT(1 == HeaderFieldsSame(h1, &h3)); in HeaderSameTest()
331 EXPECT(1 == HeaderFieldsSame(h1, &h3)); in HeaderSameTest()
335 EXPECT(1 == HeaderFieldsSame(h1, &h3)); in HeaderSameTest()
339 EXPECT(1 == HeaderFieldsSame(h1, &h3)); in HeaderSameTest()
343 EXPECT(1 == HeaderFieldsSame(h1, &h3)); in HeaderSameTest()
356 EXPECT(1 == CheckHeader(NULL, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in SignatureTest()
363 EXPECT(1 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in SignatureTest()
364 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in SignatureTest()
398 EXPECT(CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0) == in RevisionTest()
400 EXPECT(CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0) == in RevisionTest()
431 EXPECT(CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0) == in SizeTest()
433 EXPECT(CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0) == in SizeTest()
450 EXPECT(1 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in CrcFieldTest()
451 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in CrcFieldTest()
454 EXPECT(0 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in CrcFieldTest()
455 EXPECT(0 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in CrcFieldTest()
471 EXPECT(1 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in ReservedFieldsTest()
472 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in ReservedFieldsTest()
480 EXPECT(1 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in ReservedFieldsTest()
481 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in ReservedFieldsTest()
519 EXPECT(CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0) == in SizeOfPartitionEntryTest()
521 EXPECT(CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0) == in SizeOfPartitionEntryTest()
544 EXPECT(1 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in NumberOfPartitionEntriesTest()
545 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in NumberOfPartitionEntriesTest()
547EXPECT(0 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, GPT_FLAG_EXTE… in NumberOfPartitionEntriesTest()
548EXPECT(0 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, GPT_FLAG_EXTE… in NumberOfPartitionEntriesTest()
563 EXPECT(1 == CheckHeader(h1, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
564 EXPECT(1 == CheckHeader(h2, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
570 EXPECT(1 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
571 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
577 EXPECT(1 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
578 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
585 EXPECT(0 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
586 EXPECT(0 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
592 EXPECT(0 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
593 EXPECT(0 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
603 EXPECT(0 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
608 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
614 EXPECT(1 == CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
615 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
664 EXPECT(CheckHeader(h1, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0) == in FirstUsableLbaAndLastUsableLbaTest()
666 EXPECT(CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0) == in FirstUsableLbaAndLastUsableLbaTest()
686 EXPECT(0 == CheckEntries(e1, h1)); in EntriesCrcTest()
687 EXPECT(0 == CheckEntries(e2, h1)); in EntriesCrcTest()
690 EXPECT(GPT_ERROR_CRC_CORRUPTED == CheckEntries(e1, h1)); in EntriesCrcTest()
691 EXPECT(GPT_ERROR_CRC_CORRUPTED == CheckEntries(e2, h1)); in EntriesCrcTest()
713 EXPECT(GPT_ERROR_OUT_OF_REGION == CheckEntries(e1, h1)); in ValidEntryTest()
719 EXPECT(GPT_ERROR_OUT_OF_REGION == CheckEntries(e1, h1)); in ValidEntryTest()
725 EXPECT(GPT_ERROR_OUT_OF_REGION == CheckEntries(e1, h1)); in ValidEntryTest()
732 EXPECT(0 == CheckEntries(e1, h1)); in ValidEntryTest()
808 EXPECT(cases[i].overlapped == CheckEntries(e, h)); in OverlappedPartitionTest()
823 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
824 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
825 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
828 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
829 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
830 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
831 EXPECT(0 == gpt->modified); in SanityCheckTest()
836 EXPECT(GPT_ERROR_INVALID_SECTOR_SIZE == GptSanityCheck(gpt)); in SanityCheckTest()
842 EXPECT(GPT_ERROR_INVALID_HEADERS == GptSanityCheck(gpt)); in SanityCheckTest()
843 EXPECT(0 == gpt->valid_headers); in SanityCheckTest()
844 EXPECT(0 == gpt->valid_entries); in SanityCheckTest()
847 EXPECT(GPT_ERROR_INVALID_HEADERS == GptSanityCheck(gpt)); in SanityCheckTest()
848 EXPECT(0 == gpt->valid_headers); in SanityCheckTest()
849 EXPECT(0 == gpt->valid_entries); in SanityCheckTest()
850 EXPECT(0 == gpt->modified); in SanityCheckTest()
854 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
855 EXPECT(MASK_SECONDARY == gpt->valid_headers); in SanityCheckTest()
856 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
858 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
859 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
860 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
861 EXPECT(GPT_MODIFIED_HEADER1 == gpt->modified); in SanityCheckTest()
865 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
866 EXPECT(MASK_PRIMARY == gpt->valid_headers); in SanityCheckTest()
867 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
869 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
870 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
871 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
872 EXPECT(GPT_MODIFIED_HEADER2 == gpt->modified); in SanityCheckTest()
881 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
882 EXPECT(MASK_PRIMARY == gpt->valid_headers); in SanityCheckTest()
883 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
885 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
886 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
887 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
888 EXPECT(GPT_MODIFIED_HEADER2 == gpt->modified); in SanityCheckTest()
894 EXPECT(GPT_ERROR_INVALID_ENTRIES == GptSanityCheck(gpt)); in SanityCheckTest()
895 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
896 EXPECT(MASK_NONE == gpt->valid_entries); in SanityCheckTest()
899 EXPECT(GPT_ERROR_INVALID_ENTRIES == GptSanityCheck(gpt)); in SanityCheckTest()
900 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
901 EXPECT(MASK_NONE == gpt->valid_entries); in SanityCheckTest()
902 EXPECT(0 == gpt->modified); in SanityCheckTest()
906 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
907 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
908 EXPECT(MASK_SECONDARY == gpt->valid_entries); in SanityCheckTest()
910 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
911 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
912 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
913 EXPECT(GPT_MODIFIED_ENTRIES1 == gpt->modified); in SanityCheckTest()
917 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
918 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
919 EXPECT(MASK_PRIMARY == gpt->valid_entries); in SanityCheckTest()
921 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
922 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
923 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
924 EXPECT(GPT_MODIFIED_ENTRIES2 == gpt->modified); in SanityCheckTest()
937 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
938 EXPECT(MASK_SECONDARY == gpt->valid_headers); in SanityCheckTest()
939 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
946 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
947 EXPECT(MASK_SECONDARY == gpt->valid_headers); in SanityCheckTest()
948 EXPECT(MASK_SECONDARY == gpt->valid_entries); in SanityCheckTest()
950 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
951 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
952 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
953 EXPECT((GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1) == gpt->modified); in SanityCheckTest()
958 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
959 EXPECT(MASK_PRIMARY == gpt->valid_headers); in SanityCheckTest()
960 EXPECT(MASK_PRIMARY == gpt->valid_entries); in SanityCheckTest()
962 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
963 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
964 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
965 EXPECT((GPT_MODIFIED_HEADER2 | GPT_MODIFIED_ENTRIES2) == gpt->modified); in SanityCheckTest()
971 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
972 EXPECT(MASK_SECONDARY == gpt->valid_headers); in SanityCheckTest()
973 EXPECT(MASK_PRIMARY == gpt->valid_entries); in SanityCheckTest()
975 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
976 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
977 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
978 EXPECT((GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES2) == gpt->modified); in SanityCheckTest()
983 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
984 EXPECT(MASK_PRIMARY == gpt->valid_headers); in SanityCheckTest()
985 EXPECT(MASK_SECONDARY == gpt->valid_entries); in SanityCheckTest()
987 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
988 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
989 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
990 EXPECT((GPT_MODIFIED_HEADER2 | GPT_MODIFIED_ENTRIES1) == gpt->modified); in SanityCheckTest()
999 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
1000 EXPECT(MASK_PRIMARY == gpt->valid_headers); in SanityCheckTest()
1001 EXPECT(MASK_PRIMARY == gpt->valid_entries); in SanityCheckTest()
1003 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
1004 EXPECT(MASK_BOTH == gpt->valid_headers); in SanityCheckTest()
1005 EXPECT(MASK_BOTH == gpt->valid_entries); in SanityCheckTest()
1006 EXPECT((GPT_MODIFIED_HEADER2 | GPT_MODIFIED_ENTRIES2) == gpt->modified); in SanityCheckTest()
1012 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
1013 EXPECT(MASK_SECONDARY == gpt->valid_entries); in SanityCheckTest()
1017 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
1018 EXPECT(MASK_PRIMARY == gpt->valid_entries); in SanityCheckTest()
1024 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
1025 EXPECT(MASK_SECONDARY == gpt->valid_headers); in SanityCheckTest()
1029 EXPECT(GPT_SUCCESS == GptSanityCheck(gpt)); in SanityCheckTest()
1030 EXPECT(MASK_PRIMARY == gpt->valid_headers); in SanityCheckTest()
1042 EXPECT(0x0100000000000000ULL == e->attrs.whole); in EntryAttributeGetSetTest()
1043 EXPECT(1 == GetEntrySuccessful(e)); in EntryAttributeGetSetTest()
1046 EXPECT(0xFEFFFFFFFFFFFFFFULL == e->attrs.whole); in EntryAttributeGetSetTest()
1047 EXPECT(0 == GetEntrySuccessful(e)); in EntryAttributeGetSetTest()
1051 EXPECT(15 == GetEntryTries(e)); in EntryAttributeGetSetTest()
1052 EXPECT(0x00F0000000000000ULL == e->attrs.whole); in EntryAttributeGetSetTest()
1055 EXPECT(0xFF0FFFFFFFFFFFFFULL == e->attrs.whole); in EntryAttributeGetSetTest()
1056 EXPECT(0 == GetEntryTries(e)); in EntryAttributeGetSetTest()
1060 EXPECT(0x000F000000000000ULL == e->attrs.whole); in EntryAttributeGetSetTest()
1061 EXPECT(15 == GetEntryPriority(e)); in EntryAttributeGetSetTest()
1064 EXPECT(0xFFF0FFFFFFFFFFFFULL == e->attrs.whole); in EntryAttributeGetSetTest()
1065 EXPECT(0 == GetEntryPriority(e)); in EntryAttributeGetSetTest()
1068 EXPECT(1 == GetEntrySuccessful(e)); in EntryAttributeGetSetTest()
1069 EXPECT(15 == GetEntryPriority(e)); in EntryAttributeGetSetTest()
1070 EXPECT(15 == GetEntryTries(e)); in EntryAttributeGetSetTest()
1073 EXPECT(1 == GetEntrySuccessful(e)); in EntryAttributeGetSetTest()
1074 EXPECT(2 == GetEntryTries(e)); in EntryAttributeGetSetTest()
1075 EXPECT(3 == GetEntryPriority(e)); in EntryAttributeGetSetTest()
1086 EXPECT(1 == IsUnusedEntry(e)); in EntryTypeTest()
1087 EXPECT(0 == IsKernelEntry(e)); in EntryTypeTest()
1090 EXPECT(0 == IsUnusedEntry(e)); in EntryTypeTest()
1091 EXPECT(1 == IsKernelEntry(e)); in EntryTypeTest()
1094 EXPECT(0 == IsUnusedEntry(e)); in EntryTypeTest()
1095 EXPECT(0 == IsKernelEntry(e)); in EntryTypeTest()
1129 EXPECT(GPT_ERROR_NO_VALID_KERNEL == in NoValidKernelEntryTest()
1148 EXPECT(GPT_SUCCESS == GptNextKernelEntry(gpt, &start, &size)); in GetNextNormalTest()
1149 EXPECT(KERNEL_A == gpt->current_kernel); in GetNextNormalTest()
1150 EXPECT(34 == start); in GetNextNormalTest()
1151 EXPECT(100 == size); in GetNextNormalTest()
1153 EXPECT(GPT_SUCCESS == GptNextKernelEntry(gpt, &start, &size)); in GetNextNormalTest()
1154 EXPECT(KERNEL_B == gpt->current_kernel); in GetNextNormalTest()
1155 EXPECT(134 == start); in GetNextNormalTest()
1156 EXPECT(99 == size); in GetNextNormalTest()
1158 EXPECT(GPT_ERROR_NO_VALID_KERNEL == in GetNextNormalTest()
1160 EXPECT(-1 == gpt->current_kernel); in GetNextNormalTest()
1163 EXPECT(GPT_ERROR_NO_VALID_KERNEL == in GetNextNormalTest()
1165 EXPECT(-1 == gpt->current_kernel); in GetNextNormalTest()
1185 EXPECT(GPT_SUCCESS == GptNextKernelEntry(gpt, &start, &size)); in GetNextPrioTest()
1186 EXPECT(KERNEL_B == gpt->current_kernel); in GetNextPrioTest()
1187 EXPECT(GPT_SUCCESS == GptNextKernelEntry(gpt, &start, &size)); in GetNextPrioTest()
1188 EXPECT(KERNEL_Y == gpt->current_kernel); in GetNextPrioTest()
1189 EXPECT(GPT_SUCCESS == GptNextKernelEntry(gpt, &start, &size)); in GetNextPrioTest()
1190 EXPECT(KERNEL_A == gpt->current_kernel); in GetNextPrioTest()
1191 EXPECT(GPT_ERROR_NO_VALID_KERNEL == in GetNextPrioTest()
1212 EXPECT(GPT_SUCCESS == GptNextKernelEntry(gpt, &start, &size)); in GetNextTriesTest()
1213 EXPECT(KERNEL_X == gpt->current_kernel); in GetNextTriesTest()
1214 EXPECT(GPT_SUCCESS == GptNextKernelEntry(gpt, &start, &size)); in GetNextTriesTest()
1215 EXPECT(KERNEL_A == gpt->current_kernel); in GetNextTriesTest()
1216 EXPECT(GPT_ERROR_NO_VALID_KERNEL == in GetNextTriesTest()
1239 EXPECT(GPT_SUCCESS == GptNextKernelEntry(gpt, &start, &size)); in GptUpdateTest()
1240 EXPECT(KERNEL_A == gpt->current_kernel); in GptUpdateTest()
1241 EXPECT(1 == GetEntrySuccessful(e + KERNEL_A)); in GptUpdateTest()
1242 EXPECT(4 == GetEntryPriority(e + KERNEL_A)); in GptUpdateTest()
1243 EXPECT(0 == GetEntryTries(e + KERNEL_A)); in GptUpdateTest()
1244 EXPECT(1 == GetEntrySuccessful(e2 + KERNEL_A)); in GptUpdateTest()
1245 EXPECT(4 == GetEntryPriority(e2 + KERNEL_A)); in GptUpdateTest()
1246 EXPECT(0 == GetEntryTries(e2 + KERNEL_A)); in GptUpdateTest()
1248 EXPECT(GPT_SUCCESS == GptUpdateKernelEntry(gpt, GPT_UPDATE_ENTRY_TRY)); in GptUpdateTest()
1249 EXPECT(1 == GetEntrySuccessful(e + KERNEL_A)); in GptUpdateTest()
1250 EXPECT(4 == GetEntryPriority(e + KERNEL_A)); in GptUpdateTest()
1251 EXPECT(0 == GetEntryTries(e + KERNEL_A)); in GptUpdateTest()
1252 EXPECT(0 == gpt->modified); in GptUpdateTest()
1254 EXPECT(GPT_SUCCESS == GptUpdateKernelEntry(gpt, GPT_UPDATE_ENTRY_BAD)); in GptUpdateTest()
1255 EXPECT(1 == GetEntrySuccessful(e + KERNEL_A)); in GptUpdateTest()
1256 EXPECT(4 == GetEntryPriority(e + KERNEL_A)); in GptUpdateTest()
1257 EXPECT(0 == GetEntryTries(e + KERNEL_A)); in GptUpdateTest()
1258 EXPECT(0 == gpt->modified); in GptUpdateTest()
1261 EXPECT(GPT_SUCCESS == GptNextKernelEntry(gpt, &start, &size)); in GptUpdateTest()
1262 EXPECT(KERNEL_B == gpt->current_kernel); in GptUpdateTest()
1263 EXPECT(0 == GetEntrySuccessful(e + KERNEL_B)); in GptUpdateTest()
1264 EXPECT(3 == GetEntryPriority(e + KERNEL_B)); in GptUpdateTest()
1265 EXPECT(2 == GetEntryTries(e + KERNEL_B)); in GptUpdateTest()
1267 EXPECT(GPT_SUCCESS == GptUpdateKernelEntry(gpt, GPT_UPDATE_ENTRY_BAD)); in GptUpdateTest()
1268 EXPECT(0 == GetEntrySuccessful(e + KERNEL_B)); in GptUpdateTest()
1269 EXPECT(0 == GetEntryPriority(e + KERNEL_B)); in GptUpdateTest()
1270 EXPECT(0 == GetEntryTries(e + KERNEL_B)); in GptUpdateTest()
1272 EXPECT(0 == GetEntrySuccessful(e2 + KERNEL_B)); in GptUpdateTest()
1273 EXPECT(0 == GetEntryPriority(e2 + KERNEL_B)); in GptUpdateTest()
1274 EXPECT(0 == GetEntryTries(e2 + KERNEL_B)); in GptUpdateTest()
1276 EXPECT(0x0F == gpt->modified); in GptUpdateTest()
1279 EXPECT(GPT_SUCCESS == GptNextKernelEntry(gpt, &start, &size)); in GptUpdateTest()
1280 EXPECT(KERNEL_X == gpt->current_kernel); in GptUpdateTest()
1281 EXPECT(0 == GetEntrySuccessful(e + KERNEL_X)); in GptUpdateTest()
1282 EXPECT(2 == GetEntryPriority(e + KERNEL_X)); in GptUpdateTest()
1283 EXPECT(2 == GetEntryTries(e + KERNEL_X)); in GptUpdateTest()
1285 EXPECT(GPT_SUCCESS == GptUpdateKernelEntry(gpt, GPT_UPDATE_ENTRY_TRY)); in GptUpdateTest()
1286 EXPECT(0 == GetEntrySuccessful(e + KERNEL_X)); in GptUpdateTest()
1287 EXPECT(2 == GetEntryPriority(e + KERNEL_X)); in GptUpdateTest()
1288 EXPECT(1 == GetEntryTries(e + KERNEL_X)); in GptUpdateTest()
1289 EXPECT(0 == GetEntrySuccessful(e2 + KERNEL_X)); in GptUpdateTest()
1290 EXPECT(2 == GetEntryPriority(e2 + KERNEL_X)); in GptUpdateTest()
1291 EXPECT(1 == GetEntryTries(e2 + KERNEL_X)); in GptUpdateTest()
1293 EXPECT(GPT_SUCCESS == GptUpdateKernelEntry(gpt, GPT_UPDATE_ENTRY_TRY)); in GptUpdateTest()
1294 EXPECT(0 == GetEntrySuccessful(e + KERNEL_X)); in GptUpdateTest()
1295 EXPECT(0 == GetEntryPriority(e + KERNEL_X)); in GptUpdateTest()
1296 EXPECT(0 == GetEntryTries(e + KERNEL_X)); in GptUpdateTest()
1300 EXPECT(GPT_ERROR_INVALID_UPDATE_TYPE == in GptUpdateTest()
1303 EXPECT(GPT_ERROR_INVALID_UPDATE_TYPE == in GptUpdateTest()
1322 EXPECT(GPT_ERROR_INVALID_UPDATE_TYPE == in UpdateInvalidKernelTypeTest()
1381 EXPECT(cases[i].duplicate == CheckEntries(e, h)); in DuplicateUniqueGuidTest()
1397 EXPECT(!Memcmp(&g, &e[0].unique, sizeof(Guid))); in GetKernelGuidTest()
1400 EXPECT(!Memcmp(&g, &e[1].unique, sizeof(Guid))); in GetKernelGuidTest()
1412 EXPECT(GptErrorText(i)); in ErrorTextTest()
1413 EXPECT(strcmp(GptErrorText(i), "Unknown")); in ErrorTextTest()
1417 EXPECT(!strcmp(GptErrorText(GPT_ERROR_COUNT), "Unknown")); in ErrorTextTest()
1432 EXPECT(1 == CheckHeader(primary_header, 0, gpt->streaming_drive_sectors, in CheckHeaderOffDevice()
1435 EXPECT(0 == CheckHeader(primary_header, 0, gpt->streaming_drive_sectors, in CheckHeaderOffDevice()
1442 EXPECT(1 == CheckHeader(primary_header, 0, gpt->streaming_drive_sectors, in CheckHeaderOffDevice()
1445 EXPECT(0 == CheckHeader(primary_header, 0, gpt->streaming_drive_sectors, in CheckHeaderOffDevice()
1451 EXPECT(1 == CheckHeader(primary_header, 0, gpt->streaming_drive_sectors, in CheckHeaderOffDevice()
1459 EXPECT(1 == CheckHeader(secondary_header, 1, gpt->streaming_drive_sectors, in CheckHeaderOffDevice()
1461 EXPECT(0 == CheckHeader(secondary_header, 1, gpt->streaming_drive_sectors, in CheckHeaderOffDevice()
1470 EXPECT(1 == CheckHeader(secondary_header, 1, gpt->streaming_drive_sectors, in CheckHeaderOffDevice()
1472 EXPECT(0 == CheckHeader(secondary_header, 1, gpt->streaming_drive_sectors, in CheckHeaderOffDevice()
1477 EXPECT(1 == CheckHeader(secondary_header, 1, gpt->streaming_drive_sectors, in CheckHeaderOffDevice()