Skip to content

Commit

Permalink
tests: math/pi/Spigot (TheAlgorithms#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
vil02 authored Oct 16, 2022
1 parent 6e6d4d7 commit d61cee0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions math/pi/spigotpi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,22 @@ func TestSpigot(t *testing.T) {
result string
n int
}{
{"314", 3},
{"31415", 5},
{"314159", 6},
{"31415926535", 11},
{"314159265358", 12},
{"314159265358979323846", 21},
{"314", 3},
{"31415", 5},
{"3141592653589793238462643", 25},
{"314159265358979323846264338327950", 33},
{"31415926535897932384626433832795028841971693993751" +
"05820974944592307816406286208998628034825342117067" +
"98214808651328230664709384460955058223172535940812" +
"84811174502841027019385211055596446229489549303819" +
"64428810975665933446128475648233786783165271201909" +
"14564856692346034861045432664821339360726024914127" +
"37245870066063155881748815209209628292540917153643" +
"678925903600", 362},
}
for _, tv := range tests {
t.Run(strconv.Itoa(tv.n)+":"+tv.result, func(t *testing.T) {
Expand Down

0 comments on commit d61cee0

Please sign in to comment.