check50

cs50/problems/2024/x/speller


:) dictionary.c exists

Log
checking that dictionary.c exists...

:) speller compiles

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

:( handles most basic words properly

Cause
expected "MISSPELLED WOR...", not "MISSPELLED WOR..."

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"...

Expected Output:
MISSPELLED WORDS


WORDS MISSPELLED:     0
WORDS IN DICTIONARY:  8
WORDS IN TEXT:        9
Actual Output:
MISSPELLED WORDS

The
quick
brown
fox
jumps
over
the
lazy
dog

:( handles min length (1-char) words

Cause
expected "MISSPELLED WOR...", not "MISSPELLED WOR..."

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"...

Expected Output:
MISSPELLED WORDS


WORDS MISSPELLED:     0
WORDS IN DICTIONARY:  1
WORDS IN TEXT:        1
Actual Output:
MISSPELLED WORDS

a

WORDS MISSPELLED:     1
WORDS IN DICTIONARY:  1
WORDS IN TEXT:        1

:( handles max length (45-char) words

Cause
expected "MISSPELLED WOR...", not "MISSPELLED WOR..."

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"...

Expected Output:
MISSPELLED WORDS


WORDS MISSPELLED:     0
WORDS IN DICTIONARY:  1
WORDS IN TEXT:        1
Actual Output:
MISSPELLED WORDS

pneumonoultramicroscopicsilicovolcanoconiosis

:( handles words with apostrophes properly

Cause
expected "MISSPELLED WOR...", not "MISSPELLED WOR..."

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"...

Expected Output:
MISSPELLED WORDS

foo's

WORDS MISSPELLED:     1
WORDS IN DICTIONARY:  1
WORDS IN TEXT:        1
Actual Output:
MISSPELLED WORDS

foo's

:( spell-checking is case-insensitive

Cause
expected "MISSPELLED WOR...", not "MISSPELLED WOR..."

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"...

Expected Output:
MISSPELLED WORDS


WORDS MISSPELLED:     0
WORDS IN DICTIONARY:  1
WORDS IN TEXT:        8
Actual Output:
MISSPELLED WORDS

foo
foO
fOo
Foo
fOO
FoO
FOo
FOO

:( handles substrings properly

Cause
expected "MISSPELLED WOR...", not "MISSPELLED WOR..."

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"...

Expected Output:
MISSPELLED WORDS

ca
cats
caterpill
caterpillars

WORDS MISSPELLED:     4
WORDS IN DICTIONARY:  2
WORDS IN TEXT:        6
Actual Output:
MISSPELLED WORDS

ca
cats
caterpill
caterpillars

:| program is free of memory errors

Cause
can't check until a frown turns upside down