Testing that Boost Jam's SORT builtin rule actually sorts correctly.
()
| 18 | ############################################################################### |
| 19 | |
| 20 | def testSORTCorrectness(): |
| 21 | """Testing that Boost Jam's SORT builtin rule actually sorts correctly.""" |
| 22 | t = BoostBuild.Tester(["-ftest.jam", "-d1"], pass_toolset=False, |
| 23 | use_test_config=False) |
| 24 | |
| 25 | t.write("test.jam", """\ |
| 26 | NOCARE all ; |
| 27 | source-data = 1 8 9 2 7 3 4 7 1 27 27 9 98 98 1 1 4 5 6 2 3 4 8 1 -2 -2 0 0 0 ; |
| 28 | target-data = -2 -2 0 0 0 1 1 1 1 1 2 2 27 27 3 3 4 4 4 5 6 7 7 8 8 9 9 98 98 ; |
| 29 | ECHO "starting up" ; |
| 30 | sorted-data = [ SORT $(source-data) ] ; |
| 31 | ECHO "done" ; |
| 32 | if $(sorted-data) != $(target-data) |
| 33 | { |
| 34 | ECHO "Source :" $(source-data) ; |
| 35 | ECHO "Expected :" $(target-data) ; |
| 36 | ECHO "SORT returned:" $(sorted-data) ; |
| 37 | EXIT "SORT error" : -2 ; |
| 38 | } |
| 39 | """) |
| 40 | |
| 41 | t.run_build_system() |
| 42 | t.expect_output_lines("starting up") |
| 43 | t.expect_output_lines("done") |
| 44 | t.expect_output_lines("SORT error", False) |
| 45 | |
| 46 | t.cleanup() |
| 47 | |
| 48 | |
| 49 | ############################################################################### |
no test coverage detected