Add simple cascade setters tests

Esse commit está contido em:
Jakub Zelenka
2013-04-08 19:47:58 +01:00
commit 3d07aba29f
11 arquivos alterados com 154 adições e 0 exclusões
@@ -0,0 +1,14 @@
--TEST--
Test function fann_set_cascade_candidate_change_fraction() by calling it with its expected arguments
--FILE--
<?php
$ann = fann_create_standard( 3, 3, 2, 1 );
var_dump( fann_set_cascade_candidate_change_fraction( $ann, 0.02 ) );
var_dump( round( fann_get_cascade_candidate_change_fraction( $ann ), 2 ) == round( 0.02, 2 ) );
?>
--EXPECT--
bool(true)
bool(true)
@@ -0,0 +1,14 @@
--TEST--
Test function fann_set_cascade_candidate_limit() by calling it with its expected arguments
--FILE--
<?php
$ann = fann_create_standard( 3, 3, 2, 1 );
var_dump( fann_set_cascade_candidate_limit( $ann, 950 ) );
var_dump( round( fann_get_cascade_candidate_limit( $ann ), 2 ) == round( 950, 2 ) );
?>
--EXPECT--
bool(true)
bool(true)
@@ -0,0 +1,14 @@
--TEST--
Test function fann_set_cascade_candidate_stagnation_epochs() by calling it with its expected arguments
--FILE--
<?php
$ann = fann_create_standard( 3, 3, 2, 1 );
var_dump( fann_set_cascade_candidate_stagnation_epochs( $ann, 10 ) );
var_dump( fann_get_cascade_candidate_stagnation_epochs( $ann ) == 10 );
?>
--EXPECT--
bool(true)
bool(true)
@@ -0,0 +1,14 @@
--TEST--
Test function fann_set_cascade_max_cand_epochs() by calling it with its expected arguments
--FILE--
<?php
$ann = fann_create_standard( 3, 3, 2, 1 );
var_dump( fann_set_cascade_max_cand_epochs( $ann, 140 ) );
var_dump( fann_get_cascade_max_cand_epochs( $ann ) == 140 );
?>
--EXPECT--
bool(true)
bool(true)
@@ -0,0 +1,14 @@
--TEST--
Test function fann_set_cascade_max_out_epochs() by calling it with its expected arguments
--FILE--
<?php
$ann = fann_create_standard( 3, 3, 2, 1 );
var_dump( fann_set_cascade_max_out_epochs( $ann, 140 ) );
var_dump( fann_get_cascade_max_out_epochs( $ann ) == 140 );
?>
--EXPECT--
bool(true)
bool(true)
@@ -0,0 +1,14 @@
--TEST--
Test function fann_set_cascade_min_cand_epochs() by calling it with its expected arguments
--FILE--
<?php
$ann = fann_create_standard( 3, 3, 2, 1 );
var_dump( fann_set_cascade_min_cand_epochs( $ann, 60 ) );
var_dump( round( fann_get_cascade_min_cand_epochs( $ann ), 2 ) == round( 60, 2 ) );
?>
--EXPECT--
bool(true)
bool(true)
@@ -0,0 +1,14 @@
--TEST--
Test function fann_set_cascade_min_out_epochs() by calling it with its expected arguments
--FILE--
<?php
$ann = fann_create_standard( 3, 3, 2, 1 );
var_dump( fann_set_cascade_min_out_epochs( $ann, 60 ) );
var_dump( fann_get_cascade_min_out_epochs( $ann ) == 60 );
?>
--EXPECT--
bool(true)
bool(true)
@@ -0,0 +1,14 @@
--TEST--
Test function fann_set_cascade_num_candidate_groups() by calling it with its expected arguments
--FILE--
<?php
$ann = fann_create_standard( 3, 3, 2, 1 );
var_dump( fann_set_cascade_num_candidate_groups( $ann, 3 ) );
var_dump( fann_get_cascade_num_candidate_groups( $ann ) == 3 );
?>
--EXPECT--
bool(true)
bool(true)
@@ -0,0 +1,14 @@
--TEST--
Test function fann_set_cascade_output_change_fraction() by calling it with its expected arguments
--FILE--
<?php
$ann = fann_create_standard( 3, 3, 2, 1 );
var_dump( fann_set_cascade_output_change_fraction( $ann, 0.02 ) );
var_dump( round( fann_get_cascade_output_change_fraction( $ann ), 2 ) == round( 0.02, 2 ) );
?>
--EXPECT--
bool(true)
bool(true)
@@ -0,0 +1,14 @@
--TEST--
Test function fann_set_cascade_output_stagnation_epochs() by calling it with its expected arguments
--FILE--
<?php
$ann = fann_create_standard( 3, 3, 2, 1 );
var_dump( fann_set_cascade_output_stagnation_epochs( $ann, 10 ) );
var_dump( round( fann_get_cascade_output_stagnation_epochs( $ann ), 2 ) == round( 10, 2 ) );
?>
--EXPECT--
bool(true)
bool(true)
@@ -0,0 +1,14 @@
--TEST--
Test function fann_set_cascade_weight_multiplier() by calling it with its expected arguments
--FILE--
<?php
$ann = fann_create_standard( 3, 3, 2, 1 );
var_dump( fann_set_cascade_weight_multiplier( $ann, 0.5 ) );
var_dump( round( fann_get_cascade_weight_multiplier( $ann ), 2 ) == round( 0.5, 2 ) );
?>
--EXPECT--
bool(true)
bool(true)