github.com/arnodel/golua@v0.0.0-20230215163904-e0b5347eaaa1/lib/base/lua/assert.lua (about) 1 assert(1 + 1 == 2) 2 assert(0) 3 assert(true) 4 assert("") 5 -- No output 6 7 print(pcall(assert, 1 + 1 == 3)) 8 --> =false assertion failed! 9 10 print(pcall(assert, false, "xx")) 11 --> =false xx 12 13 print(pcall(assert, nil, 123)) 14 --> =false 123 15 16 print(pcall(assert)) 17 --> ~false\t.*value needed