From: Robert Dober Date: 2009-06-13T08:03:44+09:00 Subject: Re: [QUIZ] Matrix Rotator (#209) --001636c5adfe320d8a046c2eb893 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Fri, Jun 12, 2009 at 8:34 PM, Daniel Moore wrote: > On Fri, Jun 12, 2009 at 11:06 AM, wrote: >> 2009/6/12 Daniel Moore : >>> I have attached the following test suite for your convenience: >>> =A0 =A0 =A0 =A0assert_equal Matrix.rotate(square), square_rotated >>> =A0 =A0 =A0 =A0assert_equal Matrix.rotate(rectangle), rectangle_rotated >> >> Shouldn't that be?: >> >> assert_equal square_rotated, Matrix.rotate(square) >> assert_equal rectangle_rotated, Matrix.rotate(rectangle) >> >> :-) >> > > That's what I thought at first, and how I originally had it, but the > docs on TestUnit specify: > > =A0 =A0assert_equal(expected, actual, message=3Dnil) > > In this situation square_rotated is the expected result and > Matrix.rotate(square) is the actual result that the quiz solution > generates. Wait a second, maybe I am completely confused, but that is exactly what brabuhr said no?,... But as all my tests pass it does not matter ;). This somehow coincides with the specs I have attached, with Daniel's kind permission. It is interesting to notice how each of the three test tools avoids that kind of confusion in three different ways. Cheers Robert --=20 Toutes les grandes personnes ont d=92abord =E9t=E9 des enfants, mais peu d=92entre elles s=92en souviennent. All adults have been children first, but not many remember. [Antoine de Saint-Exup=E9ry] --001636c5adfe320d8a046c2eb893 Content-Type: application/x-gzip; name="more-tests.tgz" Content-Disposition: attachment; filename="more-tests.tgz" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fvvi7scz0 H4sIAPHdMkoAA+2X0W7aMBSGc81THHHTVULUThPQkNgb7GaadoMq5AQPollktZ2qk/rws5M0TRzT lAsYa88n4ZBj7HN8ZP2/kLlmOsv3a/Wbp1OZBCeAGGZRZJ90HpP200JpSAM7RDEl9DYOzDCjUQDk FMW4FEozCRDIPOFSH/7d0Px/iuT3RSY5XKlcFPYiXI1GG65SmSUcxt/q2zGGTT4CyDSM1Y4JAdJO cFD3BZNc1dNQv8MSVuUrwIpMgE7AjORu0o1RN0b8sXJtGarGVqJ1VcbGSUjekpD6CzuU8CvTMnuc Vgk/Vemvp2qXF8KkXzoFmSV8b0df0yRPNdtvRatvTcjTOrdk2qutWX2gH7S7RbcvAydt9m4ftpew Pq/9/OsLjRyFfNb/By6zn39O4gCD+h/Na/2PZ3Ni4jQKyQz1/xx49L8JCZZE9PONznOhbqr7Ydzh R/ml5w0PdfiD+oObcOl3jLYxeDt24ebg2c096YtjoCtcPo3+a670aeR/UP/DedTo/y0Nrf6TOET9 Pwev6X95JYzify+vhn3L9tue8Nv4YdmHJ6MZqhAant65A1THnKY7nv6CBZvAgj+a/9Qall+cYswU S3XBhJ0atAlPf7sm4bb4svyi3ZSk05Replf6gqaCIAiCIAiCIAiCIAiCIAiCIEfwF2oxuwEAKAAA --001636c5adfe320d8a046c2eb893--