| 324 | } |
| 325 | |
| 326 | void TestLua() { |
| 327 | LuaCpp::State lua(true); |
| 328 | |
| 329 | lua.HandleExceptionsWith([](int status, std::string msg, std::exception_ptr exception) { |
| 330 | const char *statusStr = ""; |
| 331 | switch (status) { |
| 332 | case LUA_ERRRUN: |
| 333 | statusStr = "LUA_ERRRUN"; |
| 334 | break; |
| 335 | case LUA_ERRSYNTAX: |
| 336 | statusStr = "LUA_ERRSYNTAX"; |
| 337 | break; |
| 338 | case LUA_ERRMEM: |
| 339 | statusStr = "LUA_ERRMEM"; |
| 340 | break; |
| 341 | #if LUA_VERSION_NUM >= 502 |
| 342 | case LUA_ERRGCMM: |
| 343 | statusStr = "LUA_ERRGCMM"; |
| 344 | break; |
| 345 | #endif |
| 346 | case LUA_ERRERR: |
| 347 | statusStr = "LUA_ERRERR"; |
| 348 | break; |
| 349 | } |
| 350 | BE_ERRLOG("%s - %s\n", statusStr, msg.c_str()); |
| 351 | }); |
| 352 | |
| 353 | TestLuaFunction(lua); |
| 354 | TestCppFunction(lua); |
| 355 | TestInheritance(lua); |
| 356 | TestPolymorphism(lua); |
| 357 | TestObject(lua); |
| 358 | TestCallByReference(lua); |
| 359 | TestVec3(lua); |
| 360 | TestTableEnumeration(lua); |
| 361 | TestModule(lua); |
| 362 | TestCompile(lua); |
| 363 | } |
nothing calls this directly
no test coverage detected