check50

cs50/problems/2020/x/speller


:) dictionary.c, dictionary.h, and Makefile exist

Log
checking that dictionary.c exists...
checking that dictionary.h exists...

:) speller compiles

Log
running make...
checking that program exited with status 0...

:) handles most basic words properly

Log
running ./speller basic/dict basic/text...
checking for output "MISSPELLED WORDS\n\n\nWORDS MISSPELLED: 0\nWORDS IN DICTIONARY: 8\nWORDS IN TEXT: 9\n"...
checking that program exited with status 0...

:) handles min length (1-char) words

Log
running ./speller min_length/dict min_length/text...
checking for output "MISSPELLED WORDS\n\n\nWORDS MISSPELLED: 0\nWORDS IN DICTIONARY: 1\nWORDS IN TEXT: 1\n"...
checking that program exited with status 0...

:) handles max length (45-char) words

Log
running ./speller max_length/dict max_length/text...
checking for output "MISSPELLED WORDS\n\n\nWORDS MISSPELLED: 0\nWORDS IN DICTIONARY: 1\nWORDS IN TEXT: 1\n"...
checking that program exited with status 0...

:) handles words with apostrophes properly

Log
running ./speller apostrophe/without/dict apostrophe/with/text...
checking for output "MISSPELLED WORDS\n\nfoo's\n\nWORDS MISSPELLED: 1\nWORDS IN DICTIONARY: 1\nWORDS IN TEXT: 1\n"...
checking that program exited with status 0...
running ./speller apostrophe/with/dict apostrophe/without/text...
checking for output "MISSPELLED WORDS\n\nfoo\nfoO\nfOo\nFoo\nfOO\nFoO\nFOo\nFOO\n\nWORDS MISSPELLED: 8\nWORDS IN DICTIONARY: 1\nWORDS IN TEXT: 8\n"...
checking that program exited with status 0...
running ./speller apostrophe/with/dict apostrophe/with/text...
checking for output "MISSPELLED WORDS\n\n\nWORDS MISSPELLED: 0\nWORDS IN DICTIONARY: 1\nWORDS IN TEXT: 1\n"...
checking that program exited with status 0...

:) spell-checking is case-insensitive

Log
running ./speller case/dict case/text...
checking for output "MISSPELLED WORDS\n\n\nWORDS MISSPELLED: 0\nWORDS IN DICTIONARY: 1\nWORDS IN TEXT: 8\n"...
checking that program exited with status 0...

:) handles substrings properly

Log
running ./speller substring/dict substring/text...
checking for output "MISSPELLED WORDS\n\nca\ncats\ncaterpill\ncaterpillars\n\nWORDS MISSPELLED: 4\nWORDS IN DICTIONARY: 2\nWORDS IN TEXT: 6\n"...
checking that program exited with status 0...

:) program is free of memory errors

Log
running valgrind --show-leak-kinds=all --xml=yes --xml-file=/tmp/tmpp7n4o1u9 -- ./speller substring/dict substring/text...
checking for output "MISSPELLED WORDS\n\nca\ncats\ncaterpill\ncaterpillars\n\nWORDS MISSPELLED: 4\nWORDS IN DICTIONARY: 2\nWORDS IN TEXT: 6\n"...
checking that program exited with status 0...
checking for valgrind errors...