mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-22 14:14:36 +00:00
removed whitespace to make the linter happy; todo discover how to turn this particular inanity (whitespace only lines) off :)
This commit is contained in:
parent
8a57ae458f
commit
433e4ebb08
@ -136,21 +136,21 @@ local function test_spairs()
|
|||||||
score = 10
|
score = 10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local sorted_names = {}
|
local sorted_names = {}
|
||||||
local sorted_score = {}
|
local sorted_score = {}
|
||||||
|
|
||||||
for k, v in tablex.spairs(t, function(a, b)
|
for k, v in tablex.spairs(t, function(a, b)
|
||||||
return t[a].score > t[b].score
|
return t[a].score > t[b].score
|
||||||
end) do
|
end) do
|
||||||
tablex.push(sorted_names, v.name)
|
tablex.push(sorted_names, v.name)
|
||||||
tablex.push(sorted_score, v.score)
|
tablex.push(sorted_score, v.score)
|
||||||
end
|
end
|
||||||
|
|
||||||
assert(tablex.deep_equal(sorted_names, {
|
assert(tablex.deep_equal(sorted_names, {
|
||||||
"John", "Joe", "Robert"
|
"John", "Joe", "Robert"
|
||||||
}))
|
}))
|
||||||
|
|
||||||
assert(tablex.deep_equal(sorted_score, {
|
assert(tablex.deep_equal(sorted_score, {
|
||||||
10, 8, 7
|
10, 8, 7
|
||||||
}))
|
}))
|
||||||
|
Loading…
Reference in New Issue
Block a user