// tutorial5.ot
group "tutorial_5";
test_nequal("Verify that 2 integers is not equal", "%d", 32, 42);
test_nequal("Verify that 2 floats is not equal", "%f", 37.1, 37.9);
test_nequal("Verify that 2 strings is not equal", "%s", "Hello", "ello");
test_nequal("Fail Verify that 2 integers is not equal", "%d", 37, 37);
test_nequal("Fail Verify that 2 floats is not equal", "%f", 37.5, 37.5);
test_nequal("Fail Verify that 2 floats is not equal", "%s", "Hello", "Hello");
test_nequal compares two expressions, if they are not equal the test will pass, otherwise it will fail. The first parameter is the name of the test, the second is the type of expressions used.
========================================================================= Opera Testsuite ========================================================================= ========================================================================= E:/src/operaclean/opera-windows7/modules/selftest/documentation/tutorial/tutorial5.ot(2): tutorial_5 ========================================================================= Verify that 2 integers is not equal ........................... Passed Verify that 2 floats is not equal ............................. Passed Verify that 2 strings is not equal ............................ Passed Fail Verify that 2 integers is not equal ...................... FAILED E:/src/operaclean/opera-windows7/modules/selftest/documentation/tutorial/tutorial5.ot(10): 37 should not be equal to 37. Values were '37' Fail Verify that 2 floats is not equal ........................ FAILED E:/src/operaclean/opera-windows7/modules/selftest/documentation/tutorial/tutorial5.ot(12): 37.5 should not be equal to 37.5. Values were '37.500000' Fail Verify that 2 floats is not equal ........................ FAILED E:/src/operaclean/opera-windows7/modules/selftest/documentation/tutorial/tutorial5.ot(14): "Hello" should not be equal to "Hello". Values were 'Hello' ========================================================================= 6 tests run, 3 tests failed, 0 tests skipped, 3 tests OK Place a breakpoint in testsuite_break_here() to debug the failed tests =========================================================================