Skip to content

Commit

Permalink
Merge pull request #7 from fummicc1/refactor-test
Browse files Browse the repository at this point in the history
Refactor test code.
  • Loading branch information
fummicc1 authored Dec 8, 2024
2 parents caee0dc + 0002820 commit 5750591
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions Tests/GeoHashFrameworkTests/GeoHashTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,14 @@ struct GeoHashTests {
@Test
func makeGeoHashFromBinary() async throws {
let input = "01101010011010100110"
let expectedLat = "1000100010"
let expectedLng = "0111011101"
let geoHash = GeoHash(
binary: input,
precision: .exact(digits: 20)
)
#expect(geoHash.geoHash == "e9p6")
#expect(geoHash.geoHash.count == input.count / 5)
}

@Test
func makeFromBinary() async throws {
let input = "01101010011010100110"

let expectedLat = "1000100010"
let expectedLng = "0111011101"

let geoHash = GeoHash(
binary: input,
precision: .exact(
digits: 20
)
)
#expect(geoHash.latitudeBits == expectedLat)
#expect(geoHash.longitudeBits == expectedLng)
}
Expand Down

0 comments on commit 5750591

Please sign in to comment.