nngn
Loading...
Searching...
No Matches
lua.h
Go to the documentation of this file.
1#ifndef NNGN_TEST_BENCH_LUA_LUA_H
2#define NNGN_TEST_BENCH_LUA_LUA_H
3
4#ifndef NNGN_BENCH_LUA_N
5// Limited by Lua's maximum stack size (see `LUAI_MAXSTACK` and `EXTRA_STACK`,
6// typically 1'000'000 and 5 respectively).
7#define NNGN_BENCH_LUA_N (1'000'000 - 5 - 1)
8#endif
9
10#include <QTest>
11
12struct lua_State;
13
14class LuaBench : public QObject {
15 Q_OBJECT
16 lua_State *L = nullptr;
17private slots:
18 void initTestCase(void);
19 void cleanupTestCase(void);
20 void base(void);
21 void access_stack(void);
22 void access_registry(void);
23 void access_registry_raw(void);
24 void access_global(void);
25 void push_stack(void);
26 void push_registry(void);
27 void push_global(void);
28};
29
30#endif
Definition lua.h:14
void access_global(void)
Definition lua.cpp:57
void push_global(void)
Definition lua.cpp:89
void access_stack(void)
Definition lua.cpp:43
void cleanupTestCase(void)
Definition lua.cpp:32
void base(void)
Definition lua.cpp:34
void access_registry(void)
Definition lua.cpp:49
void push_stack(void)
Definition lua.cpp:72
lua_State * L
Definition lua.h:16
void initTestCase(void)
Definition lua.cpp:31
void push_registry(void)
Definition lua.cpp:80
void access_registry_raw(void)
Definition lua.cpp:53