diff options
author | Cedric BAIL <cedric.bail@free.fr> | 2013-01-17 06:51:35 +0000 |
---|---|---|
committer | Cedric BAIL <cedric.bail@free.fr> | 2013-01-17 06:51:35 +0000 |
commit | 515282006fdfe7a512dc2363235580adb8b15d9e (patch) | |
tree | 639643475e388c267dfbb7b2221beb745af8878a /src/tests/eina | |
parent | 7d237bcf01881a7eb99ac7271f35ba41b3a48595 (diff) |
efl: Add Eina_Cow_Data...
SVN revision: 82923
Diffstat (limited to 'src/tests/eina')
-rw-r--r-- | src/tests/eina/eina_test_cow.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/tests/eina/eina_test_cow.c b/src/tests/eina/eina_test_cow.c index cefba43f1..85fe65ec5 100644 --- a/src/tests/eina/eina_test_cow.c +++ b/src/tests/eina/eina_test_cow.c @@ -56,22 +56,24 @@ START_TEST(eina_cow_bad) cur = eina_cow_alloc(cow); fail_if(cur == NULL); - write = eina_cow_write(cow, &cur); + write = eina_cow_write(cow, (const Eina_Cow_Data**) &cur); fail_if(write == NULL || write == &default_value); write->i = 7; - eina_cow_done(cow, &cur, write); + eina_cow_done(cow, (const Eina_Cow_Data**) &cur, write); fail_if(cur->i != 7 || default_value.i != 42); eina_log_print_cb_set(_eina_test_log, &over_commit); - eina_cow_done(cow, &cur, write); /* Testing over commit */ + /* Testing over commit */ + eina_cow_done(cow, (const Eina_Cow_Data**) &cur, write); fail_if(!over_commit); - write = eina_cow_write(cow, &cur); + write = eina_cow_write(cow, (const Eina_Cow_Data**) &cur); fail_if(write == NULL || write == &default_value); eina_log_print_cb_set(_eina_test_log, &over_writing); - write = eina_cow_write(cow, &cur); /* Testing over writing */ + /* Testing over writing */ + write = eina_cow_write(cow, (const Eina_Cow_Data**) &cur); fail_if(write != NULL || !over_writing); eina_cow_free(cow, cur); @@ -95,22 +97,24 @@ START_TEST(eina_cow) cur = eina_cow_alloc(cow); fail_if(prev == NULL || cur == NULL); - write = eina_cow_write(cow, &cur); + write = eina_cow_write(cow, (const Eina_Cow_Data**) &cur); fail_if(write == NULL || write == &default_value); write->i = 7; - eina_cow_done(cow, &cur, write); + eina_cow_done(cow, (const Eina_Cow_Data**) &cur, write); fail_if(cur->i != 7 || prev->i != 0); - eina_cow_memcpy(cow, &prev, cur); + eina_cow_memcpy(cow, + (const Eina_Cow_Data**) &prev, + (const Eina_Cow_Data*) cur); fail_if(cur->i != 7 || prev->i != 7); fail_if(default_value.i != 0); - write = eina_cow_write(cow, &cur); + write = eina_cow_write(cow, (const Eina_Cow_Data**) &cur); fail_if(write == NULL || write == &default_value); write->i = 42; write->c = 5; - eina_cow_done(cow, &cur, write); + eina_cow_done(cow, (const Eina_Cow_Data**) &cur, write); fail_if(cur->i != 42 || cur->c != 5 || prev->i != 7 || prev->c != 42 || default_value.c != 42 || default_value.i != 0); @@ -118,15 +122,15 @@ START_TEST(eina_cow) fail_if(eina_cow_gc(cow) == EINA_FALSE); fail_if(eina_cow_gc(cow) == EINA_FALSE); - write = eina_cow_write(cow, &cur); + write = eina_cow_write(cow, (const Eina_Cow_Data**) &cur); write->i = 7; write->c = 42; - eina_cow_done(cow, &cur, write); + eina_cow_done(cow, (const Eina_Cow_Data**) &cur, write); fail_if(eina_cow_gc(cow) == EINA_FALSE); fail_if(cur != prev); - eina_cow_free(cow, cur); - eina_cow_free(cow, prev); + eina_cow_free(cow, (const Eina_Cow_Data*) cur); + eina_cow_free(cow, (const Eina_Cow_Data*) prev); eina_cow_del(cow); } |