Lines Matching refs:TEST_EQ
22 TEST_EQ(EXPECTED_VBPUBLICKEY_SIZE, sizeof(VbPublicKey), in StructPackingTest()
24 TEST_EQ(EXPECTED_VBSIGNATURE_SIZE, sizeof(VbSignature), in StructPackingTest()
26 TEST_EQ(EXPECTED_VBKEYBLOCKHEADER_SIZE, sizeof(VbKeyBlockHeader), in StructPackingTest()
28 TEST_EQ(EXPECTED_VBFIRMWAREPREAMBLEHEADER2_0_SIZE, in StructPackingTest()
31 TEST_EQ(EXPECTED_VBFIRMWAREPREAMBLEHEADER2_1_SIZE, in StructPackingTest()
34 TEST_EQ(EXPECTED_VBKERNELPREAMBLEHEADER2_2_SIZE, in StructPackingTest()
38 TEST_EQ(VB_SHARED_DATA_HEADER_SIZE_V1, in StructPackingTest()
42 TEST_EQ(VB_SHARED_DATA_HEADER_SIZE_V2, in StructPackingTest()
54 TEST_EQ(ARRAY_SIZE(arr1), 12, "ARRAYSIZE(uint8_t)"); in ArraySizeTest()
55 TEST_EQ(ARRAY_SIZE(arr2), 7, "ARRAYSIZE(uint32_t)"); in ArraySizeTest()
56 TEST_EQ(ARRAY_SIZE(arr3), 9, "ARRAYSIZE(uint64_t)"); in ArraySizeTest()
64 TEST_EQ((int)OffsetOf(p, p), 0, "OffsetOf() equal"); in VerifyHelperFunctions()
65 TEST_EQ((int)OffsetOf(p, p+10), 10, "OffsetOf() positive"); in VerifyHelperFunctions()
66 TEST_EQ((int)OffsetOf(p, p+0x12345678), 0x12345678, in VerifyHelperFunctions()
72 TEST_EQ((int)OffsetOf(&k, GetPublicKeyData(&k)), sizeof(k), in VerifyHelperFunctions()
74 TEST_EQ((int)OffsetOf(&k, GetPublicKeyDataC(&k)), sizeof(k), in VerifyHelperFunctions()
80 TEST_EQ((int)OffsetOf(&k, GetPublicKeyData(&k)), 123, in VerifyHelperFunctions()
82 TEST_EQ((int)OffsetOf(&k, GetPublicKeyDataC(&k)), 123, in VerifyHelperFunctions()
88 TEST_EQ(VerifyMemberInside(p, 20, p, 6, 11, 3), 0, in VerifyHelperFunctions()
90 TEST_EQ(VerifyMemberInside(p, 20, p+4, 4, 8, 4), 0, in VerifyHelperFunctions()
92 TEST_EQ(VerifyMemberInside(p, 20, p-4, 4, 8, 4), 1, in VerifyHelperFunctions()
94 TEST_EQ(VerifyMemberInside(p, 20, p+20, 4, 8, 4), 1, in VerifyHelperFunctions()
96 TEST_EQ(VerifyMemberInside(p, 20, p, 21, 0, 0), 1, in VerifyHelperFunctions()
98 TEST_EQ(VerifyMemberInside(p, 20, p, 4, 21, 0), 1, in VerifyHelperFunctions()
100 TEST_EQ(VerifyMemberInside(p, 20, p, 4, (uint64_t)-1, 0), 1, in VerifyHelperFunctions()
102 TEST_EQ(VerifyMemberInside(p, 20, p, 4, 4, 17), 1, in VerifyHelperFunctions()
104 TEST_EQ(VerifyMemberInside(p, (uint64_t)-1, in VerifyHelperFunctions()
107 TEST_EQ(VerifyMemberInside(p, (uint64_t)-1, in VerifyHelperFunctions()
110 TEST_EQ(VerifyMemberInside(p, (uint64_t)-1, in VerifyHelperFunctions()
117 TEST_EQ(VerifyPublicKeyInside(&k, sizeof(k)+128, &k), 0, in VerifyHelperFunctions()
119 TEST_EQ(VerifyPublicKeyInside(&k - 1, 2*sizeof(k)+128, &k), 0, in VerifyHelperFunctions()
121 TEST_EQ(VerifyPublicKeyInside(&k, 128, &k), 1, in VerifyHelperFunctions()
127 TEST_EQ(VerifyPublicKeyInside(&k, 99, &k), 1, in VerifyHelperFunctions()
133 TEST_EQ(VerifySignatureInside(&s, sizeof(s)+128, &s), 0, in VerifyHelperFunctions()
135 TEST_EQ(VerifySignatureInside(&s - 1, 2*sizeof(s)+128, &s), 0, in VerifyHelperFunctions()
137 TEST_EQ(VerifySignatureInside(&s, 128, &s), 1, in VerifyHelperFunctions()
143 TEST_EQ(VerifySignatureInside(&s, 99, &s), 1, in VerifyHelperFunctions()
161 TEST_EQ(k->key_offset, sizeof(VbPublicKey), "PublicKeyInit key_offset"); in PublicKeyTest()
162 TEST_EQ(k->key_size, 2 * sizeof(VbPublicKey), "PublicKeyInit key_size"); in PublicKeyTest()
163 TEST_EQ(k->algorithm, kNumAlgorithms, "PublicKeyInit algorithm"); in PublicKeyTest()
164 TEST_EQ(k->key_version, 0, "PublicKeyInit key_version"); in PublicKeyTest()
176 TEST_EQ(0, PublicKeyCopy(j, k), "PublicKeyCopy same"); in PublicKeyTest()
178 TEST_EQ(j->key_offset, 2 * sizeof(VbPublicKey), in PublicKeyTest()
181 TEST_EQ(k->key_size, 2 * sizeof(VbPublicKey), "PublicKeyCopy key_size"); in PublicKeyTest()
183 TEST_EQ(k->algorithm, j->algorithm, "PublicKeyCopy algorithm"); in PublicKeyTest()
184 TEST_EQ(k->key_version, j->key_version, "PublicKeyCopy key_version"); in PublicKeyTest()
186 TEST_EQ(0, in PublicKeyTest()
208 TEST_EQ(VBOOT_SUCCESS, VbSharedDataInit(d, VB_SHARED_DATA_MIN_SIZE), in VbSharedDataTest()
212 TEST_EQ(d->magic, VB_SHARED_DATA_MAGIC, "VbSharedDataInit magic"); in VbSharedDataTest()
213 TEST_EQ(d->struct_version, VB_SHARED_DATA_VERSION, in VbSharedDataTest()
215 TEST_EQ(d->struct_size, sizeof(VbSharedDataHeader), in VbSharedDataTest()
217 TEST_EQ(d->data_size, VB_SHARED_DATA_MIN_SIZE, in VbSharedDataTest()
219 TEST_EQ(d->data_used, d->struct_size, "VbSharedDataInit data_used"); in VbSharedDataTest()
220 TEST_EQ(d->firmware_index, 0xFF, "VbSharedDataInit firmware index"); in VbSharedDataTest()
223 TEST_EQ(d->flags, 0, "VbSharedDataInit firmware flags"); in VbSharedDataTest()
224 TEST_EQ(d->lk_call_count, 0, "VbSharedDataInit lk_call_count"); in VbSharedDataTest()
225 TEST_EQ(d->kernel_version_lowest, 0, in VbSharedDataTest()