Skip to content

Commit

Permalink
Merge pull request #13 from jakewilliami/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jakewilliami committed Nov 1, 2020
2 parents 51fcbff + e048afe commit 75cb64f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SpelledOut"
uuid = "4728c690-e668-4265-bc0d-51a8c0f93067"
authors = ["Jake W. Ireland <jakewilliami@icloud.com> and contributors"]
version = "0.1.1"
version = "1.0.1"

[compat]
julia = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/SpelledOut.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function small_convert(number::Integer; british::Bool=false, dict::Symbol=:moder
return word
end

v = 1
v = 0
while v < length(_tens)
d_cap = _tens[v + 1]
d_number = BigInt(20 + 10 * v)
Expand Down
14 changes: 7 additions & 7 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ using Test
@test Spelled_out(1234) == "One thousand, two hundred thirty-four"
@test Spelled_Out(1234) == "One Thousand, Two Hundred Thirty-Four"
@test SPELLED_OUT(1234) == "ONE THOUSAND, TWO HUNDRED THIRTY-FOUR"
@test spelled_out(123456789) == "one hundred thirty-three million, four hundred fifty-six thousand, seven hundred eighty-nine"
@test spelled_out(123456789, british=true) == "one hundred and thirty-three million, four hundred and fifty-six thousand, seven hundred and eighty-nine"
@test spelled_out(123456789) == "one hundred twenty-three million, four hundred fifty-six thousand, seven hundred eighty-nine"
@test spelled_out(123456789, british=true) == "one hundred and twenty-three million, four hundred and fifty-six thousand, seven hundred and eighty-nine"
@test spelled_out(0) == "zero"
@test spelled_out(0, british=true) == "zero"
@test spelled_out(100) == "one hundred"
@test spelled_out(100, british=true) == "one hundred"
@test spelled_out(123456789, british=true, dict=:european) == "one hundred and thirty-three million, four hundred and fifty-six thousand, seven hundred and eighty-nine"
@test spelled_out(123456789, dict=:european) == "one hundred thirty-three million, four hundred fifty-six thousand, seven hundred eighty-nine"
@test spelled_out(123456789, british=true, dict=:british) == "one hundred and thirty-three million, four hundred and fifty-six thousand, seven hundred and eighty-nine"
@test spelled_out(1234567890123, british=true, dict=:british) == "one billion, two hundred and thirty-four thousand million, five hundred and sixty-seven million, eight hundred and ninety thousand, one hundred and thirty-three"
@test spelled_out(1234567890123, british=true, dict=:modern) == "one trillion, two hundred and thirty-four billion, five hundred and sixty-seven million, eight hundred and ninety thousand, one hundred and thirty-three"
@test spelled_out(123456789, british=true, dict=:european) == "one hundred and twenty-three million, four hundred and fifty-six thousand, seven hundred and eighty-nine"
@test spelled_out(123456789, dict=:european) == "one hundred twenty-three million, four hundred fifty-six thousand, seven hundred eighty-nine"
@test spelled_out(123456789, british=true, dict=:british) == "one hundred and twenty-three million, four hundred and fifty-six thousand, seven hundred and eighty-nine"
@test spelled_out(1234567890123, british=true, dict=:british) == "one billion, two hundred and thirty-four thousand million, five hundred and sixty-seven million, eight hundred and ninety thousand, one hundred and twenty-three"
@test spelled_out(1234567890123, british=true, dict=:modern) == "one trillion, two hundred and thirty-four billion, five hundred and sixty-seven million, eight hundred and ninety thousand, one hundred and twenty-three"
end

0 comments on commit 75cb64f

Please sign in to comment.