浏览代码

Add test for Font:getLines;

bjorn 1 年之前
父节点
当前提交
a427cb0466
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      tests/font.lua

+ 9 - 0
tests/font.lua

@@ -0,0 +1,9 @@
+function lovr.load()
+  font = lovr.graphics.getDefaultFont()
+  local lines = font:getLines({ 0xff0000, 'hello ', 0x0000ff, 'world' }, 0)
+  assert(#lines == 2)
+  assert(lines[1] == 'hello ')
+  assert(lines[2] == 'world')
+end
+
+lovr.event.quit()