check50

cs50/problems/2024/x/mario/more


:) mario.c exists

Log
checking that mario.c exists...

:) mario.c compiles

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

:) rejects a height of -1

Log
running ./mario...
sending input -1...
checking that input was rejected...

:) rejects a height of 0

Log
running ./mario...
sending input 0...
checking that input was rejected...

:( handles a height of 1 correctly

Cause
expected ""#  #"", not ""#  #""
did you add too much trailing whitespace to the end of your pyramid?

Log
running ./mario...
sending input 1...

Expected Output:
#  #
Actual Output:
#  #

:( handles a height of 2 correctly

Cause
expected "" #  #"\n"##  ...", not "" #  #"\n"##  ..."
did you add too much trailing whitespace to the end of your pyramid?

Log
running ./mario...
sending input 2...

Expected Output:
 #  #
##  ##
Actual Output:
 #  #
##  ##

:( handles a height of 8 correctly

Cause
expected ""       #  #"\...", not ""       #  #"\..."
did you add too much trailing whitespace to the end of your pyramid?

Log
running ./mario...
sending input 8...

Expected Output:
       #  #
      ##  ##
     ###  ###
    ####  ####
   #####  #####
  ######  ######
 #######  #######
########  ########
Actual Output:
       #  #
      ##  ##
     ###  ###
    ####  ####
   #####  #####
  ######  ######
 #######  #######
########  ########

:( rejects a height of -1, and then accepts a height of 2

Cause
expected "" #  #"\n"##  ...", not "" #  #"\n"##  ..."
did you add too much trailing whitespace to the end of your pyramid?

Log
running ./mario...
sending input -1...
checking that input was rejected...
sending input 2...

Expected Output:
 #  #
##  ##
Actual Output:
 #  #
##  ##

:) rejects a non-numeric height of "foo"

Log
running ./mario...
sending input foo...
checking that input was rejected...

:) rejects a non-numeric height of ""

Log
running ./mario...
sending input ...
checking that input was rejected...