check50

cs50/problems/2024/x/runoff


:) runoff.c exists

Log
checking that runoff.c exists...

:) runoff compiles

Log
running clang runoff.c -o runoff -std=c11 -ggdb -lm -lcs50...
running clang runoff_test.c -o runoff_test -std=c11 -ggdb -lm -lcs50...

:) vote returns true when given name of candidate

:) vote returns false when given name of invalid candidate

:) vote correctly sets first preference for first voter

:) vote correctly sets third preference for second voter

:) vote correctly sets all preferences for voter

:) tabulate counts votes when all candidates remain in election

:) tabulate counts votes when one candidate is eliminated

:) tabulate counts votes when multiple candidates are eliminated

:) tabulate handles multiple rounds of preferences

:( print_winner prints name when someone has a majority

Cause
print_winner did not print winner of election

:( print_winner returns true when someone has a majority

Cause
print_winner did not print winner and then return true

:( print_winner returns false when nobody has a majority

Cause
print_winner did not return false

:( print_winner returns false when leader has exactly 50% of vote

Cause
print_winner did not return false

:) find_min returns minimum number of votes for candidate

:) find_min returns minimum when all candidates are tied

:) find_min ignores eliminated candidates

:) is_tie returns true when election is tied

:) is_tie returns false when election is not tied

:( is_tie returns false when only some of the candidates are tied

Cause
is_tie did not return false

:) is_tie detects tie after some candidates have been eliminated

:( eliminate eliminates candidate in last place

Cause
eliminate did not eliminate correct candidates

:( eliminate eliminates multiple candidates in tie for last

Cause
eliminate did not eliminate correct candidates

:( eliminate eliminates candidates after some already eliminated

Cause
eliminate did not eliminate correct candidates