1 /* EINA - EFL data type library
2 * Copyright (C) 2008 Cedric Bail
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library;
16 * if not, see <http://www.gnu.org/licenses/>.
25 #include "eina_suite.h"
26 #include "eina_benchmark.h"
28 static int global_test = 0;
31 _eina_benchmark_specimens(int request)
36 for (i = 0; i < request; ++i)
42 START_TEST(eina_benchmark_simple)
45 Eina_Array_Iterator it;
50 eb = eina_benchmark_new("benchmark", "test");
53 eina_benchmark_register(eb, "specimens_check",
54 EINA_BENCHMARK(_eina_benchmark_specimens),
57 ea = eina_benchmark_run(eb);
60 EINA_ARRAY_ITER_NEXT(ea, i, tmp, it)
66 fail_if(global_test != 499500);
68 eina_benchmark_free(eb);
73 eina_test_benchmark(TCase *tc)
75 tcase_add_test(tc, eina_benchmark_simple);