marks failed case as failed

I wasn't marking the test case properly. Now it not only handles
unexpected errors, but also marks the test case appropriately.