Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Eina.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <assert.h>
- int main(int argc, char const *argv[])
- {
- Eina_Value *value;
- Eina_Value_Blob in, out;
- unsigned char blob[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
- eina_init();
- value = eina_value_new(EINA_VALUE_TYPE_BLOB);
- in.ops = NULL;
- in.memory = blob;
- in.size = sizeof(blob);
- assert(eina_value_set(value, in));
- assert(eina_value_get(value, &out));
- assert(out.ops == in.ops);
- assert(out.size == in.size);
- assert(out.memory == in.memory);
- assert(memcmp(&in, &out, sizeof(Eina_Value_Blob)) == 0);
- eina_value_free(value);
- eina_shutdown();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement