pdlib/tests/chinese_whispers_edge_elements_not_long.phpt
Branko Kokanovic 14b1ae350b Support for raw chinese_whispers
This commit introduces chinese_whispers method without any "helpers" on
PHP side. Users needs to take care of everything (building edges from
128D face chip vector, for example), but this is exposed for people
that need low-level call and want to calculate distances and build edges
in PHP directly.
2018-07-19 19:12:39 +02:00

20 lines
534 B
PHP

--TEST--
Edge elements given in edges array for chinese_whispers functions are not of long type
--SKIPIF--
<?php if (!extension_loaded("pdlib")) print "skip"; ?>
--FILE--
<?php
try {
dlib_chinese_whispers([[0,0], [1, "foo"]]);
} catch (Exception $e) {
var_dump($e->getMessage());
}
try {
dlib_chinese_whispers([[0,0], [1, 1.1]]);
} catch (Exception $e) {
var_dump($e->getMessage());
}
--EXPECT--
string(47) "Both elements in each edge must be of long type"
string(47) "Both elements in each edge must be of long type"