plan
tests
=> 5;
my
$project_path
= path(
$Bin
,
'data'
,
'chapter3_null_feat'
);
my
$results_path
= path(
$project_path
,
'amcpresults'
);
unlink
$results_path
if
-e
$results_path
;
my
$am
= Algorithm::AM->new(
$project_path
,
commas
=>
'no'
,
exclude_nulls
=> 1,
);
$am
->classify();
my
$results
= read_file(
$results_path
);
like_string(
$results
,
qr/e\s+3\s+30.000%\v+r\s+7\s+70.000%/
,
'Results with exclude nulls'
)
or diag
$results
;
like_string(
$results
,
qr/Nulls: exclude/
,
'Printing with exclude nulls'
)
or diag
$results
;
unlink
$results_path
if
-e
$results_path
;
$am
->classify(
exclude_nulls
=> 0);
$results
= read_file(
$results_path
);
like_string(
$results
,
qr/r\s+5\s+100.000%/
,
'Include nulls'
)
or diag
$results
;
like_string(
$results
,
qr/Nulls: include/
,
'Printing with exclude nulls'
)
or diag
$results
;
unlink
$results_path
if
-e
$results_path
;