sarathsp06 / dsalgogym

Cracking The Coding Interview - Problem, Solutions and Discussions
MIT License
9 stars 6 forks source link

problems/test: add test case #5

Closed sarathsp06 closed 5 years ago

sarathsp06 commented 5 years ago

Lot of problem/solutions does not have test cases .

Following is the coverage

sarath.pillai@OF-CLIENT-195  ~/projects/ctci   master  go test ./... -cover                                                                                                                                        ✔  10031  11:18:26
ok      github.com/sarathsp06/ctci/problems/datastructures/arrays-and-strings   (cached)    coverage: 100.0% of statements
ok      github.com/sarathsp06/ctci/problems/datastructures/linkedlists  (cached)    coverage: 28.0% of statements
ok      github.com/sarathsp06/ctci/problems/other/brackets  (cached)    coverage: 100.0% of statements
?       github.com/sarathsp06/ctci/problems/other/jumpsteps [no test files]
?       github.com/sarathsp06/ctci/problems/other/largersmaller [no test files]
?       github.com/sarathsp06/ctci/problems/other/romannumber   [no test files]
?       github.com/sarathsp06/ctci/problems/other/splitip   [no test files]
?       github.com/sarathsp06/ctci/problems/other/triplet   [no test files]
ok      github.com/sarathsp06/ctci/problems/other/watercapacity (cached)    coverage: 100.0% of statements
sarathsp06 commented 5 years ago
bash-3.2$ go test ./... -cover | column -t
ok  github.com/sarathsp06/ctci/problems/datastructures/arrays-and-strings  (cached)  coverage:  100.0%  of  statements
ok  github.com/sarathsp06/ctci/problems/datastructures/linkedlists         (cached)  coverage:  28.0%   of  statements
ok  github.com/sarathsp06/ctci/problems/other/brackets                     (cached)  coverage:  100.0%  of  statements
ok  github.com/sarathsp06/ctci/problems/other/idleserver                   (cached)  coverage:  100.0%  of  statements
?   github.com/sarathsp06/ctci/problems/other/jumpsteps                    [no       test       files]
?   github.com/sarathsp06/ctci/problems/other/largersmaller                [no       test       files]
ok  github.com/sarathsp06/ctci/problems/other/largestprimefactor           (cached)  coverage:  100.0%  of  statements
?   github.com/sarathsp06/ctci/problems/other/romannumber                  [no       test       files]
?   github.com/sarathsp06/ctci/problems/other/splitip                      [no       test       files]
?   github.com/sarathsp06/ctci/problems/other/triplet                      [no       test       files]
ok  github.com/sarathsp06/ctci/problems/other/watercapacity                (cached)  coverage:  100.0%  of  statements