Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/assert-equal.jam @ 32

Last change on this file since 32 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 1.0 KB
Line 
1# Copyright 2001 Dave Abrahams
2# Distributed under the Boost Software License, Version 1.0.
3# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
4
5# Evaluates [ rulename arg1... : arg2... : ... : argN... ] and compares the
6# result to expected-results. If there is a mismatch, prints an error message
7# and exits.
8rule assert-equal ( expected-results *
9    : rulename a1 * :  a2 * : a3 * : a4 * : a5 * : a6 * : a7 * : a8 * : a9 * )
10{
11
12    local results = [ $(rulename) $(a1) : $(a2) : $(a3)
13                        : $(a4) : $(a5) : $(a6) : $(a7) : $(a8) ] ;
14                     
15    if $(results) != $(expected-results)
16    {
17        EXIT ******ASSERTION FAILURE******* "
18    [ $(rulename) " $(a1)
19        ": "$(a2[1]) $(a2[2-])
20        ": "$(a3[1]) $(a3[2-])
21        ": "$(a4[1]) $(a4[2-])
22        ": "$(a5[1]) $(a5[2-])
23        ": "$(a6[1]) $(a6[2-])
24        ": "$(a7[1]) $(a7[2-])
25        ": "$(a8[1]) $(a8[2-]) "]
26expected:
27    (" $(expected-results) ")
28result was:
29    (" $(results) ")"
30       ;
31   
32    }
33}
Note: See TracBrowser for help on using the repository browser.