2 * Copyright (C) 2007 Benjamin Otte <otte@gnome.org>
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; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
24 #include "swfdec_test_function.h"
25 #include "swfdec_test_function_list.h"
27 /* needed by the function list */
28 #include "swfdec_test_buffer.h"
29 #include "swfdec_test_image.h"
30 #include "swfdec_test_socket.h"
31 #include "swfdec_test_test.h"
34 /* include swfdec_test_function_list with special macro definition, so we get a nice
35 * way to initialize it */
36 #undef SWFDEC_TEST_FUNCTION
37 #define SWFDEC_TEST_FUNCTION(name, fun) \
43 #include "swfdec_test_function_list.h"
46 #undef SWFDEC_TEST_FUNCTION
49 swfdec_test_function_init_context (SwfdecAsContext
*cx
)
55 obj
= swfdec_as_object_new (cx
, NULL
);
58 SWFDEC_AS_VALUE_SET_OBJECT (&val
, obj
);
59 swfdec_as_object_set_variable (cx
->global
,
60 swfdec_as_context_get_string (cx
, "Native"), &val
);
62 for (i
= 0; functions
[i
].name
; i
++) {
63 swfdec_as_object_add_function (obj
,
64 swfdec_as_context_get_string (cx
, functions
[i
].name
),