summaryrefslogtreecommitdiff
path: root/src/tests/elua
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2015-04-16 14:02:21 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-06 15:05:20 +0100
commita2e2eb7f89a672b9b01f2fe5e74224d0998856e8 (patch)
tree74003826bc736989fe01f10da68e8a0d764e4c59 /src/tests/elua
parent1f35cdd473fec6c17bb42843ec11fc0b8ca4c67a (diff)
elua: test state retrieval
Diffstat (limited to 'src/tests/elua')
-rw-r--r--src/tests/elua/elua_lib.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tests/elua/elua_lib.c b/src/tests/elua/elua_lib.c
index cfa29097b9..1b7af87b37 100644
--- a/src/tests/elua/elua_lib.c
+++ b/src/tests/elua/elua_lib.c
@@ -11,11 +11,19 @@
11 11
12START_TEST(elua_api) 12START_TEST(elua_api)
13{ 13{
14 Elua_State *st;
15 lua_State *lst;
16
14 fail_if(!elua_init()); 17 fail_if(!elua_init());
15 18
16 Elua_State *st = elua_state_new("test"); 19 st = elua_state_new("test");
17 fail_if(!st); 20 fail_if(!st);
18 21
22 lst = elua_state_lua_state_get(st);
23 fail_if(!lst);
24
25 fail_if(elua_state_from_lua_state_get(lst) != st);
26
19 elua_state_free(st); 27 elua_state_free(st);
20 28
21 elua_shutdown(); 29 elua_shutdown();