summaryrefslogtreecommitdiff
path: root/tests/test_helper.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-10-04 16:53:57 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-10-04 16:53:57 +0200
commitf9f1955748a3b369f0a015405af131c9b6e3285c (patch)
treec74cec6b30daccee2d1841627b3913c51fd549e3 /tests/test_helper.cpp
parent2855642dd16cea260f3b32351f0529328a0bcb15 (diff)
namespace for logger, strops, locales
Diffstat (limited to 'tests/test_helper.cpp')
-rw-r--r--tests/test_helper.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/tests/test_helper.cpp b/tests/test_helper.cpp
index aedaccc..38aa655 100644
--- a/tests/test_helper.cpp
+++ b/tests/test_helper.cpp
@@ -22,17 +22,17 @@ char* extract_dir = "build\\extracted";
static contact _create_nl_business()
{
contact pw = administration_contact_create_empty();
- strops_copy(pw.name, "Dutch Company BV", sizeof(pw.name));
- strops_copy(pw.address.address1, "Address 1", sizeof(pw.address.address1));
- strops_copy(pw.address.country_code, "NL", sizeof(pw.address.country_code));
- strops_copy(pw.address.city, "Amsterdam", sizeof(pw.address.city));
- strops_copy(pw.address.region, "Noord-Holland", sizeof(pw.address.region));
- strops_copy(pw.address.postal, "1234AA", sizeof(pw.address.postal));
- strops_copy(pw.taxid, "T123", sizeof(pw.taxid));
- strops_copy(pw.businessid, "B321", sizeof(pw.businessid));
- strops_copy(pw.email, "test@test.com", sizeof(pw.email));
- strops_copy(pw.phone_number, "+311234567", sizeof(pw.phone_number));
- strops_copy(pw.bank_account, "IBAN123456789", sizeof(pw.bank_account));
+ strops::copy(pw.name, "Dutch Company BV", sizeof(pw.name));
+ strops::copy(pw.address.address1, "Address 1", sizeof(pw.address.address1));
+ strops::copy(pw.address.country_code, "NL", sizeof(pw.address.country_code));
+ strops::copy(pw.address.city, "Amsterdam", sizeof(pw.address.city));
+ strops::copy(pw.address.region, "Noord-Holland", sizeof(pw.address.region));
+ strops::copy(pw.address.postal, "1234AA", sizeof(pw.address.postal));
+ strops::copy(pw.taxid, "T123", sizeof(pw.taxid));
+ strops::copy(pw.businessid, "B321", sizeof(pw.businessid));
+ strops::copy(pw.email, "test@test.com", sizeof(pw.email));
+ strops::copy(pw.phone_number, "+311234567", sizeof(pw.phone_number));
+ strops::copy(pw.bank_account, "IBAN123456789", sizeof(pw.bank_account));
pw.type = contact_type::CONTACT_BUSINESS;
return pw;
}
@@ -40,14 +40,14 @@ static contact _create_nl_business()
static contact _create_nl_consumer()
{
contact pw = administration_contact_create_empty();
- strops_copy(pw.name, "Piet Pinda", sizeof(pw.name));
- strops_copy(pw.address.address1, "Address 2", sizeof(pw.address.address1));
- strops_copy(pw.address.country_code, "NL", sizeof(pw.address.country_code));
- strops_copy(pw.address.city, "Maastricht", sizeof(pw.address.city));
- strops_copy(pw.address.region, "Limburg", sizeof(pw.address.region));
- strops_copy(pw.address.postal, "4321AA", sizeof(pw.address.postal));
- strops_copy(pw.email, "test@test.com", sizeof(pw.email));
- strops_copy(pw.phone_number, "+317654321", sizeof(pw.phone_number));
+ strops::copy(pw.name, "Piet Pinda", sizeof(pw.name));
+ strops::copy(pw.address.address1, "Address 2", sizeof(pw.address.address1));
+ strops::copy(pw.address.country_code, "NL", sizeof(pw.address.country_code));
+ strops::copy(pw.address.city, "Maastricht", sizeof(pw.address.city));
+ strops::copy(pw.address.region, "Limburg", sizeof(pw.address.region));
+ strops::copy(pw.address.postal, "4321AA", sizeof(pw.address.postal));
+ strops::copy(pw.email, "test@test.com", sizeof(pw.email));
+ strops::copy(pw.phone_number, "+317654321", sizeof(pw.phone_number));
pw.type = contact_type::CONTACT_CONSUMER;
return pw;
}
@@ -58,7 +58,7 @@ static billing_item _create_bi1(invoice *inv)
billing_item item = administration_billing_item_create_empty();
item.amount = 1;
item.amount_is_percentage = 0;
- strops_copy(item.description, "Shampoo", MAX_LEN_LONG_DESC);
+ strops::copy(item.description, "Shampoo", MAX_LEN_LONG_DESC);
item.net_per_item = 10.00f;
item.discount = 2.0f;
item.discount_is_percentage = 0;
@@ -67,7 +67,7 @@ static billing_item _create_bi1(invoice *inv)
char* _country_codes[2] = {inv->supplier.address.country_code, inv->customer.address.country_code};
u32 tax_rate_count = administration_tax_rate_get_by_country(buffer, 2, _country_codes);
tax_rate rand_rate = buffer[tax_rate_count-1];
- strops_copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
+ strops::copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
return item;
}
@@ -77,7 +77,7 @@ static billing_item _create_bi2(invoice *inv)
billing_item item = administration_billing_item_create_empty();
item.amount = 2;
item.amount_is_percentage = 0;
- strops_copy(item.description, "Soap", MAX_LEN_LONG_DESC);
+ strops::copy(item.description, "Soap", MAX_LEN_LONG_DESC);
item.net_per_item = 5.00f;
item.discount = 5.0f;
item.discount_is_percentage = 1;
@@ -86,7 +86,7 @@ static billing_item _create_bi2(invoice *inv)
char* _country_codes[2] = {inv->supplier.address.country_code, inv->customer.address.country_code};
u32 tax_rate_count = administration_tax_rate_get_by_country(buffer, 2, _country_codes);
tax_rate rand_rate = buffer[tax_rate_count-1];
- strops_copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
+ strops::copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
return item;
}
@@ -96,7 +96,7 @@ static billing_item _create_bi3(invoice *inv)
billing_item item = administration_billing_item_create_empty();
item.amount = 1;
item.amount_is_percentage = 0;
- strops_copy(item.description, "Guacamole", MAX_LEN_LONG_DESC);
+ strops::copy(item.description, "Guacamole", MAX_LEN_LONG_DESC);
item.net_per_item = 10.00f;
item.discount = 2.0f;
item.discount_is_percentage = 0;
@@ -105,7 +105,7 @@ static billing_item _create_bi3(invoice *inv)
char* _country_codes[2] = {inv->supplier.address.country_code, inv->customer.address.country_code};
u32 tax_rate_count = administration_tax_rate_get_by_country(buffer, 2, _country_codes);
tax_rate rand_rate = buffer[tax_rate_count-1];
- strops_copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
+ strops::copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
return item;
}
@@ -115,7 +115,7 @@ static billing_item _create_bi4(invoice *inv)
billing_item item = administration_billing_item_create_empty();
item.amount = 3;
item.amount_is_percentage = 0;
- strops_copy(item.description, "Bananas", MAX_LEN_LONG_DESC);
+ strops::copy(item.description, "Bananas", MAX_LEN_LONG_DESC);
item.net_per_item = 4.00f;
item.discount = 0.0f;
item.discount_is_percentage = 0;
@@ -124,7 +124,7 @@ static billing_item _create_bi4(invoice *inv)
char* _country_codes[2] = {inv->supplier.address.country_code, inv->customer.address.country_code};
u32 tax_rate_count = administration_tax_rate_get_by_country(buffer, 2, _country_codes);
tax_rate rand_rate = buffer[tax_rate_count-1];
- strops_copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
+ strops::copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
return item;
}
@@ -134,7 +134,7 @@ static billing_item _create_bi5(invoice *inv)
billing_item item = administration_billing_item_create_empty();
item.amount = 5;
item.amount_is_percentage = 0;
- strops_copy(item.description, "Apple", MAX_LEN_LONG_DESC);
+ strops::copy(item.description, "Apple", MAX_LEN_LONG_DESC);
item.net_per_item = 1.00f;
item.discount = 5.0f;
item.discount_is_percentage = 1;
@@ -143,7 +143,7 @@ static billing_item _create_bi5(invoice *inv)
char* _country_codes[2] = {inv->supplier.address.country_code, inv->customer.address.country_code};
u32 tax_rate_count = administration_tax_rate_get_by_country(buffer, 2, _country_codes);
tax_rate rand_rate = buffer[tax_rate_count-1];
- strops_copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
+ strops::copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
return item;
}
@@ -153,7 +153,7 @@ static billing_item _create_bi6(invoice *inv)
billing_item item = administration_billing_item_create_empty();
item.amount = 10;
item.amount_is_percentage = 1;
- strops_copy(item.description, "Tip", MAX_LEN_LONG_DESC);
+ strops::copy(item.description, "Tip", MAX_LEN_LONG_DESC);
item.net_per_item = 50.00f;
item.discount = 0.0f;
item.discount_is_percentage = 0;
@@ -162,7 +162,7 @@ static billing_item _create_bi6(invoice *inv)
char* _country_codes[2] = {inv->supplier.address.country_code, inv->customer.address.country_code};
u32 tax_rate_count = administration_tax_rate_get_by_country(buffer, 2, _country_codes);
tax_rate rand_rate = buffer[tax_rate_count-1];
- strops_copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
+ strops::copy(item.tax_rate_id, rand_rate.id, MAX_LEN_ID);
return item;
}