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

Cause
valgrind tests failed; rerun with --log for more information.

Log
running valgrind --show-leak-kinds=all --xml=yes --xml-file=/tmp/tmpn0focce0 -- ./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...
Use of uninitialised value of size 8: (file: dictionary.c, line: 55)
Use of uninitialised value of size 8: (file: dictionary.c, line: 57)
Use of uninitialised value of size 8: (file: dictionary.c, line: 186)
Conditional jump or move depends on uninitialised value(s): (file: dictionary.c, line: 186)
Use of uninitialised value of size 8: (file: dictionary.c, line: 125)
47 bytes in 6 blocks are definitely lost in loss record 1 of 2: (file: dictionary.c, line: 110)
552 bytes in 1 blocks are still reachable in loss record 2 of 2: (file: dictionary.c, line: 150)