diff options
| author | Aldrik Ramaekers <aldrik@mailbox.org> | 2026-01-11 12:48:05 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@mailbox.org> | 2026-01-11 12:48:05 +0100 |
| commit | 08d42688d851eb134da496be721e234f53ff8d0b (patch) | |
| tree | 5c8a448a42cd8ec4dc35c55edef85f0063b9a50a /tests/administration_validation_tests.cpp | |
| parent | ccbc6a8f0836583fabd59919bd7930d7cfe1473e (diff) | |
fix warnings
Diffstat (limited to 'tests/administration_validation_tests.cpp')
| -rw-r--r-- | tests/administration_validation_tests.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/administration_validation_tests.cpp b/tests/administration_validation_tests.cpp index cd2aa0c..aae7007 100644 --- a/tests/administration_validation_tests.cpp +++ b/tests/administration_validation_tests.cpp @@ -148,10 +148,10 @@ contact _create_test_contact() { contact p1 = administration::contact_create_empty(); strops::copy(p1.name, "John Johnsson", sizeof(p1.name)); - strops::copy(p1.address.address1, "Address 1", sizeof(p1.address.address1)); - strops::copy(p1.address.country_code, "FR", sizeof(p1.address.country_code)); - strops::copy(p1.address.city, "Paris", sizeof(p1.address.city)); - strops::copy(p1.address.postal, "12345", sizeof(p1.address.postal)); + strops::copy(p1.addr.address1, "Address 1", sizeof(p1.addr.address1)); + strops::copy(p1.addr.country_code, "FR", sizeof(p1.addr.country_code)); + strops::copy(p1.addr.city, "Paris", sizeof(p1.addr.city)); + strops::copy(p1.addr.postal, "12345", sizeof(p1.addr.postal)); strops::copy(p1.email, "test@test.com", sizeof(p1.email)); p1.type = contact_type::CONTACT_CONSUMER; return p1; @@ -166,13 +166,13 @@ TEST _administration_validate_contact_add(void) strops::copy(p1.name, "", sizeof(p1.name)); ASSERT_EQ(administration::contact_add(p1), A_ERR_MISSING_NAME); - strops::copy(p1.address.address1, "", sizeof(p1.address.address1)); + strops::copy(p1.addr.address1, "", sizeof(p1.addr.address1)); ASSERT_EQ(administration::contact_add(p1), A_ERR_MISSING_NAME|A_ERR_MISSING_ADDRESS1); - strops::copy(p1.address.city, "", sizeof(p1.address.city)); + strops::copy(p1.addr.city, "", sizeof(p1.addr.city)); ASSERT_EQ(administration::contact_add(p1), A_ERR_MISSING_NAME|A_ERR_MISSING_ADDRESS1|A_ERR_MISSING_CITY); - strops::copy(p1.address.postal, "", sizeof(p1.address.postal)); + strops::copy(p1.addr.postal, "", sizeof(p1.addr.postal)); ASSERT_EQ(administration::contact_add(p1), A_ERR_MISSING_NAME|A_ERR_MISSING_ADDRESS1|A_ERR_MISSING_CITY|A_ERR_MISSING_POSTAL); - strops::copy(p1.address.country_code, "", sizeof(p1.address.country_code)); + strops::copy(p1.addr.country_code, "", sizeof(p1.addr.country_code)); ASSERT_EQ(administration::contact_add(p1), A_ERR_MISSING_NAME|A_ERR_MISSING_ADDRESS1|A_ERR_MISSING_CITY|A_ERR_MISSING_POSTAL|A_ERR_MISSING_COUNTRYCODE); p1.type = contact_type::CONTACT_BUSINESS; @@ -192,13 +192,13 @@ TEST _administration_validate_contact_update(void) strops::copy(p1.name, "", sizeof(p1.name)); ASSERT_EQ(administration::contact_update(p1), A_ERR_MISSING_NAME); - strops::copy(p1.address.address1, "", sizeof(p1.address.address1)); + strops::copy(p1.addr.address1, "", sizeof(p1.addr.address1)); ASSERT_EQ(administration::contact_update(p1), A_ERR_MISSING_NAME|A_ERR_MISSING_ADDRESS1); - strops::copy(p1.address.city, "", sizeof(p1.address.city)); + strops::copy(p1.addr.city, "", sizeof(p1.addr.city)); ASSERT_EQ(administration::contact_update(p1), A_ERR_MISSING_NAME|A_ERR_MISSING_ADDRESS1|A_ERR_MISSING_CITY); - strops::copy(p1.address.postal, "", sizeof(p1.address.postal)); + strops::copy(p1.addr.postal, "", sizeof(p1.addr.postal)); ASSERT_EQ(administration::contact_update(p1), A_ERR_MISSING_NAME|A_ERR_MISSING_ADDRESS1|A_ERR_MISSING_CITY|A_ERR_MISSING_POSTAL); - strops::copy(p1.address.country_code, "", sizeof(p1.address.country_code)); + strops::copy(p1.addr.country_code, "", sizeof(p1.addr.country_code)); ASSERT_EQ(administration::contact_update(p1), A_ERR_MISSING_NAME|A_ERR_MISSING_ADDRESS1|A_ERR_MISSING_CITY|A_ERR_MISSING_POSTAL|A_ERR_MISSING_COUNTRYCODE); p1.type = contact_type::CONTACT_BUSINESS; @@ -207,10 +207,10 @@ TEST _administration_validate_contact_update(void) strops::copy(p1.id, "-1", sizeof(p1.id)); strops::copy(p1.name, "John Johnsson", sizeof(p1.name)); - strops::copy(p1.address.address1, "Address 1", sizeof(p1.address.address1)); - strops::copy(p1.address.country_code, "FR", sizeof(p1.address.country_code)); - strops::copy(p1.address.city, "Paris", sizeof(p1.address.city)); - strops::copy(p1.address.postal, "12345", sizeof(p1.address.postal)); + strops::copy(p1.addr.address1, "Address 1", sizeof(p1.addr.address1)); + strops::copy(p1.addr.country_code, "FR", sizeof(p1.addr.country_code)); + strops::copy(p1.addr.city, "Paris", sizeof(p1.addr.city)); + strops::copy(p1.addr.postal, "12345", sizeof(p1.addr.postal)); p1.type = contact_type::CONTACT_CONSUMER; ASSERT_EQ(administration::contact_update(p1), A_ERR_NOT_FOUND); @@ -243,13 +243,13 @@ TEST _administration_validate_contact_isvalid(void) strops::copy(p1.name, "", sizeof(p1.name)); ASSERT_EQ(administration::contact_is_valid(p1), A_ERR_MISSING_NAME); - strops::copy(p1.address.address1, "", sizeof(p1.address.address1)); + strops::copy(p1.addr.address1, "", sizeof(p1.addr.address1)); ASSERT_EQ(administration::contact_is_valid(p1), A_ERR_MISSING_NAME|A_ERR_MISSING_ADDRESS1); - strops::copy(p1.address.city, "", sizeof(p1.address.city)); + strops::copy(p1.addr.city, "", sizeof(p1.addr.city)); ASSERT_EQ(administration::contact_is_valid(p1), A_ERR_MISSING_NAME|A_ERR_MISSING_ADDRESS1|A_ERR_MISSING_CITY); - strops::copy(p1.address.postal, "", sizeof(p1.address.postal)); + strops::copy(p1.addr.postal, "", sizeof(p1.addr.postal)); ASSERT_EQ(administration::contact_is_valid(p1), A_ERR_MISSING_NAME|A_ERR_MISSING_ADDRESS1|A_ERR_MISSING_CITY|A_ERR_MISSING_POSTAL); - strops::copy(p1.address.country_code, "", sizeof(p1.address.country_code)); + strops::copy(p1.addr.country_code, "", sizeof(p1.addr.country_code)); ASSERT_EQ(administration::contact_is_valid(p1), A_ERR_MISSING_NAME|A_ERR_MISSING_ADDRESS1|A_ERR_MISSING_CITY|A_ERR_MISSING_POSTAL|A_ERR_MISSING_COUNTRYCODE); p1.type = contact_type::CONTACT_BUSINESS; |
