Skip to content

hc219417/Codewars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Codewars

The Supermarket Queue (6 kyu)

Simple Consecutive Pairs (7 kyu)

Powers of i (7 kyu)

Gravity Flip (8 kyu)

Basic Statement Coverage in Unit Testing (retired)

Test the count_ballot() function thoroughly. There is nothing to return. Your function should do all the calls to the 'count_ballot()' function needed to obtain full statement coverage for this function as listed in the problem description. This function takes one parameter - ballot, which is a string that contains the name of the person that was voted for.

Test coverage will be measured automatically.

void test_count_ballot(std::string (*count_ballot)(std::string s)) {

count_ballot("trump & biden"); //should return "Invalid"

count_ballot("trump"); //should return "Trump"

count_ballot("biden"); //should return "Biden"

count_ballot("green"); //should return "Green"

count_ballot(""); //should return "None"

}

Releases

No releases published

Packages

No packages published