Skip to content

Commit ddd8357

Browse files
committed
tests: fix variable naming
1 parent a2d5e9d commit ddd8357

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ local t = setmetatable({
3636
end,
3737
})
3838

39-
local data = ldump(t)
40-
local t_copy = load(data)()
39+
local serialized_data = ldump(t)
40+
local t_copy = load(serialized_data)()
4141
```
4242

4343
See as a test at [/tests/test_use_case:71](/tests/test_use_case#L71)

tests/test_use_case.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ describe("docs/api.md", function()
9292
end,
9393
})
9494

95-
local data = ldump(t)
96-
local t_copy = load(data)()
95+
local serialized_data = ldump(t)
96+
local t_copy = load(serialized_data)()
9797

9898
assert.is_true(math.abs(t.creation_time - t_copy.creation_time) < 0.0001)
9999
assert.are_equal(coroutine.resume(t.inner), coroutine.resume(t_copy.inner))
@@ -112,8 +112,8 @@ describe("docs/api.md", function()
112112

113113
local c = create_coroutine()
114114
ldump.serializer.handlers[c] = create_coroutine
115-
local data = ldump(c) -- TODO data is a bad naming
116-
local c_copy = load(data)()
115+
local serialized_data = ldump(c)
116+
local c_copy = load(serialized_data)()
117117

118118
assert.are_equal(coroutine.resume(c), coroutine.resume(c_copy))
119119
assert.are_equal(coroutine.resume(c), coroutine.resume(c_copy))

0 commit comments

Comments
 (0)