Lines Matching refs:expected
50 function test_format($link, $format, $from, $order_by, $expected, $offset) {
85 if (!is_array($expected)) {
102 if ($result !== $expected) {
105 gettype($expected), $expected,
120 foreach ($expected as $k => $v) {
165 $expected = create_table($link, 'FLOAT', -10000, 10000, $engine, 90);
166 foreach ($expected as $k => $v)
167 $expected[$k] = number_format(round($v), 0, '.', ',');
168 test_format($link, 'id AS order_by_col, FORMAT(col1, 0)', 'test', 'id', $expected, 100);
170 $expected = create_table($link, 'FLOAT UNSIGNED', 0, 10000, $engine, 110);
171 foreach ($expected as $k => $v)
172 $expected[$k] = number_format(round($v), 0, '.', ',');
173 test_format($link, 'id AS order_by_col, FORMAT(col1, 0)', 'test', 'id', $expected, 120);
175 $expected = create_table($link, 'TINYINT', -128, 127, $engine, 130);
176 foreach ($expected as $k => $v)
177 $expected[$k] = number_format(round($v), 0, '.', ',');
178 test_format($link, 'id AS order_by_col, FORMAT(col1, 0)', 'test', 'id', $expected, 140);
180 $expected = create_table($link, 'SMALLINT UNSIGNED', 0, 65535, $engine, 150);
181 foreach ($expected as $k => $v)
182 $expected[$k] = number_format(round($v), 0, '.', ',');
183 test_format($link, 'id AS order_by_col, FORMAT(col1, 0)', 'test', 'id', $expected, 160);
185 $expected = create_table($link, 'MEDIUMINT', 0, 8388607, $engine, 170);
186 foreach ($expected as $k => $v)
187 $expected[$k] = number_format(round($v), 0, '.', ',');
188 test_format($link, 'id AS order_by_col, FORMAT(col1, 0)', 'test', 'id', $expected, 180);
190 $expected = create_table($link, 'INT UNSIGNED', 0, 1000, $engine, 190);
191 foreach ($expected as $k => $v)
192 $expected[$k] = number_format(round($v), 0, '.', ',');
193 test_format($link, 'id AS order_by_col, FORMAT(col1, 0)', 'test', 'id', $expected, 200);
195 $expected = create_table($link, 'BIGINT', -1000, 1000, $engine, 210);
196 foreach ($expected as $k => $v)
197 $expected[$k] = number_format(round($v), 0, '.', ',');
198 test_format($link, 'id AS order_by_col, FORMAT(col1, 0)', 'test', 'id', $expected, 220);
200 $expected = create_table($link, 'DECIMAL(5,0)', -1000, 1000, $engine, 230);
201 foreach ($expected as $k => $v)
202 $expected[$k] = number_format(round($v), 0, '.', ',');
203 test_format($link, 'id AS order_by_col, FORMAT(col1, 0)', 'test', 'id', $expected, 240);