How do I write an expected test when the result should be an object?
Write an expression that produces an object, even though the expression looks different from the way that objects print. For example, if you're expecting a lion with 12 teeth who has eaten no one, write new Lion(12, "no one").
The test suite window shows Xes for tests that produce objects.
The test suite does not properly compare object values, so it shows a red X even when your test passes. This red X will not affect your handin grade, because the course staff knows to distrust the red Xes.
For my expected test, I wrote new Lion(12, "no one"), but the actual answer prints as Lion( teeth = 12, ate = "no one").
Your test passed—object results print differently than object expressions. Ignore the red X.
Last update: Monday, November 17th, email@example.com