Update of /cvsroot/boost/boost/tools/build/v2/util
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12079/tools/build/v2/util
Modified Files:
Tag: RC_1_34_0
assert.jam
Log Message:
(merge from head) Add result-equal test which passes when the expected and
result have the same elements.
Index: assert.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/util/assert.jam,v
retrieving revision 1.11
retrieving revision 1.11.18.1
diff -u -d -r1.11 -r1.11.18.1
--- assert.jam 19 Feb 2003 15:57:25 -0000 1.11
+++ assert.jam 24 Oct 2006 16:01:20 -0000 1.11.18.1
@@ -36,6 +36,35 @@
}
}
+rule .set.equal ( set1 * : set2 * )
+{
+ if ( $(set1) in $(set2) ) && ( $(set2) in $(set1) )
+ {
+ return true ;
+ }
+}
+
+# assert that EXPECTED is equal to the result of calling RULE-NAME with the
+# given arguments
+rule result-equal ( expected * : rule-name args * : * )
+{
+ local result ;
+ module [ CALLER_MODULE ]
+ {
+ modules.poke assert : result
+ : [ $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] ;
+ }
+
+ if ! [ .set.equal $(result) : $(expected) ]
+ {
+ error-skip-frames 3 assertion failure: "[" $(rule-name)
+ [ lol->list $(args) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9)
]
+ "]"
+ : expected: \"$(expected)\"
+ : got: \"$(result)\" ;
+ }
+}
+
# assert that the given variable is nonempty.
rule nonempty-variable ( name )
{
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs