|
|
@ -3,9 +3,11 @@
|
|
|
|
declare(strict_types=1);
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
|
|
use mirzaev\baza\database,
|
|
|
|
use mirzaev\baza\database,
|
|
|
|
|
|
|
|
mirzaev\baza\core,
|
|
|
|
mirzaev\baza\record,
|
|
|
|
mirzaev\baza\record,
|
|
|
|
mirzaev\baza\column,
|
|
|
|
mirzaev\baza\column,
|
|
|
|
mirzaev\baza\enumerations\encoding,
|
|
|
|
mirzaev\baza\enumerations\encoding,
|
|
|
|
|
|
|
|
mirzaev\baza\enumerations\architecture,
|
|
|
|
mirzaev\baza\enumerations\type;
|
|
|
|
mirzaev\baza\enumerations\type;
|
|
|
|
|
|
|
|
|
|
|
|
// Initializing path to the composer loader file (main project)
|
|
|
|
// Initializing path to the composer loader file (main project)
|
|
|
@ -34,6 +36,9 @@ require($autoload);
|
|
|
|
// Initializing path to the database file
|
|
|
|
// Initializing path to the database file
|
|
|
|
$file = __DIR__ . DIRECTORY_SEPARATOR . 'temporary' . DIRECTORY_SEPARATOR . 'database.baza';
|
|
|
|
$file = __DIR__ . DIRECTORY_SEPARATOR . 'temporary' . DIRECTORY_SEPARATOR . 'database.baza';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Initilized architecture runtime constant
|
|
|
|
|
|
|
|
define('ARCHITECTURE', core::architecture());
|
|
|
|
|
|
|
|
|
|
|
|
echo "Started testing\n\n\n";
|
|
|
|
echo "Started testing\n\n\n";
|
|
|
|
|
|
|
|
|
|
|
|
// Initializing the counter of actions
|
|
|
|
// Initializing the counter of actions
|
|
|
@ -53,7 +58,7 @@ if (!file_exists($file) || unlink($file)) {
|
|
|
|
|
|
|
|
|
|
|
|
// Initializing the test database
|
|
|
|
// Initializing the test database
|
|
|
|
/* $database = new database() */
|
|
|
|
/* $database = new database() */
|
|
|
|
if (PHP_INT_SIZE === 8) {
|
|
|
|
if (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
$database = (new database())
|
|
|
|
$database = (new database())
|
|
|
|
->encoding(encoding::utf8)
|
|
|
|
->encoding(encoding::utf8)
|
|
|
|
->columns(
|
|
|
|
->columns(
|
|
|
@ -84,7 +89,7 @@ if (PHP_INT_SIZE === 8) {
|
|
|
|
echo '[' . ++$action . "] Initialized the database\n";
|
|
|
|
echo '[' . ++$action . "] Initialized the database\n";
|
|
|
|
|
|
|
|
|
|
|
|
// Initializing the record
|
|
|
|
// Initializing the record
|
|
|
|
if (ARCH === 64) {
|
|
|
|
if (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
$record = $database->record(
|
|
|
|
$record = $database->record(
|
|
|
|
'Arsen',
|
|
|
|
'Arsen',
|
|
|
|
'Mirzaev',
|
|
|
|
'Mirzaev',
|
|
|
@ -114,7 +119,7 @@ echo '[' . ++$action . '][' . ++$test . '][' . ($record->name === 'Arsen' ? 'SUC
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record->second_name === 'Mirzaev' ? 'SUCCESS' : 'FAIL') . "][\"second_name\"] Expected: \"Mirzaev\" (string). Actual: \"$record->second_name\" (" . gettype($record->second_name) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record->second_name === 'Mirzaev' ? 'SUCCESS' : 'FAIL') . "][\"second_name\"] Expected: \"Mirzaev\" (string). Actual: \"$record->second_name\" (" . gettype($record->second_name) . ")\n";
|
|
|
|
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 (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
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->neuron_count === 91000000000 ? 'SUCCESS' : 'FAIL') . "][\"neuron_count\"] Expected: \"91000000000\" (integer). Actual: \"$record->neuron_count\" (" . gettype($record->neuron_count) . ")\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->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";
|
|
|
@ -132,7 +137,7 @@ $database->write($record);
|
|
|
|
echo '[' . ++$action . "] Writed the record into the database\n";
|
|
|
|
echo '[' . ++$action . "] Writed the record into the database\n";
|
|
|
|
|
|
|
|
|
|
|
|
// Initializing the second record
|
|
|
|
// Initializing the second record
|
|
|
|
if (ARCH === 64) {
|
|
|
|
if (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
$record_ivan = $database->record(
|
|
|
|
$record_ivan = $database->record(
|
|
|
|
'Ivan',
|
|
|
|
'Ivan',
|
|
|
|
'Ivanov',
|
|
|
|
'Ivanov',
|
|
|
@ -161,7 +166,7 @@ $database->write($record_ivan);
|
|
|
|
echo '[' . ++$action . "] Writed the record into the database\n";
|
|
|
|
echo '[' . ++$action . "] Writed the record into the database\n";
|
|
|
|
|
|
|
|
|
|
|
|
// Initializing the second record
|
|
|
|
// Initializing the second record
|
|
|
|
if (ARCH === 64) {
|
|
|
|
if (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
$record_margarita = $database->record(
|
|
|
|
$record_margarita = $database->record(
|
|
|
|
'Margarita',
|
|
|
|
'Margarita',
|
|
|
|
'Esenina',
|
|
|
|
'Esenina',
|
|
|
@ -199,7 +204,7 @@ try {
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (count($records_readed_all) === 3 ? 'SUCCESS' : 'FAIL') . '][amount of readed records] Expected: 3 records. Actual: ' . count($records_readed_all) . " records\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (count($records_readed_all) === 3 ? 'SUCCESS' : 'FAIL') . '][amount of readed records] Expected: 3 records. Actual: ' . count($records_readed_all) . " records\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (gettype($records_readed_all[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of readed values] Expected: "object". Actual: "' . gettype($records_readed_all[0]) . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (gettype($records_readed_all[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of readed values] Expected: "object". Actual: "' . gettype($records_readed_all[0]) . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_all[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $records_readed_all[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_all[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $records_readed_all[0]::class . "\"\n";
|
|
|
|
if (ARCH === 64) {
|
|
|
|
if (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_all[0]->neuron_count === 91000000000 ? 'SUCCESS' : 'FAIL') . ']["neuron_count"] Expected: "91000000000" (integer). Actual: "' . $records_readed_all[0]->neuron_count . '" (' . gettype($records_readed_all[0]->neuron_count) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_all[0]->neuron_count === 91000000000 ? 'SUCCESS' : 'FAIL') . ']["neuron_count"] Expected: "91000000000" (integer). Actual: "' . $records_readed_all[0]->neuron_count . '" (' . gettype($records_readed_all[0]->neuron_count) . ")\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -222,7 +227,7 @@ try {
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (gettype($record_readed_first[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of readed values] Expected: "object". Actual: "' . gettype($record_readed_first[0]) . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (gettype($record_readed_first[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of readed values] Expected: "object". Actual: "' . gettype($record_readed_first[0]) . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_first[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $record_readed_first[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_first[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $record_readed_first[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_first[0]->second_name === 'Mirzaev' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Mirzaev" (string). Actual: "' . $record_readed_first[0]->second_name . '" (' . gettype($record_readed_first[0]->second_name) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_first[0]->second_name === 'Mirzaev' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Mirzaev" (string). Actual: "' . $record_readed_first[0]->second_name . '" (' . gettype($record_readed_first[0]->second_name) . ")\n";
|
|
|
|
if (ARCH === 64) {
|
|
|
|
if (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_first[0]->neuron_count === 91000000000 ? 'SUCCESS' : 'FAIL') . ']["neuron_count"] Expected: "91000000000" (integer). Actual: "' . $record_readed_first[0]->neuron_count . '" (' . gettype($record_readed_first[0]->neuron_count) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_first[0]->neuron_count === 91000000000 ? 'SUCCESS' : 'FAIL') . ']["neuron_count"] Expected: "91000000000" (integer). Actual: "' . $record_readed_first[0]->neuron_count . '" (' . gettype($record_readed_first[0]->neuron_count) . ")\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -245,9 +250,9 @@ try {
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (gettype($record_readed_second[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of readed values] Expected: "object". Actual: "' . gettype($record_readed_second[0]) . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (gettype($record_readed_second[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of readed values] Expected: "object". Actual: "' . gettype($record_readed_second[0]) . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_second[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $record_readed_second[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_second[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $record_readed_second[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_second[0]->second_name === 'Ivanov' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Ivanov" (string). Actual: "' . $record_readed_second[0]->second_name . '" (' . gettype($record_readed_second[0]->second_name) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_second[0]->second_name === 'Ivanov' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Ivanov" (string). Actual: "' . $record_readed_second[0]->second_name . '" (' . gettype($record_readed_second[0]->second_name) . ")\n";
|
|
|
|
if (ARCH === 64) {
|
|
|
|
if (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Due to IEEE 754 double precision format double equility is problematic
|
|
|
|
* Due to IEEE 754 double precision format double equality is problematic
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
|
|
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -274,9 +279,9 @@ try {
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (gettype($record_readed_filter[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of readed values] Expected: "object". Actual: "' . gettype($record_readed_filter[0]) . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (gettype($record_readed_filter[0]) === 'object' ? 'SUCCESS' : 'FAIL') . '][type of readed values] Expected: "object". Actual: "' . gettype($record_readed_filter[0]) . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_filter[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $record_readed_filter[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_filter[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $record_readed_filter[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_filter[0]->second_name === 'Ivanov' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Ivanov" (string). Actual: "' . $record_readed_filter[0]->second_name . '" (' . gettype($record_readed_filter[0]->second_name) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($record_readed_filter[0]->second_name === 'Ivanov' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Ivanov" (string). Actual: "' . $record_readed_filter[0]->second_name . '" (' . gettype($record_readed_filter[0]->second_name) . ")\n";
|
|
|
|
if (ARCH === 64) {
|
|
|
|
if (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Due to IEEE 754 double precision format double equility is problematic
|
|
|
|
* Due to IEEE 754 double precision format double equality is problematic
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
|
|
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -304,9 +309,9 @@ try {
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_amount[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $records_readed_filter_amount[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_amount[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $records_readed_filter_amount[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_amount[0]->age === 24 ? 'SUCCESS' : 'FAIL') . ']["age"] Expected: "24" (integer). Actual: "' . $records_readed_filter_amount[0]->age . '" (' . gettype($records_readed_filter_amount[0]->age) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_amount[0]->age === 24 ? 'SUCCESS' : 'FAIL') . ']["age"] Expected: "24" (integer). Actual: "' . $records_readed_filter_amount[0]->age . '" (' . gettype($records_readed_filter_amount[0]->age) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_amount[0]->second_name === 'Mirzaev' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Mirzaev" (string). Actual: "' . $records_readed_filter_amount[0]->second_name . '" (' . gettype($records_readed_filter_amount[0]->second_name) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_amount[0]->second_name === 'Mirzaev' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Mirzaev" (string). Actual: "' . $records_readed_filter_amount[0]->second_name . '" (' . gettype($records_readed_filter_amount[0]->second_name) . ")\n";
|
|
|
|
if (ARCH === 64) {
|
|
|
|
if (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Due to IEEE 754 double precision format double equility is problematic
|
|
|
|
* Due to IEEE 754 double precision format double equality is problematic
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
|
|
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -334,9 +339,9 @@ try {
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_amount_offset[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $records_readed_filter_amount_offset[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_amount_offset[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $records_readed_filter_amount_offset[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_amount_offset[0]->age === 24 ? 'SUCCESS' : 'FAIL') . ']["age"] Expected: "24" (integer). Actual: "' . $records_readed_filter_amount_offset[0]->age . '" (' . gettype($records_readed_filter_amount_offset[0]->age) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_amount_offset[0]->age === 24 ? 'SUCCESS' : 'FAIL') . ']["age"] Expected: "24" (integer). Actual: "' . $records_readed_filter_amount_offset[0]->age . '" (' . gettype($records_readed_filter_amount_offset[0]->age) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_amount_offset[0]->second_name === 'Ivanov' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Ivanov" (string). Actual: "' . $records_readed_filter_amount_offset[0]->second_name . '" (' . gettype($records_readed_filter_amount_offset[0]->second_name) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_amount_offset[0]->second_name === 'Ivanov' ? 'SUCCESS' : 'FAIL') . ']["second_name"] Expected: "Ivanov" (string). Actual: "' . $records_readed_filter_amount_offset[0]->second_name . '" (' . gettype($records_readed_filter_amount_offset[0]->second_name) . ")\n";
|
|
|
|
if (ARCH === 64) {
|
|
|
|
if (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Due to IEEE 754 double precision format double equility is problematic
|
|
|
|
* Due to IEEE 754 double precision format double equality is problematic
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
|
|
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -369,9 +374,9 @@ try {
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_delete[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $records_readed_filter_delete[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_delete[0] instanceof record ? 'SUCCESS' : 'FAIL') . '][class of readed object values] Expected: "' . record::class . '". Actual: "' . $records_readed_filter_delete[0]::class . "\"\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_delete[0]->name === 'Ivan' ? 'SUCCESS' : 'FAIL') . ']["name"] Expected: "Ivan" (string). Actual: "' . $records_readed_filter_delete[0]->second_name . '" (' . gettype($records_readed_filter_delete[0]->second_name) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_delete[0]->name === 'Ivan' ? 'SUCCESS' : 'FAIL') . ']["name"] Expected: "Ivan" (string). Actual: "' . $records_readed_filter_delete[0]->second_name . '" (' . gettype($records_readed_filter_delete[0]->second_name) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (count($records_readed_filter_delete_readed) === 2 ? 'SUCCESS' : 'FAIL') . '][amount of readed records after deleting] Expected: 2 records. Actual: ' . count($records_readed_filter_delete_readed) . " records\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (count($records_readed_filter_delete_readed) === 2 ? 'SUCCESS' : 'FAIL') . '][amount of readed records after deleting] Expected: 2 records. Actual: ' . count($records_readed_filter_delete_readed) . " records\n";
|
|
|
|
if (ARCH === 64) {
|
|
|
|
if (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Due to IEEE 754 double precision format double equility is problematic
|
|
|
|
* Due to IEEE 754 double precision format double equality is problematic
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
|
|
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -405,9 +410,9 @@ try {
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_update[0]->height === 165.5 ? 'SUCCESS' : 'FAIL') . ']["height"] Expected: "165.5" (double). Actual: "' . $records_readed_filter_update[0]->height . '" (' . gettype($records_readed_filter_update[0]->height) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_update[0]->height === 165.5 ? 'SUCCESS' : 'FAIL') . ']["height"] Expected: "165.5" (double). Actual: "' . $records_readed_filter_update[0]->height . '" (' . gettype($records_readed_filter_update[0]->height) . ")\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (count($records_readed_filter_update_readed) === 2 ? 'SUCCESS' : 'FAIL') . '][amount of readed records after updating] Expected: 2 records. Actual: ' . count($records_readed_filter_update_readed) . " records\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . (count($records_readed_filter_update_readed) === 2 ? 'SUCCESS' : 'FAIL') . '][amount of readed records after updating] Expected: 2 records. Actual: ' . count($records_readed_filter_update_readed) . " records\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_update_readed[1]->height === $records_readed_filter_update[0]->height ? 'SUCCESS' : 'FAIL') . "] Height from `update` process response matched height from the `read` preocess response\n";
|
|
|
|
echo '[' . $action . '][' . ++$test . '][' . ($records_readed_filter_update_readed[1]->height === $records_readed_filter_update[0]->height ? 'SUCCESS' : 'FAIL') . "] Height from `update` process response matched height from the `read` preocess response\n";
|
|
|
|
if (ARCH === 64) {
|
|
|
|
if (ARCHITECTURE === architecture::x86_64) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Due to IEEE 754 double precision format double equility is problematic
|
|
|
|
* Due to IEEE 754 double precision format double equality is problematic
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
|
|
|
* @see https://www.php.net/manual/en/language.types.float.php#113703
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|