forked from mirzaev/baza
add more coverage
This commit is contained in:
parent
13b27b3fac
commit
f87475779a
|
@ -63,7 +63,7 @@ if (PHP_INT_SIZE === 8) {
|
||||||
new column('height', type::float),
|
new column('height', type::float),
|
||||||
// 64-bit values test
|
// 64-bit values test
|
||||||
new column('neuron_count', type::integer_unsigned),
|
new column('neuron_count', type::integer_unsigned),
|
||||||
new column('ambition_level', type::double),
|
new column('motivation', type::double),
|
||||||
new column('reputation', type::integer),
|
new column('reputation', type::integer),
|
||||||
new column('active', type::char)
|
new column('active', type::char)
|
||||||
)
|
)
|
||||||
|
@ -115,8 +115,8 @@ echo '[' . $action . '][' . ++$test . '][' . ($record->second_name === 'Mirzaev'
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($record->age === 24 ? 'SUCCESS' : 'FAIL') . "][\"age\"] Expected: \"24\" (integer). Actual: \"$record->age\" (" . gettype($record->age) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($record->age === 24 ? 'SUCCESS' : 'FAIL') . "][\"age\"] Expected: \"24\" (integer). Actual: \"$record->age\" (" . gettype($record->age) . ")\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($record->height === 165.5 ? 'SUCCESS' : 'FAIL') . "][\"height\"] Expected: \"165.5\" (double). Actual: \"$record->height\" (" . gettype($record->height) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($record->height === 165.5 ? 'SUCCESS' : 'FAIL') . "][\"height\"] Expected: \"165.5\" (double). Actual: \"$record->height\" (" . gettype($record->height) . ")\n";
|
||||||
if (ARCH === 64) {
|
if (ARCH === 64) {
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($record->neuron_count === 91000000000 ? 'SUCCESS' : 'FAIL') . "][\"neuron_count\"] Expected: \"91000000000\" (integer_unsigned). Actual: \"$record->neuron_count\" (" . gettype($record->neuron_count) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($record->neuron_count === 91000000000 ? 'SUCCESS' : 'FAIL') . "][\"neuron_count\"] Expected: \"91000000000\" (integer). Actual: \"$record->neuron_count\" (" . gettype($record->neuron_count) . ")\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($record->ambition_level === 1.7976931348623E+238 ? 'SUCCESS' : 'FAIL') . "][\"ambition_level\"] Expected: \"1.7976931348623E+238\" (double). Actual: \"$record->ambition_level\" (" . gettype($record->ambition_level) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($record->motivation === 1.7976931348623E+238 ? 'SUCCESS' : 'FAIL') . "][\"motivation\"] Expected: \"1.7976931348623E+238\" (double). Actual: \"$record->motivation\" (" . gettype($record->motivation) . ")\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($record->reputation === 7355608 ? 'SUCCESS' : 'FAIL') . "][\"reputation\"] Expected: \"7355608\" (integer). Actual: \"$record->reputation\" (" . gettype($record->reputation) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($record->reputation === 7355608 ? 'SUCCESS' : 'FAIL') . "][\"reputation\"] Expected: \"7355608\" (integer). Actual: \"$record->reputation\" (" . gettype($record->reputation) . ")\n";
|
||||||
}
|
}
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($record->active === 1 ? 'SUCCESS' : 'FAIL') . "][\"active\"] Expected: \"1\" (integer). Actual: \"$record->active\" (" . gettype($record->active) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($record->active === 1 ? 'SUCCESS' : 'FAIL') . "][\"active\"] Expected: \"1\" (integer). Actual: \"$record->active\" (" . gettype($record->active) . ")\n";
|
||||||
|
@ -199,6 +199,9 @@ try {
|
||||||
echo '[' . $action . '][' . ++$test . '][' . (count($records_read_all) === 3 ? 'SUCCESS' : 'FAIL') . '][amount of read records] Expected: 3 records. Actual: ' . count($records_read_all) . " records\n";
|
echo '[' . $action . '][' . ++$test . '][' . (count($records_read_all) === 3 ? 'SUCCESS' : 'FAIL') . '][amount of read records] Expected: 3 records. Actual: ' . count($records_read_all) . " records\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . (gettype($records_read_all[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of read values] Expected: "object". Actual: "' . gettype($records_read_all[0]) . "\"\n";
|
echo '[' . $action . '][' . ++$test . '][' . (gettype($records_read_all[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of read values] Expected: "object". Actual: "' . gettype($records_read_all[0]) . "\"\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($records_read_all[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $records_read_all[0]::class . "\"\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($records_read_all[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $records_read_all[0]::class . "\"\n";
|
||||||
|
if (ARCH === 64) {
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . ($records_read_all[0]->neuron_count === 91000000000 ? 'SUCCESS' : 'FAIL') . ']["neuron_count"] Expected: "91000000000" (integer). Actual: "' . $records_read_all[0]->neuron_count . '" (' . gettype($records_read_all[0]->neuron_count) . ")\n";
|
||||||
|
}
|
||||||
|
|
||||||
echo '[' . $action . "] The read all records checks have been completed\n";
|
echo '[' . $action . "] The read all records checks have been completed\n";
|
||||||
} catch (exception $e) {
|
} catch (exception $e) {
|
||||||
|
@ -219,6 +222,9 @@ try {
|
||||||
echo '[' . $action . '][' . ++$test . '][' . (gettype($record_read_first[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of read values] Expected: "object". Actual: "' . gettype($record_read_first[0]) . "\"\n";
|
echo '[' . $action . '][' . ++$test . '][' . (gettype($record_read_first[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of read values] Expected: "object". Actual: "' . gettype($record_read_first[0]) . "\"\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($record_read_first[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $record_read_first[0]::class . "\"\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_first[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $record_read_first[0]::class . "\"\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($record_read_first[0]->second_name === 'Mirzaev' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Mirzaev" (string). Actual: "' . $record_read_first[0]->second_name . '" (' . gettype($record_read_first[0]->second_name) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_first[0]->second_name === 'Mirzaev' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Mirzaev" (string). Actual: "' . $record_read_first[0]->second_name . '" (' . gettype($record_read_first[0]->second_name) . ")\n";
|
||||||
|
if (ARCH === 64) {
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_first[0]->neuron_count === 91000000000 ? 'SUCCESS' : 'FAIL') . ']["neuron_count"] Expected: "91000000000" (integer). Actual: "' . $record_read_first[0]->neuron_count . '" (' . gettype($record_read_first[0]->neuron_count) . ")\n";
|
||||||
|
}
|
||||||
|
|
||||||
echo '[' . $action . "] The read first record checks have been completed\n";
|
echo '[' . $action . "] The read first record checks have been completed\n";
|
||||||
} catch (exception $e) {
|
} catch (exception $e) {
|
||||||
|
@ -239,6 +245,15 @@ try {
|
||||||
echo '[' . $action . '][' . ++$test . '][' . (gettype($record_read_second[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of read values] Expected: "object". Actual: "' . gettype($record_read_second[0]) . "\"\n";
|
echo '[' . $action . '][' . ++$test . '][' . (gettype($record_read_second[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of read values] Expected: "object". Actual: "' . gettype($record_read_second[0]) . "\"\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($record_read_second[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $record_read_second[0]::class . "\"\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_second[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $record_read_second[0]::class . "\"\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($record_read_second[0]->second_name === 'Ivanov' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Ivanov" (string). Actual: "' . $record_read_second[0]->second_name . '" (' . gettype($record_read_second[0]->second_name) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_second[0]->second_name === 'Ivanov' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Ivanov" (string). Actual: "' . $record_read_second[0]->second_name . '" (' . gettype($record_read_second[0]->second_name) . ")\n";
|
||||||
|
if (ARCH === 64) {
|
||||||
|
/**
|
||||||
|
* Due to IEEE 754 double precision format double equility is problematic
|
||||||
|
*
|
||||||
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
||||||
|
*/
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . (round($record_read_second[0]->motivation, 2) === round(2.2250738585072E-308, 2) ? 'SUCCESS' : 'FAIL') . ']["motivation"] Expected: "2.2250738585072E-308" (double). Actual: "' . $record_read_second[0]->motivation . '" (' . gettype($record_read_second[0]->motivation) . ")\n";
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_second[0]->reputation === (int) -9223372036854775808 ? 'SUCCESS' : 'FAIL') . ']["reputation"] Expected: "-9223372036854775808" (integer). Actual: "' . $record_read_second[0]->reputation . '" (' . gettype($record_read_second[0]->reputation) . ")\n";
|
||||||
|
}
|
||||||
|
|
||||||
echo '[' . $action . "] The read second record checks have been completed\n";
|
echo '[' . $action . "] The read second record checks have been completed\n";
|
||||||
} catch (exception $e) {
|
} catch (exception $e) {
|
||||||
|
@ -259,6 +274,15 @@ try {
|
||||||
echo '[' . $action . '][' . ++$test . '][' . (gettype($record_read_filter[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of read values] Expected: "object". Actual: "' . gettype($record_read_filter[0]) . "\"\n";
|
echo '[' . $action . '][' . ++$test . '][' . (gettype($record_read_filter[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of read values] Expected: "object". Actual: "' . gettype($record_read_filter[0]) . "\"\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($record_read_filter[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $record_read_filter[0]::class . "\"\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_filter[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $record_read_filter[0]::class . "\"\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($record_read_filter[0]->second_name === 'Ivanov' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Ivanov" (string). Actual: "' . $record_read_filter[0]->second_name . '" (' . gettype($record_read_filter[0]->second_name) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_filter[0]->second_name === 'Ivanov' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Ivanov" (string). Actual: "' . $record_read_filter[0]->second_name . '" (' . gettype($record_read_filter[0]->second_name) . ")\n";
|
||||||
|
if (ARCH === 64) {
|
||||||
|
/**
|
||||||
|
* Due to IEEE 754 double precision format double equility is problematic
|
||||||
|
*
|
||||||
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
||||||
|
*/
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . (round($record_read_second[0]->motivation, 2) === round(2.2250738585072E-308, 2) ? 'SUCCESS' : 'FAIL') . ']["motivation"] Expected: "2.2250738585072E-308" (double). Actual: "' . $record_read_second[0]->motivation . '" (' . gettype($record_read_second[0]->motivation) . ")\n";
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_second[0]->reputation === (int) -9223372036854775808 ? 'SUCCESS' : 'FAIL') . ']["reputation"] Expected: "-9223372036854775808" (integer). Actual: "' . $record_read_second[0]->reputation . '" (' . gettype($record_read_second[0]->reputation) . ")\n";
|
||||||
|
}
|
||||||
|
|
||||||
echo '[' . $action . "] The read record by filter checks have been completed\n";
|
echo '[' . $action . "] The read record by filter checks have been completed\n";
|
||||||
} catch (exception $e) {
|
} catch (exception $e) {
|
||||||
|
@ -280,6 +304,15 @@ try {
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_amount[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $records_read_filter_amount[0]::class . "\"\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_amount[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $records_read_filter_amount[0]::class . "\"\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_amount[0]->age === 24 ? 'SUCCESS' : 'FAIL') . ']["age"] Expected: "24" (integer). Actual: "' . $records_read_filter_amount[0]->age . '" (' . gettype($records_read_filter_amount[0]->age) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_amount[0]->age === 24 ? 'SUCCESS' : 'FAIL') . ']["age"] Expected: "24" (integer). Actual: "' . $records_read_filter_amount[0]->age . '" (' . gettype($records_read_filter_amount[0]->age) . ")\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_amount[0]->second_name === 'Mirzaev' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Mirzaev" (string). Actual: "' . $records_read_filter_amount[0]->second_name . '" (' . gettype($records_read_filter_amount[0]->second_name) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_amount[0]->second_name === 'Mirzaev' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Mirzaev" (string). Actual: "' . $records_read_filter_amount[0]->second_name . '" (' . gettype($records_read_filter_amount[0]->second_name) . ")\n";
|
||||||
|
if (ARCH === 64) {
|
||||||
|
/**
|
||||||
|
* Due to IEEE 754 double precision format double equility is problematic
|
||||||
|
*
|
||||||
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
||||||
|
*/
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . (round($record_read_second[0]->motivation, 2) === round(2.2250738585072E-308, 2) ? 'SUCCESS' : 'FAIL') . ']["motivation"] Expected: "2.2250738585072E-308" (double). Actual: "' . $record_read_second[0]->motivation . '" (' . gettype($record_read_second[0]->motivation) . ")\n";
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_second[0]->reputation === (int) -9223372036854775808 ? 'SUCCESS' : 'FAIL') . ']["reputation"] Expected: "-9223372036854775808" (integer). Actual: "' . $record_read_second[0]->reputation . '" (' . gettype($record_read_second[0]->reputation) . ")\n";
|
||||||
|
}
|
||||||
|
|
||||||
echo '[' . $action . "] The read record by filter with amount limit checks have been completed\n";
|
echo '[' . $action . "] The read record by filter with amount limit checks have been completed\n";
|
||||||
} catch (exception $e) {
|
} catch (exception $e) {
|
||||||
|
@ -301,6 +334,15 @@ try {
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_amount_offset[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $records_read_filter_amount_offset[0]::class . "\"\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_amount_offset[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $records_read_filter_amount_offset[0]::class . "\"\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_amount_offset[0]->age === 24 ? 'SUCCESS' : 'FAIL') . ']["age"] Expected: "24" (integer). Actual: "' . $records_read_filter_amount_offset[0]->age . '" (' . gettype($records_read_filter_amount_offset[0]->age) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_amount_offset[0]->age === 24 ? 'SUCCESS' : 'FAIL') . ']["age"] Expected: "24" (integer). Actual: "' . $records_read_filter_amount_offset[0]->age . '" (' . gettype($records_read_filter_amount_offset[0]->age) . ")\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_amount_offset[0]->second_name === 'Ivanov' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Ivanov" (string). Actual: "' . $records_read_filter_amount_offset[0]->second_name . '" (' . gettype($records_read_filter_amount_offset[0]->second_name) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_amount_offset[0]->second_name === 'Ivanov' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Ivanov" (string). Actual: "' . $records_read_filter_amount_offset[0]->second_name . '" (' . gettype($records_read_filter_amount_offset[0]->second_name) . ")\n";
|
||||||
|
if (ARCH === 64) {
|
||||||
|
/**
|
||||||
|
* Due to IEEE 754 double precision format double equility is problematic
|
||||||
|
*
|
||||||
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
||||||
|
*/
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . (round($record_read_second[0]->motivation, 2) === round(2.2250738585072E-308, 2) ? 'SUCCESS' : 'FAIL') . ']["motivation"] Expected: "2.2250738585072E-308" (double). Actual: "' . $record_read_second[0]->motivation . '" (' . gettype($record_read_second[0]->motivation) . ")\n";
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_second[0]->reputation === (int) -9223372036854775808 ? 'SUCCESS' : 'FAIL') . ']["reputation"] Expected: "-9223372036854775808" (integer). Actual: "' . $record_read_second[0]->reputation . '" (' . gettype($record_read_second[0]->reputation) . ")\n";
|
||||||
|
}
|
||||||
|
|
||||||
echo '[' . $action . "] The read record by filter with amount limit and offset checks have been completed\n";
|
echo '[' . $action . "] The read record by filter with amount limit and offset checks have been completed\n";
|
||||||
} catch (exception $e) {
|
} catch (exception $e) {
|
||||||
|
@ -327,6 +369,15 @@ try {
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_delete[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $records_read_filter_delete[0]::class . "\"\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_delete[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of read object values] Expected: "' . record::class . '". Actual: "' . $records_read_filter_delete[0]::class . "\"\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_delete[0]->name === 'Ivan' ? 'SUCCESS' : 'FAIL') . ']["name"] Expected: "Ivan" (string). Actual: "' . $records_read_filter_delete[0]->second_name . '" (' . gettype($records_read_filter_delete[0]->second_name) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_delete[0]->name === 'Ivan' ? 'SUCCESS' : 'FAIL') . ']["name"] Expected: "Ivan" (string). Actual: "' . $records_read_filter_delete[0]->second_name . '" (' . gettype($records_read_filter_delete[0]->second_name) . ")\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . (count($records_read_filter_delete_read) === 2 ? 'SUCCESS' : 'FAIL') . '][amount of read records after deleting] Expected: 2 records. Actual: ' . count($records_read_filter_delete_read) . " records\n";
|
echo '[' . $action . '][' . ++$test . '][' . (count($records_read_filter_delete_read) === 2 ? 'SUCCESS' : 'FAIL') . '][amount of read records after deleting] Expected: 2 records. Actual: ' . count($records_read_filter_delete_read) . " records\n";
|
||||||
|
if (ARCH === 64) {
|
||||||
|
/**
|
||||||
|
* Due to IEEE 754 double precision format double equility is problematic
|
||||||
|
*
|
||||||
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
||||||
|
*/
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . (round($record_read_second[0]->motivation, 2) === round(2.2250738585072E-308, 2) ? 'SUCCESS' : 'FAIL') . ']["motivation"] Expected: "2.2250738585072E-308" (double). Actual: "' . $record_read_second[0]->motivation . '" (' . gettype($record_read_second[0]->motivation) . ")\n";
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_second[0]->reputation === (int) -9223372036854775808 ? 'SUCCESS' : 'FAIL') . ']["reputation"] Expected: "-9223372036854775808" (integer). Actual: "' . $record_read_second[0]->reputation . '" (' . gettype($record_read_second[0]->reputation) . ")\n";
|
||||||
|
}
|
||||||
|
|
||||||
echo '[' . $action . "] The deleted record by filter checks have been completed\n";
|
echo '[' . $action . "] The deleted record by filter checks have been completed\n";
|
||||||
} catch (exception $e) {
|
} catch (exception $e) {
|
||||||
|
@ -354,6 +405,15 @@ try {
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_update[0]->height === 165.5 ? 'SUCCESS' : 'FAIL') . ']["height"] Expected: "165.5" (double). Actual: "' . $records_read_filter_update[0]->height . '" (' . gettype($records_read_filter_update[0]->height) . ")\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_update[0]->height === 165.5 ? 'SUCCESS' : 'FAIL') . ']["height"] Expected: "165.5" (double). Actual: "' . $records_read_filter_update[0]->height . '" (' . gettype($records_read_filter_update[0]->height) . ")\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . (count($records_read_filter_update_read) === 2 ? 'SUCCESS' : 'FAIL') . '][amount of read records after updating] Expected: 2 records. Actual: ' . count($records_read_filter_update_read) . " records\n";
|
echo '[' . $action . '][' . ++$test . '][' . (count($records_read_filter_update_read) === 2 ? 'SUCCESS' : 'FAIL') . '][amount of read records after updating] Expected: 2 records. Actual: ' . count($records_read_filter_update_read) . " records\n";
|
||||||
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_update_read[1]->height === $records_read_filter_update[0]->height ? 'SUCCESS' : 'FAIL') . "] Height from `update` process response matched height from the `read` preocess response\n";
|
echo '[' . $action . '][' . ++$test . '][' . ($records_read_filter_update_read[1]->height === $records_read_filter_update[0]->height ? 'SUCCESS' : 'FAIL') . "] Height from `update` process response matched height from the `read` preocess response\n";
|
||||||
|
if (ARCH === 64) {
|
||||||
|
/**
|
||||||
|
* Due to IEEE 754 double precision format double equility is problematic
|
||||||
|
*
|
||||||
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
||||||
|
*/
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . (round($record_read_second[0]->motivation, 2) === round(2.2250738585072E-308, 2) ? 'SUCCESS' : 'FAIL') . ']["motivation"] Expected: "2.2250738585072E-308" (double). Actual: "' . $record_read_second[0]->motivation . '" (' . gettype($record_read_second[0]->motivation) . ")\n";
|
||||||
|
echo '[' . $action . '][' . ++$test . '][' . ($record_read_second[0]->reputation === (int) -9223372036854775808 ? 'SUCCESS' : 'FAIL') . ']["reputation"] Expected: "-9223372036854775808" (integer). Actual: "' . $record_read_second[0]->reputation . '" (' . gettype($record_read_second[0]->reputation) . ")\n";
|
||||||
|
}
|
||||||
|
|
||||||
echo '[' . $action . "] The updated record by filter checks have been completed\n";
|
echo '[' . $action . "] The updated record by filter checks have been completed\n";
|
||||||
} catch (exception $e) {
|
} catch (exception $e) {
|
||||||
|
|
Loading…
Reference in New Issue