[yast-devel] Assert::Equal(happy_developer, better_tests);
Hi, hackers, as you know, currently yast2-testsuite does little to help you write good tests. See a test suite which recently acquired a new test: (hey, I was young and stupid!) https://github.com/yast/yast-nfs-server/blob/1e4975d1b8c616683c0e25f1797e030... https://github.com/yast/yast-nfs-server/blob/1e4975d1b8c616683c0e25f1797e030... However, things are improving. Please use Assert, available in yast2.rpm since SP2 I think: Assert::Equal(any expected, any actual); Assert::EqualMsg(any expected, any actual, string logged_if_it_fails); https://github.com/yast/yast-yast2/blob/master/library/modules/Assert.ycp That way you get a much better output for a failed test than true -true +false true Enjoy, and send comments, wishes and patches for even better testing! -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
participants (1)
-
Martin Vidner