Skip to content

Commit

Permalink
extend lua table sort test to cover for octet indexes on dicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jaromil committed Jul 22, 2024
1 parent b0e4b0c commit 9fb2019
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/lua/table_sort.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ end
debug( r )



print'QSORT Test #4: table sorted by zenroom type keys (octets)'
claims = { "I am over 18",
"Born in Pescara",
Expand All @@ -60,8 +59,15 @@ for _,v in sort_pairs(hashed_claims) do
masked_claims[v] = v + mask
end
for k,v in sort_pairs(masked_claims) do
I.print({k=k,v=v})
I.print({k=k,v=v,vk=masked_claims[k]})
end

masked_claims = { }
for _,v in pairs(claims) do
local h = sha256(v)
masked_claims[h] = v
end
I.print(masked_claims)

print'QSORT Benchmark'

Expand Down

0 comments on commit 9fb2019

Please sign in to comment.