Skip to content

Commit

Permalink
relaxed assertion on not found random addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
dvv committed Oct 20, 2012
1 parent 24d2b60 commit 8ed5cbc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ for i = 1, #profiles do
if i % 1e4 == 0 then
print("#", i, "of", num_queries)
end
assert(geodb:query_by_ipnum(cases[i], p.field))
local result, err = geodb:query_by_ipnum(cases[i], p.field)
if not result and err ~= "not found" then
error(err)
end
end

print(
Expand Down Expand Up @@ -253,7 +256,10 @@ for i = 1, #profiles do
if i % 1e4 == 0 then
print("#", i, "of", num_queries)
end
assert(geodb:query_by_name(cases[i], p.field))
local result, err = geodb:query_by_name(cases[i], p.field)
if not result and err ~= "not found" then
error(err)
end
end

print(
Expand Down

0 comments on commit 8ed5cbc

Please sign in to comment.