Skip to content

Commit

Permalink
Merge pull request #3 from odeke-em/master
Browse files Browse the repository at this point in the history
get_bit: added test cases.
  • Loading branch information
yinqiwen committed Oct 31, 2014
2 parents deca763 + b561d2e commit b01291b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion geohash.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ int geohash_encode(

static inline uint8_t get_bit(uint64_t bits, uint8_t pos)
{
// TODO: Confirm with @yinqiwen if we should instead be using [ bits & (1 << pos) ]
return (bits >> pos) & 0x01;
}

Expand Down
1 change: 1 addition & 0 deletions test-geohash.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ int test_2()

return 0;
}

int main() {
test_1();
test_2();
Expand Down

0 comments on commit b01291b

Please sign in to comment.