summaryrefslogtreecommitdiff
path: root/src/tests/efl_js
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2016-03-15 18:00:20 -0300
committerVitor Sousa <vitorsousasilva@gmail.com>2016-03-18 17:47:09 -0300
commit1422e62f302f2f2f0995b19f98d6f971e39a921f (patch)
tree13e7fbed6a0e5f4fde878907bc74645d241c8be6 /src/tests/efl_js
parentc7550b2964e8f1c1cd9f51c7db573c5361f8cb10 (diff)
efl js: Fix naming of manual binding functions.
Also removed references to the discarded manual binding "ecore_js_file".
Diffstat (limited to 'src/tests/efl_js')
-rwxr-xr-xsrc/tests/efl_js/benchmark_js_suite.js2
-rwxr-xr-xsrc/tests/efl_js/ecore_js_suite.js202
-rwxr-xr-xsrc/tests/efl_js/eina_js_containers_suite.js2
-rwxr-xr-xsrc/tests/efl_js/eina_js_suite.js2
-rwxr-xr-xsrc/tests/efl_js/eio_js_suite.js4
-rwxr-xr-xsrc/tests/efl_js/eldbus_js_suite.js2
-rwxr-xr-xsrc/tests/efl_js/ethumb_js_suite.js10
7 files changed, 110 insertions, 114 deletions
diff --git a/src/tests/efl_js/benchmark_js_suite.js b/src/tests/efl_js/benchmark_js_suite.js
index b3a5d7c86c..fc1de018a6 100755
--- a/src/tests/efl_js/benchmark_js_suite.js
+++ b/src/tests/efl_js/benchmark_js_suite.js
@@ -26,7 +26,7 @@ if(typeof process !== 'undefined')
26 if (process.argv.indexOf("--verbose") != -1) 26 if (process.argv.indexOf("--verbose") != -1)
27 console.info.apply(null, arguments); 27 console.info.apply(null, arguments);
28 }; 28 };
29 exit = efl.ecore_mainloop_quit; 29 exit = efl.Ecore.Mainloop.quit;
30} 30}
31else 31else
32{ 32{
diff --git a/src/tests/efl_js/ecore_js_suite.js b/src/tests/efl_js/ecore_js_suite.js
index 8534304c1b..85630afaf4 100755
--- a/src/tests/efl_js/ecore_js_suite.js
+++ b/src/tests/efl_js/ecore_js_suite.js
@@ -12,7 +12,6 @@ if(typeof process !== 'undefined')
12{ 12{
13 console.log('running from nodejs'); 13 console.log('running from nodejs');
14 console.log('path', process.env.NODE_PATH); 14 console.log('path', process.env.NODE_PATH);
15 console.log("teste1");
16 15
17 efl = require('efl'); 16 efl = require('efl');
18 assert(efl != null, "could not load efl node module"); 17 assert(efl != null, "could not load efl node module");
@@ -27,7 +26,7 @@ if(typeof process !== 'undefined')
27 if (process.argv.indexOf("--verbose") != -1) 26 if (process.argv.indexOf("--verbose") != -1)
28 console.info.apply(null, arguments); 27 console.info.apply(null, arguments);
29 }; 28 };
30 exit = efl.ecore_mainloop_quit; 29 exit = efl.Ecore.Mainloop.quit;
31} 30}
32else 31else
33{ 32{
@@ -73,51 +72,50 @@ function abs(n) {
73var TOLERANCE = 0.0001; 72var TOLERANCE = 0.0001;
74// end ecore preamble 73// end ecore preamble
75 74
76start_test("timers", function () { 75start_test("ecore timers", function () {
77 var p = 2.5; 76 var p = 2.5;
78 efl.ecore_timer_precision_set(p); 77 efl.Ecore.Timer.setPrecision(p);
79 assert(abs(efl.ecore_timer_precision_get() - p) < TOLERANCE); 78 assert(abs(efl.Ecore.Timer.getPrecision() - p) < TOLERANCE);
80 79
81 p = 0.5; 80 p = 0.5;
82 efl.ecore_timer_precision_set(p); 81 efl.Ecore.Timer.setPrecision(p);
83 assert(abs(efl.ecore_timer_precision_get() - p) < TOLERANCE); 82 assert(abs(efl.Ecore.Timer.getPrecision() - p) < TOLERANCE);
84 83
85 var ncalls = 0; 84 var ncalls = 0;
86 85
87 captured = false; 86 captured = false;
88 efl.ecore_timer_add(1, function() { 87 efl.Ecore.Timer.add(1, function() {
89 print_info('ecore_timer_add handler');
90 ++ncalls; 88 ++ncalls;
91 if (ncalls != 4) 89 if (ncalls != 4)
92 return true; 90 return true;
93 91
94 captured = true; 92 captured = true;
95 efl.ecore_job_add(efl.ecore_mainloop_quit); 93 efl.Ecore.Job.add(efl.Ecore.Mainloop.quit);
96 return false; 94 return false;
97 }); 95 });
98 96
99 efl.ecore_mainloop_begin(); 97 efl.Ecore.Mainloop.begin();
100 assert(captured); 98 assert(captured);
101 99
102 ncalls = 0; 100 ncalls = 0;
103 captured = false; 101 captured = false;
104 102
105 efl.ecore_timer_loop_add(1, function() { 103 efl.Ecore.Timer.addLoop(1, function() {
106 ++ncalls; 104 ++ncalls;
107 if (ncalls != 4) 105 if (ncalls != 4)
108 return true; 106 return true;
109 107
110 captured = true; 108 captured = true;
111 efl.ecore_job_add(efl.ecore_mainloop_quit); 109 efl.Ecore.Job.add(efl.Ecore.Mainloop.quit);
112 return false; 110 return false;
113 }); 111 });
114 112
115 efl.ecore_mainloop_begin(); 113 efl.Ecore.Mainloop.begin();
116 assert(captured); 114 assert(captured);
117 115
118 captured = false; 116 captured = false;
119 117
120 var timer = efl.ecore_timer_add(1, function() { 118 var timer = efl.Ecore.Timer.add(1, function() {
121 captured = true; 119 captured = true;
122 return false; 120 return false;
123 }); 121 });
@@ -134,65 +132,79 @@ start_test("timers", function () {
134 132
135 timer.del(); 133 timer.del();
136 134
137 efl.ecore_timer_add(2, function() { 135 efl.Ecore.Timer.add(2, function() {
138 efl.ecore_job_add(efl.ecore_mainloop_quit); 136 efl.Ecore.Job.add(efl.Ecore.Mainloop.quit);
139 return false; 137 return false;
140 }); 138 });
141 139
142 efl.ecore_mainloop_begin(); 140 efl.Ecore.Mainloop.begin();
143 assert(captured === false); 141 assert(captured === false);
144}); 142});
145 143
146// Ecore event 144// Ecore event
147start_test("ecore event", function () { 145start_test("ecore event", function () {
148 var myevent = efl.ecore_event_type_new(); 146 var myevent = efl.Ecore.Event.newType();
149 147
150 captured = [0, 0, 0] 148 captured = [0, 0, 0]
151 149
152 var handler1 = efl.ecore_event_handler_add(myevent, function(event) { 150 var handler1 = efl.Ecore.Event.addHandler(myevent, function(event) {
153 assert(efl.ecore_event_current_type_get() === myevent); 151 print_info("CALLBACK_PASS_ON pre assert");
152 assert(efl.Ecore.Event.getCurrentType() === myevent);
154 assert(event === myevent); 153 assert(event === myevent);
155 captured[0] += 1; 154 captured[0] += 1;
156 return efl.ECORE_CALLBACK_PASS_ON; 155 print_info("CALLBACK_PASS_ON post assert");
156 return efl.Ecore.Mainloop.CALLBACK_PASS_ON;
157 }); 157 });
158 158
159 var handler2 = efl.ecore_event_handler_add(myevent, function(event) { 159 var handler2 = efl.Ecore.Event.addHandler(myevent, function(event) {
160 assert(efl.ecore_event_current_type_get() === myevent); 160 print_info("CALLBACK_DONE #1 pre assert");
161 assert(efl.Ecore.Event.getCurrentType() === myevent);
161 assert(event === myevent); 162 assert(event === myevent);
162 captured[1] += 1; 163 captured[1] += 1;
163 return efl.ECORE_CALLBACK_DONE; 164 print_info("CALLBACK_DONE #1 post assert");
165 return efl.Ecore.Mainloop.CALLBACK_DONE;
164 }); 166 });
165 167
166 var handler3 = efl.ecore_event_handler_add(myevent, function(event) { 168 var handler3 = efl.Ecore.Event.addHandler(myevent, function(event) {
167 assert(efl.ecore_event_current_type_get() === myevent); 169 print_info("CALLBACK_DONE #2 pre assert");
170 assert(efl.Ecore.Event.getCurrentType() === myevent);
168 assert(event === myevent); 171 assert(event === myevent);
169 captured[2] += 1; 172 captured[2] += 1;
170 return efl.ECORE_CALLBACK_DONE; 173 print_info("CALLBACK_DONE #2 post assert");
174 return efl.Ecore.Mainloop.CALLBACK_DONE;
171 }); 175 });
172 176
173 efl.ecore_timer_add(1, function() { 177 efl.Ecore.Timer.add(1, function() {
174 efl.ecore_event_add(myevent); 178 efl.Ecore.Event.add(myevent);
179 print_info("Timer.add(1, callback) before assert");
175 assert(captured[0] === 0 && captured[1] === 0 && captured[2] === 0); 180 assert(captured[0] === 0 && captured[1] === 0 && captured[2] === 0);
176 efl.ecore_timer_add(1, function() { 181 print_info("Timer.add(1, callback) after assert");
182 efl.Ecore.Timer.add(1, function() {
183 print_info("inner Timer.add(1, callback) before assert");
177 assert(captured[0] === 1 && captured[1] === 1 && captured[2] === 0); 184 assert(captured[0] === 1 && captured[1] === 1 && captured[2] === 0);
185 print_info("inner Timer.add(1, callback) after assert");
178 handler1.del(); 186 handler1.del();
179 efl.ecore_event_add(myevent); 187 efl.Ecore.Event.add(myevent);
180 efl.ecore_event_add(myevent); 188 efl.Ecore.Event.add(myevent);
181 efl.ecore_event_add(myevent).del(); 189 efl.Ecore.Event.add(myevent).del();
182 efl.ecore_timer_add(1, function() { 190 efl.Ecore.Timer.add(1, function() {
191 print_info("twice inner Timer.add(1, callback) before assert");
183 assert(captured[0] === 1 && captured[1] === 3 && captured[2] === 0); 192 assert(captured[0] === 1 && captured[1] === 3 && captured[2] === 0);
184 efl.ecore_mainloop_quit(); 193 print_info("twice inner Timer.add(1, callback) after assert");
194 efl.Ecore.Mainloop.quit();
185 }); 195 });
186 }); 196 });
187 }); 197 });
188 198
189 efl.ecore_mainloop_begin(); 199 efl.Ecore.Mainloop.begin();
190 200
191 efl.ecore_event_add(myevent); 201 efl.Ecore.Event.add(myevent);
192 efl.ecore_event_add(myevent); 202 efl.Ecore.Event.add(myevent);
193 efl.ecore_event_add(myevent); 203 efl.Ecore.Event.add(myevent);
194 204
195 var filter = efl.ecore_event_filter_add(function() { 205 print_info("will add filter");
206
207 var filter = efl.Ecore.Event.addFilter(function() {
196 return {count: 0}; 208 return {count: 0};
197 }, function(loop_data, event) { 209 }, function(loop_data, event) {
198 assert(event === myevent); 210 assert(event === myevent);
@@ -201,17 +213,17 @@ start_test("ecore event", function () {
201 return c != 0; 213 return c != 0;
202 }, function(loop_data) {}); 214 }, function(loop_data) {});
203 215
204 efl.ecore_timer_add(1, efl.ecore_mainloop_quit); 216 efl.Ecore.Timer.add(1, efl.Ecore.Mainloop.quit);
205 efl.ecore_mainloop_begin(); 217 efl.Ecore.Mainloop.begin();
206 assert(captured[1] === 5); 218 assert(captured[1] === 5);
207 filter.del(); 219 filter.del();
208 220
209 efl.ecore_event_add(myevent); 221 efl.Ecore.Event.add(myevent);
210 efl.ecore_event_add(myevent); 222 efl.Ecore.Event.add(myevent);
211 efl.ecore_event_add(myevent); 223 efl.Ecore.Event.add(myevent);
212 224
213 efl.ecore_timer_add(1, efl.ecore_mainloop_quit); 225 efl.Ecore.Timer.add(1, efl.Ecore.Mainloop.quit);
214 efl.ecore_mainloop_begin(); 226 efl.Ecore.Mainloop.begin();
215 assert(captured[1] === 8); 227 assert(captured[1] === 8);
216 228
217 handler2.del(); 229 handler2.del();
@@ -222,22 +234,22 @@ start_test("ecore event", function () {
222start_test("ecore jobs", function () { 234start_test("ecore jobs", function () {
223 captured = false; 235 captured = false;
224 236
225 efl.ecore_job_add(function() { 237 efl.Ecore.Job.add(function() {
226 captured = true; 238 captured = true;
227 efl.ecore_mainloop_quit(); 239 efl.Ecore.Mainloop.quit();
228 }); 240 });
229 241
230 assert(captured === false); 242 assert(captured === false);
231 efl.ecore_mainloop_begin(); 243 efl.Ecore.Mainloop.begin();
232 assert(captured === true); 244 assert(captured === true);
233 245
234 captured = false; 246 captured = false;
235 var job = efl.ecore_job_add(function() { 247 var job = efl.Ecore.Job.add(function() {
236 captured = true; 248 captured = true;
237 }); 249 });
238 efl.ecore_job_add(efl.ecore_mainloop_quit); 250 efl.Ecore.Job.add(efl.Ecore.Mainloop.quit);
239 job.del(); 251 job.del();
240 efl.ecore_mainloop_begin(); 252 efl.Ecore.Mainloop.begin();
241 assert(captured === false); 253 assert(captured === false);
242}); 254});
243 255
@@ -246,92 +258,76 @@ start_test("ecore idle", function () {
246 var counter = 1; 258 var counter = 1;
247 captured = [0, 0, 0, 0, 0]; 259 captured = [0, 0, 0, 0, 0];
248 260
249 efl.ecore_idler_add(function() { 261 efl.Ecore.Idle.add(function() {
250 print_info('ecore idle handler 1');
251 captured[0] = counter; 262 captured[0] = counter;
252 counter += 1; 263 counter += 1;
253 efl.ecore_job_add(function() { print_info('ecore job handler 1'); }); 264 efl.Ecore.Job.add(function() { print_info('ecore job handler 1'); });
254 return efl.ECORE_CALLBACK_DONE; 265 return efl.Ecore.Mainloop.CALLBACK_DONE;
255 }); 266 });
256 267
257 print_info('ecore idle 1'); 268 efl.Ecore.Idle.addEnterer(function() {
258
259 efl.ecore_idle_enterer_add(function() {
260 print_info('ecore idle handler 2');
261 captured[1] = counter; 269 captured[1] = counter;
262 counter += 1; 270 counter += 1;
263 return efl.ECORE_CALLBACK_DONE; 271 return efl.Ecore.Mainloop.CALLBACK_DONE;
264 }); 272 });
265 273
266 print_info('ecore idle 2'); 274 efl.Ecore.Idle.addEnterer(function() {
267
268 efl.ecore_idle_enterer_add(function() {
269 print_info('ecore idle handler 3');
270 captured[2] = counter; 275 captured[2] = counter;
271 counter += 1; 276 counter += 1;
272 return efl.ECORE_CALLBACK_DONE; 277 return efl.Ecore.Mainloop.CALLBACK_DONE;
273 }); 278 });
274 279
275 print_info('ecore idle 3'); 280 efl.Ecore.Idle.addEntererBefore(function() {
276
277 efl.ecore_idle_enterer_before_add(function() {
278 print_info('ecore idle handler 4');
279 captured[3] = counter; 281 captured[3] = counter;
280 counter += 1; 282 counter += 1;
281 return efl.ECORE_CALLBACK_DONE; 283 return efl.Ecore.Mainloop.CALLBACK_DONE;
282 }); 284 });
283 285
284 print_info('ecore idle 4'); 286 efl.Ecore.Idle.addExiter(function() {
285
286 efl.ecore_idle_exiter_add(function() {
287 print_info('ecore idle handler 5');
288 captured[4] = counter; 287 captured[4] = counter;
289 counter += 1; 288 counter += 1;
290 efl.ecore_mainloop_quit(); 289 efl.Ecore.Mainloop.quit();
291 return efl.ECORE_CALLBACK_DONE; 290 return efl.Ecore.Mainloop.CALLBACK_DONE;
292 }); 291 });
293 292
294 print_info('ecore idle 5'); 293 efl.Ecore.Mainloop.begin();
295
296 efl.ecore_mainloop_begin();
297
298 print_info('ecore idle 6');
299 294
300 assert(captured[0] === 4, "ecore_idler_add test"); 295 assert(captured[0] === 4, "Ecore.Idle.add test");
301 assert(captured[1] === 2, "ecore_idle_enterer_add test"); 296 assert(captured[1] === 2, "Ecore.Idle.addEnterer test");
302 assert(captured[2] === 3, "ecore_idle_enterer_add test two"); 297 assert(captured[2] === 3, "Ecore.Idle.addEnterer test two");
303 assert(captured[3] === 1, "ecore_idle_enterer_before_add test"); 298 assert(captured[3] === 1, "Ecore.Idle.addEntererBefore test");
304 assert(captured[4] === 5, "ecore_idle_exiter_add test"); 299 assert(captured[4] === 5, "Ecore.Idle.addExiter test");
305}); 300});
306 301
307// Ecore animator 302// Ecore animator
308start_test("ecore animator", function () { 303start_test("ecore animator", function () {
309 efl.ecore_animator_frametime_set(1); 304 efl.Ecore.Animator.setFrametime(1);
310 assert(efl.ecore_animator_frametime_get() === 1); 305 assert(efl.Ecore.Animator.getFrametime() === 1);
311 efl.ecore_animator_frametime_set(1 / 50); 306 efl.Ecore.Animator.setFrametime(1 / 50);
312 assert(efl.ecore_animator_frametime_get() === (1 / 50)); 307 assert(efl.Ecore.Animator.getFrametime() === (1 / 50));
313 308
314 assert(efl.ecore_animator_pos_map(0.5, efl.ECORE_POS_MAP_LINEAR, 0, 0) 309 assert(efl.Ecore.Animator.posMap(0.5, efl.Ecore.Animator.POS_MAP_LINEAR, 0, 0)
315 === 0.5); 310 === 0.5);
316 311
317 efl.ecore_animator_source_set(efl.ECORE_ANIMATOR_SOURCE_CUSTOM); 312 efl.Ecore.Animator.setSource(efl.Ecore.Animator.SOURCE_TIMER);
313 assert(efl.Ecore.Animator.getSource() === efl.Ecore.Animator.SOURCE_TIMER);
318}); 314});
319 315
320// Ecore poller 316// Ecore poller
321start_test("ecore poller", function () { 317start_test("ecore poller", function () {
322 efl.ecore_poller_poll_interval_set(efl.ECORE_POLLER_CORE, 42); 318 efl.Ecore.Poller.setPollInterval(efl.Ecore.Poller.CORE, 42);
323 assert(efl.ecore_poller_poll_interval_get(efl.ECORE_POLLER_CORE) === 42); 319 assert(efl.Ecore.Poller.getPollInterval(efl.Ecore.Poller.CORE) === 42);
324 efl.ecore_poller_poll_interval_set(efl.ECORE_POLLER_CORE, 2); 320 efl.Ecore.Poller.setPollInterval(efl.Ecore.Poller.CORE, 2);
325 assert(efl.ecore_poller_poll_interval_get(efl.ECORE_POLLER_CORE) === 2); 321 assert(efl.Ecore.Poller.getPollInterval(efl.Ecore.Poller.CORE) === 2);
326}); 322});
327 323
328start_test("ecore throttle", function () { 324start_test("ecore throttle", function () {
329 // Ecore throttle 325 // Ecore throttle
330 326
331 efl.ecore_throttle_adjust(3); 327 efl.Ecore.Throttle.adjust(3);
332 assert(efl.ecore_throttle_get() === 3); 328 assert(efl.Ecore.Throttle.get() === 3);
333 efl.ecore_throttle_adjust(-3); 329 efl.Ecore.Throttle.adjust(-3);
334 assert(efl.ecore_throttle_get() === 0); 330 assert(efl.Ecore.Throttle.get() === 0);
335}); 331});
336 332
337// footer 333// footer
diff --git a/src/tests/efl_js/eina_js_containers_suite.js b/src/tests/efl_js/eina_js_containers_suite.js
index f4f6bf314e..4abb8aff0b 100755
--- a/src/tests/efl_js/eina_js_containers_suite.js
+++ b/src/tests/efl_js/eina_js_containers_suite.js
@@ -27,7 +27,7 @@ if(typeof process !== 'undefined')
27 if (process.argv.indexOf("--verbose") != -1) 27 if (process.argv.indexOf("--verbose") != -1)
28 console.info.apply(null, arguments); 28 console.info.apply(null, arguments);
29 }; 29 };
30 exit = efl.ecore_mainloop_quit; 30 exit = efl.Ecore.Mainloop.quit;
31} 31}
32else 32else
33{ 33{
diff --git a/src/tests/efl_js/eina_js_suite.js b/src/tests/efl_js/eina_js_suite.js
index 811e1f6756..95aabfbd1f 100755
--- a/src/tests/efl_js/eina_js_suite.js
+++ b/src/tests/efl_js/eina_js_suite.js
@@ -27,7 +27,7 @@ if(typeof process !== 'undefined')
27 if (process.argv.indexOf("--verbose") != -1) 27 if (process.argv.indexOf("--verbose") != -1)
28 console.info.apply(null, arguments); 28 console.info.apply(null, arguments);
29 }; 29 };
30 exit = efl.ecore_mainloop_quit; 30 exit = efl.Ecore.Mainloop.quit;
31} 31}
32else 32else
33{ 33{
diff --git a/src/tests/efl_js/eio_js_suite.js b/src/tests/efl_js/eio_js_suite.js
index 01eb09c171..bef83cfe78 100755
--- a/src/tests/efl_js/eio_js_suite.js
+++ b/src/tests/efl_js/eio_js_suite.js
@@ -27,7 +27,7 @@ if(typeof process !== 'undefined')
27 if (process.argv.indexOf("--verbose") != -1) 27 if (process.argv.indexOf("--verbose") != -1)
28 console.info.apply(null, arguments); 28 console.info.apply(null, arguments);
29 }; 29 };
30 exit = efl.ecore_mainloop_quit; 30 exit = efl.Ecore.Mainloop.quit;
31} 31}
32else 32else
33{ 33{
@@ -66,7 +66,7 @@ function start_test(test_name, test_func) {
66 66
67// Eio tests 67// Eio tests
68start_test('test constants', function () { 68start_test('test constants', function () {
69 assert(typeof(efl.EIO_FILE_COPY) === 'number'); 69 assert(typeof(efl.Eio.FILE_COPY) === 'number');
70}); 70});
71// TODO: more tests 71// TODO: more tests
72 72
diff --git a/src/tests/efl_js/eldbus_js_suite.js b/src/tests/efl_js/eldbus_js_suite.js
index 30869072c4..d57fbfe05c 100755
--- a/src/tests/efl_js/eldbus_js_suite.js
+++ b/src/tests/efl_js/eldbus_js_suite.js
@@ -27,7 +27,7 @@ if(typeof process !== 'undefined')
27 if (process.argv.indexOf("--verbose") != -1) 27 if (process.argv.indexOf("--verbose") != -1)
28 console.info.apply(null, arguments); 28 console.info.apply(null, arguments);
29 }; 29 };
30 exit = efl.ecore_mainloop_quit; 30 exit = efl.Ecore.Mainloop.quit;
31} 31}
32else 32else
33{ 33{
diff --git a/src/tests/efl_js/ethumb_js_suite.js b/src/tests/efl_js/ethumb_js_suite.js
index 5dd78fc493..33bf33d6d2 100755
--- a/src/tests/efl_js/ethumb_js_suite.js
+++ b/src/tests/efl_js/ethumb_js_suite.js
@@ -27,7 +27,7 @@ if(typeof process !== 'undefined')
27 if (process.argv.indexOf("--verbose") != -1) 27 if (process.argv.indexOf("--verbose") != -1)
28 console.info.apply(null, arguments); 28 console.info.apply(null, arguments);
29 }; 29 };
30 exit = efl.ecore_mainloop_quit; 30 exit = efl.Ecore.Mainloop.quit;
31} 31}
32else 32else
33{ 33{
@@ -47,7 +47,7 @@ suite_fail = []; // Will store the name of the failures
47 47
48// Basic test function // 48// Basic test function //
49function start_test(test_name, test_func) { 49function start_test(test_name, test_func) {
50 print("[ RUN ] ethumb_js_suite: " + test_name); 50 print("[ RUN ] Ethumb.js_suite: " + test_name);
51 var test_result = true; 51 var test_result = true;
52 try { 52 try {
53 test_func(); 53 test_func();
@@ -56,7 +56,7 @@ function start_test(test_name, test_func) {
56 test_result = false; 56 test_result = false;
57 print_error("Error: ", e, e.stack); 57 print_error("Error: ", e, e.stack);
58 } 58 }
59 print("[ " + (test_result ? "PASS" : "FAIL") + " ] ethumb_js_suite: " + test_name); 59 print("[ " + (test_result ? "PASS" : "FAIL") + " ] Ethumb.js_suite: " + test_name);
60 if (test_result) 60 if (test_result)
61 suite_ok += 1; 61 suite_ok += 1;
62 else 62 else
@@ -64,7 +64,7 @@ function start_test(test_name, test_func) {
64} 64}
65// end Preamble 65// end Preamble
66 66
67efl.ethumb_client_init(); 67efl.Ethumb.initClient();
68 68
69// Ethumb tests 69// Ethumb tests
70 70
@@ -72,7 +72,7 @@ start_test('dummy test', function () {
72 assert(true); 72 assert(true);
73}); 73});
74 74
75efl.ethumb_client_shutdown(); 75efl.Ethumb.shutdownClient();
76 76
77// footer 77// footer
78 78