mirror of
https://github.com/boostorg/build.git
synced 2026-02-17 01:32:12 +00:00
52 lines
1.2 KiB
Plaintext
52 lines
1.2 KiB
Plaintext
#~ Copyright 2006 Rene Rivera.
|
|
#~ Distributed under the Boost Software License, Version 1.0.
|
|
#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
fail-count = 0 ;
|
|
pass-count = 0 ;
|
|
|
|
rule message ( message * )
|
|
{
|
|
local b = [ BACKTRACE ] ;
|
|
ECHO "$(b[-4]):$(b[-3]):" $(message) ;
|
|
}
|
|
rule fail ( message * )
|
|
{
|
|
fail-count = [ CALC $(fail-count) + 1 ] ;
|
|
message "error:" [FAILED] $(message) ;
|
|
}
|
|
rule pass ( message * )
|
|
{
|
|
pass-count = [ CALC $(pass-count) + 1 ] ;
|
|
if --verbose in $(ARGV)
|
|
{
|
|
message "info:" [PASSED] $(message) ;
|
|
}
|
|
}
|
|
rule assert ( expected * : test ? : obtained * )
|
|
{
|
|
test ?= "(==)" ;
|
|
local r = 0 ;
|
|
if $(test) = "(==)" && "*$(expected)*" != "*$(obtained)*"
|
|
{
|
|
fail '$(expected)' $(test) '$(obtained)' ;
|
|
}
|
|
else if $(test) = "(!=)" && "*$(expected)*" = "*$(obtained)*"
|
|
{
|
|
fail '$(expected)' $(test) '$(obtained)' ;
|
|
}
|
|
else
|
|
{
|
|
pass '$(expected)' $(test) '$(obtained)' ;
|
|
}
|
|
}
|
|
|
|
include builtin_shell.jam ;
|
|
include builtin_w32_getregnames.jam ;
|
|
include parallel_actions.jam ;
|
|
include stress_var_expand.jam ;
|
|
include target_var.jam ;
|
|
include var_expand.jam ;
|
|
|
|
EXIT --- Complete: PASSED($(pass-count)) *FAILED($(fail-count))* : $(fail-count) ;
|