• Home
  • Raw
  • Download

Lines Matching full:local

3 local function checkReadBuffer(buf, offset, sizePrefix)
11 local size = flatbuffers.N.Int32:Unpack(buf, offset)
16 local mon = monster.GetRootAsMonster(buf, offset)
21 local vec = assert(mon:Pos(), "Monster Position is nil")
28 local t = require("MyGame.Example.Test").New()
34 local ut = require("MyGame.Example.Any")
37 local table2 = mon:Test()
40 local mon2 = monster.New()
46 local invsum = 0
48 local v = mon:Inventory(i)
57 local dbls = { -1.7976931348623157e+308, 0, 1.7976931348623157e+308}
64 local test0 = mon:Test4(1)
65 local test1 = mon:Test4(2)
67 local v0 = test0:A()
68 local v1 = test0:B()
69 local v2 = test1:A()
70 local v3 = test1:B()
72 local sumtest12 = v0 + v1 + v2 + v3
84 local function generateMonster(sizePrefix, b)
87 local str = b:CreateString("MyMonster")
88 local test1 = b:CreateString("test1")
89 local test2 = b:CreateString("test2")
90 local fred = b:CreateString("Fred")
98 local inv = b:EndVector(5)
102 local mon2 = monster.End(b)
107 local test4 = b:EndVector(2)
112 local testArrayOfString = b:EndVector(2)
120 local vectorOfLongs = b:EndVector(5)
126 local vectorOfDoubles = b:EndVector(3)
129 local pos = vec3.CreateVec3(b, 1.0, 2.0, 3.0, 3.0, 2, 5, 6)
145 local mon = monster.End(b)
155 local function sizePrefix(sizePrefix)
156 local buf,offset = generateMonster(sizePrefix)
160 local function fbbClear()
162 local fbb = flatbuffers.Builder(0)
165 local buf, offset = generateMonster(false, fbb)
172 local monsters = {}
173 local lastBuf
178 local strOffset = builder:CreateString("Hi there")
184 local buf = builder:Output(false)
205 local function testCanonicalData()
206 local f = assert(io.open('monsterdata_test.mon', 'rb'))
207 local wireData = f:read("*a")
212 local function benchmarkMakeMonster(count, reuseBuilder)
213 local fbb = reuseBuilder and flatbuffers.Builder(0)
214 local length = #(generateMonster(false, fbb))
216 local s = os.clock()
220 local e = os.clock()
222 local dur = (e - s)
223 local rate = count / (dur * 1000)
224 local data = (length * count) / (1024 * 1024)
225 local dataRate = data / dur
231 local function benchmarkReadBuffer(count)
232 local f = assert(io.open('monsterdata_test.mon', 'rb'))
233 local buf = f:read("*a")
236 local s = os.clock()
240 local e = os.clock()
242 local dur = (e - s)
243 local rate = count / (dur * 1000)
244 local data = (#buf * count) / (1024 * 1024)
245 local dataRate = data / dur
251 local tests =
290 local result, err = xpcall(function()
296 local function buildArgList(tbl)
297 local s = ""
304 local testsPassed, testsFailed = 0,0
306 local allargs = test.args or {{}}
308 local results, err = xpcall(test.f,debug.traceback, table.unpack(args))
321 local totalTests = testsPassed + testsFailed