rem: static void CheckResource(BFile &file, const TypeValue &value) { ::CheckResource(file, kTypeAttribute, kTypeResourceID, B_MIME_STRING_TYPE, value.type.c_str(), value.type.length() + 1); }
add: CheckResource(BFile &file, const char *name, int32 id, type_code type, const void *data, size_t dataSize) { BResources resources; CHK(resources.SetTo(&file) == B_OK); int32 idFound; size_t size; CHK(resources.GetResourceInfo(type, name, &idFound, &size) == true); CHK(idFound == id); CHK(size == dataSize); const void *resourceData = resources.LoadResource(type, name, &size); CHK(resourceData != NULL); CHK(size == dataSize); CHK(memcmp(resourceData, data, dataSize) == 0); }
context: 	static void CheckResource(BFile &file, const TypeValue &value)	{		::CheckResource(file, kTypeAttribute, kTypeResourceID,						B_MIME_STRING_TYPE, value.type.c_str(),						value.type.length() + 1);	}