mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Replace custom isc_boolean_t with C standard bool type
This commit is contained in:
@@ -58,10 +58,10 @@ ATF_TC_BODY(increment, tc) {
|
||||
|
||||
UNUSED(tc);
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
result = dns_test_begin(NULL, false);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
serial = dns_update_soaserial(old, dns_updatemethod_increment);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
|
||||
ATF_CHECK_MSG(serial != 0, "serial (%d) should not equal 0", serial);
|
||||
ATF_REQUIRE_EQ(serial, 51);
|
||||
dns_test_end();
|
||||
@@ -79,10 +79,10 @@ ATF_TC_BODY(increment_past_zero, tc) {
|
||||
|
||||
UNUSED(tc);
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
result = dns_test_begin(NULL, false);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
serial = dns_update_soaserial(old, dns_updatemethod_increment);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
|
||||
ATF_CHECK(serial != 0);
|
||||
ATF_REQUIRE_EQ(serial, 1u);
|
||||
dns_test_end();
|
||||
@@ -102,10 +102,10 @@ ATF_TC_BODY(past_to_unix, tc) {
|
||||
set_mystdtime(2011, 6, 22);
|
||||
old = mystdtime - 1;
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
result = dns_test_begin(NULL, false);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
|
||||
ATF_CHECK(serial != 0);
|
||||
ATF_REQUIRE_EQ(serial, mystdtime);
|
||||
dns_test_end();
|
||||
@@ -125,10 +125,10 @@ ATF_TC_BODY(now_to_unix, tc) {
|
||||
set_mystdtime(2011, 6, 22);
|
||||
old = mystdtime;
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
result = dns_test_begin(NULL, false);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
|
||||
ATF_CHECK(serial != 0);
|
||||
ATF_REQUIRE_EQ(serial, old + 1);
|
||||
dns_test_end();
|
||||
@@ -148,10 +148,10 @@ ATF_TC_BODY(future_to_unix, tc) {
|
||||
set_mystdtime(2011, 6, 22);
|
||||
old = mystdtime + 1;
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
result = dns_test_begin(NULL, false);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
|
||||
ATF_CHECK(serial != 0);
|
||||
ATF_REQUIRE_EQ(serial, old + 1);
|
||||
dns_test_end();
|
||||
@@ -172,10 +172,10 @@ ATF_TC_BODY(undefined_plus1_to_unix, tc) {
|
||||
old = mystdtime ^ 0x80000000u;
|
||||
old += 1;
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
result = dns_test_begin(NULL, false);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
|
||||
ATF_CHECK(serial != 0);
|
||||
ATF_REQUIRE_EQ(serial, mystdtime);
|
||||
dns_test_end();
|
||||
@@ -196,10 +196,10 @@ ATF_TC_BODY(undefined_minus1_to_unix, tc) {
|
||||
old = mystdtime ^ 0x80000000u;
|
||||
old -= 1;
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
result = dns_test_begin(NULL, false);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
|
||||
ATF_CHECK(serial != 0);
|
||||
ATF_REQUIRE_EQ(serial, old + 1);
|
||||
dns_test_end();
|
||||
@@ -219,10 +219,10 @@ ATF_TC_BODY(undefined_to_unix, tc) {
|
||||
set_mystdtime(2011, 6, 22);
|
||||
old = mystdtime ^ 0x80000000u;
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
result = dns_test_begin(NULL, false);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
|
||||
ATF_CHECK(serial != 0);
|
||||
ATF_REQUIRE_EQ(serial, old + 1);
|
||||
dns_test_end();
|
||||
@@ -242,10 +242,10 @@ ATF_TC_BODY(unixtime_zero, tc) {
|
||||
mystdtime = 0;
|
||||
old = 0xfffffff0;
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
result = dns_test_begin(NULL, false);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
serial = dns_update_soaserial(old, dns_updatemethod_unixtime);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
|
||||
ATF_CHECK(serial != 0);
|
||||
ATF_REQUIRE_EQ(serial, old + 1);
|
||||
dns_test_end();
|
||||
@@ -265,10 +265,10 @@ ATF_TC_BODY(past_to_date, tc) {
|
||||
old = dns_update_soaserial(0, dns_updatemethod_date);
|
||||
set_mystdtime(2014, 4, 1);
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
result = dns_test_begin(NULL, false);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
serial = dns_update_soaserial(old, dns_updatemethod_date);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
|
||||
ATF_CHECK(serial != 0);
|
||||
ATF_REQUIRE_EQ(serial, 2014040100);
|
||||
dns_test_end();
|
||||
@@ -288,10 +288,10 @@ ATF_TC_BODY(now_to_date, tc) {
|
||||
set_mystdtime(2014, 4, 1);
|
||||
old = dns_update_soaserial(0, dns_updatemethod_date);
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
result = dns_test_begin(NULL, false);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
serial = dns_update_soaserial(old, dns_updatemethod_date);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
|
||||
ATF_CHECK(serial != 0);
|
||||
ATF_REQUIRE_EQ(serial, 2014040101);
|
||||
dns_test_end();
|
||||
@@ -312,10 +312,10 @@ ATF_TC_BODY(future_to_date, tc) {
|
||||
old = dns_update_soaserial(0, dns_updatemethod_date);
|
||||
set_mystdtime(2014, 3, 31);
|
||||
|
||||
result = dns_test_begin(NULL, ISC_FALSE);
|
||||
result = dns_test_begin(NULL, false);
|
||||
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
|
||||
serial = dns_update_soaserial(old, dns_updatemethod_date);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), ISC_TRUE);
|
||||
ATF_REQUIRE_EQ(isc_serial_lt(old, serial), true);
|
||||
ATF_CHECK(serial != 0);
|
||||
ATF_REQUIRE_EQ(serial, 2014040101);
|
||||
dns_test_end();
|
||||
|
Reference in New Issue
Block a user