[SPIP][PLUGINS] v3.0-->v3.2
[lhc/web/www.git] / www / plugins-dist / filtres_images / tests / multiple_de_trois.php
1 <?php
2 /**
3 * Test unitaire de la fonction multiple_de_trois
4 * du fichier filtres/images_lib.php
5 *
6 * genere automatiquement par TestBuilder
7 * le
8 */
9
10
11 $test = 'multiple_de_trois';
12 $remonte = '../';
13 while (!is_dir($remonte . 'ecrire')) {
14 $remonte = "../$remonte";
15 }
16 require $remonte . 'tests/test.inc';
17 find_in_path('filtres/images_lib.php', '', true);
18
19 //
20 // hop ! on y va
21 //
22 $err = tester_fun('multiple_de_trois', essais_multiple_de_trois());
23
24 // si le tableau $err est pas vide ca va pas
25 if ($err) {
26 die('<dl>' . join('', $err) . '</dl>');
27 }
28
29 echo 'OK';
30
31 function essais_multiple_de_trois() {
32 $essais = array(
33 0 =>
34 array(
35 0 => 0,
36 1 => 0,
37 ),
38 1 =>
39 array(
40 0 => -0,
41 1 => -1,
42 ),
43 2 =>
44 array(
45 0 => 0,
46 1 => 1,
47 ),
48 3 =>
49 array(
50 0 => 3,
51 1 => 2,
52 ),
53 4 =>
54 array(
55 0 => 3,
56 1 => 3,
57 ),
58 5 =>
59 array(
60 0 => 3,
61 1 => 4,
62 ),
63 6 =>
64 array(
65 0 => 6,
66 1 => 5,
67 ),
68 7 =>
69 array(
70 0 => 6,
71 1 => 6,
72 ),
73 8 =>
74 array(
75 0 => 6,
76 1 => 7,
77 ),
78 9 =>
79 array(
80 0 => 9,
81 1 => 10,
82 ),
83 10 =>
84 array(
85 0 => 21,
86 1 => 20,
87 ),
88 11 =>
89 array(
90 0 => 30,
91 1 => 30,
92 ),
93 12 =>
94 array(
95 0 => 51,
96 1 => 50,
97 ),
98 13 =>
99 array(
100 0 => 99,
101 1 => 100,
102 ),
103 14 =>
104 array(
105 0 => 999,
106 1 => 1000,
107 ),
108 15 =>
109 array(
110 0 => 9999,
111 1 => 10000,
112 ),
113 );
114
115 return $essais;
116 }