Merge branch 'dev' of ssh://box/var/lib/git/libucore into dev
This commit is contained in:
@@ -26,12 +26,12 @@ START_TEST (test_restart_counter)
|
||||
|
||||
rc = uc_restart_counter_init(&cnt, FILE_NAME, 0);
|
||||
fail_if(rc != UC_RC_OK);
|
||||
ck_assert_uint_eq(0, uc_restart_counter_get(&cnt));
|
||||
ck_assert_int_eq(0, uc_restart_counter_get(&cnt));
|
||||
|
||||
rc = uc_restart_counter_init(&cnt, FILE_NAME, 0);
|
||||
fail_if(rc != UC_RC_OK);
|
||||
|
||||
ck_assert_uint_eq(1, uc_restart_counter_get(&cnt));
|
||||
ck_assert_int_eq(1, uc_restart_counter_get(&cnt));
|
||||
|
||||
END_TEST
|
||||
|
||||
@@ -48,7 +48,7 @@ START_TEST (test_restart_counter_existing)
|
||||
|
||||
rc = uc_restart_counter_init(&cnt, FILE_NAME, 0);
|
||||
fail_if(rc != UC_RC_OK);
|
||||
ck_assert_uint_eq(100000, uc_restart_counter_get(&cnt));
|
||||
ck_assert_int_eq(100000, uc_restart_counter_get(&cnt));
|
||||
|
||||
END_TEST
|
||||
|
||||
@@ -72,11 +72,11 @@ START_TEST (test_restart_counter_garble)
|
||||
|
||||
rc = uc_restart_counter_init(&cnt, FILE_NAME, 0);
|
||||
fail_if(rc != UC_RC_ERR_FILE_CONTENT_ERROR);
|
||||
ck_assert_uint_eq(0, uc_restart_counter_get(&cnt));
|
||||
ck_assert_int_eq(0, uc_restart_counter_get(&cnt));
|
||||
|
||||
rc = uc_restart_counter_init(&cnt, FILE_NAME, 0);
|
||||
fail_if(rc != UC_RC_OK, "%d", rc);
|
||||
ck_assert_uint_eq(1, uc_restart_counter_get(&cnt));
|
||||
ck_assert_int_eq(1, uc_restart_counter_get(&cnt));
|
||||
|
||||
END_TEST
|
||||
|
||||
@@ -103,7 +103,7 @@ START_TEST (test_restart_counter_lock_file)
|
||||
|
||||
rc = uc_restart_counter_init(&cnt, FILE_NAME, UC_RC_FL_LOCK_FILE);
|
||||
fail_if(rc != UC_RC_OK);
|
||||
ck_assert_uint_eq(0, uc_restart_counter_get(&cnt));
|
||||
ck_assert_int_eq(0, uc_restart_counter_get(&cnt));
|
||||
rc = uc_restart_counter_close(&cnt);
|
||||
fail_if(rc != UC_RC_OK);
|
||||
rc = uc_restart_counter_close(&cnt);
|
||||
@@ -118,7 +118,7 @@ START_TEST (test_restart_counter_lock_file)
|
||||
sem_post(&sem[1]);
|
||||
printf("rc = %d\n", rc);
|
||||
fail_if(rc != UC_RC_ERR_FILE_LOCKED);
|
||||
ck_assert_uint_eq(0, uc_restart_counter_get(&cnt));
|
||||
ck_assert_int_eq(0, uc_restart_counter_get(&cnt));
|
||||
} else {
|
||||
uc_restart_counter_init(&cnt, FILE_NAME, UC_RC_FL_LOCK_FILE);
|
||||
sem_post(&sem[0]);
|
||||
|
||||
Reference in New Issue
Block a user