mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-22 06:04:35 +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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
local sorted_names = {}
|
||||
local sorted_score = {}
|
||||
|
||||
|
||||
for k, v in tablex.spairs(t, function(a, b)
|
||||
return t[a].score > t[b].score
|
||||
end) do
|
||||
tablex.push(sorted_names, v.name)
|
||||
tablex.push(sorted_score, v.score)
|
||||
end
|
||||
|
||||
|
||||
assert(tablex.deep_equal(sorted_names, {
|
||||
"John", "Joe", "Robert"
|
||||
}))
|
||||
|
||||
|
||||
assert(tablex.deep_equal(sorted_score, {
|
||||
10, 8, 7
|
||||
}))
|
||||
|
Loading…
Reference in New Issue
Block a user