mirror of
https://github.com/ThePhD/sol2
synced 2026-08-15 10:32:03 -04:00
🛠 Prepare for the a sol4 release...
- 🎨 Refactor the CMake a whle bunch
This commit is contained in:
parent
d4b13ff864
commit
8618e39486
558 changed files with 4991 additions and 1978 deletions
|
|
@ -1,9 +1,8 @@
|
|||
#define SOL_ALL_SAFETIES_ON 1
|
||||
#include <sol/sol.hpp>
|
||||
|
||||
#include "assert.hpp"
|
||||
|
||||
int main(int, char* []) {
|
||||
int main(int, char*[]) {
|
||||
sol::state lua;
|
||||
lua.script("function func (a, b) return (a + b) * 2 end");
|
||||
|
||||
|
|
@ -27,8 +26,8 @@ int main(int, char* []) {
|
|||
int result = func(sol::stack_count(2));
|
||||
|
||||
// make sure everything is clean
|
||||
c_assert(result == 22);
|
||||
c_assert(lua.stack_top() == 0); // stack is empty/balanced
|
||||
sol_c_assert(result == 22);
|
||||
sol_c_assert(lua.stack_top() == 0); // stack is empty/balanced
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue