github.com/dfklegend/cell2/utils@v0.0.0-20240402033734-a0a9f3d9335d/golua/_glua-tests/math.lua (about)

     1  assert(math.fmod(13.5, 2) == 1.5)
     2  assert(math.pow(7, 2) == 49)
     3  
     4  local ok, msg = pcall(function()
     5    math.max()
     6  end)
     7  assert(not ok and string.find(msg, "wrong number of arguments"))
     8  
     9  local ok, msg = pcall(function()
    10    math.min()
    11  end)
    12  assert(not ok and string.find(msg, "wrong number of arguments"))