# BST-TIMEOUT: 120 . "$BST_LIB" # libsigc++-3 3.6.0 (BRINTOS-1854) -- the C++17 rewrite of the sigc++ typesafe # callback framework: signals, slots, connections, trackable auto-disconnect, # and the functor adaptors (bind, hide, bind_return, mem_fun, ptr_fun). # # A SEPARATE PACKAGE FROM libsigc++-2.0, NOT AN UPGRADE OF IT. Different ABI, # different headers (sigc++-3.0/ against sigc++-2.0/), different library name # (libsigc-3.0 against libsigc-2.0) and a different pkg-config module -- the two # are designed to coexist on one image with each consumer picking one. Section 2 # asserts that non-collision on the paths rather than assuming it. # # The recipe is meta-oe's own (recipes-core/libsigc++-2.0/libsigc++-3_3.6.0.bb, # `inherit setuptools3 meson`) and takes NO patch and NO site answer. Its # bbappend carries four distro/machine overrides and no libsigc++ fix: the qemu # exe-wrapper off, the C++ driver + brintos-libcxx in, static-only, and the # example/test EXECUTABLES off (an executable draws meson's default link line, # which carries --as-needed and --no-undefined, and wasm-ld implements neither). # Recipe scope: 1658 of 1658 tasks, zero ERROR lines. # # --------------------------------------------------------------------------- # WHY THERE IS A PROBE. # # This is a -dev/-staticdev port: it ships headers and /usr/lib/libsigc-3.0.a # and no program, so a shell test on its own can only say the files are there. # For a CALLBACK FRAMEWORK that is not coverage. Its failure mode is calling the # WRONG slot, calling it the wrong NUMBER of times, or -- the one that matters # most -- calling a slot whose trackable subject has already been destroyed. # None of those crash reliably; on a 32-bit target the last returns a plausible # wrong answer as easily as it traps. So data/libsigcpp3-probe (source in # src/libsigcpp3_probe.cpp) is cross-linked with wasmc++-glibc against THE VERY # ARCHIVE THAT SHIPS, and RUNS here. Sections 1-3 assert the payload; sections # 4-8 assert the library. # # The link's own census is part of the evidence and was recorded at port time: # coroutinized=610 refused=0, OUTPUT-VALIDITY transformed=610 # invalid_functions=0 module_broken=0, artifact 2937266 bytes. sigc's emit # paths (signal_impl::sweep, signal_base::connect, the typed slot_call # instantiations) are in the coroutinized set, so the probe is aimed at # transformed code rather than at a passthrough. # # --------------------------------------------------------------------------- # EXCEPTIONS ARE OFF ON THIS ARM, and that bounds what this port ships. # brintos-libcxx sets BRINTOS_CXX_EXCEPTIONS = "0" (the exceptions-ON libc++ # does not link -- brintos/hwjs-cc#10), so the C++ driver compiles -fno- # exceptions. sigc::exception_catch() is therefore an adaptor whose whole point # is unreachable here: it wraps a functor in a try/catch, and nothing on this # image can throw. The header still SHIPS and still parses -- section 3 asserts # both, because a consumer reading the package contents has no other way to find # out -- and the probe does not exercise it. That is a platform bound recorded # as one, not a libsigc++ defect and not a gap in this suite. # # --------------------------------------------------------------------------- # EVERY EXPECTED VALUE BELOW IS A MEASURED ONE. The identical probe source # compiled with `g++ -std=c++17 -fno-exceptions -Os` on x86_64, against the # same 3.6.0 release, scores 39/39 and produces every value asserted here. # # The five ABI sizes are the only arm-dependent readings, so they are asserted # as MULTIPLES OF sizeof(void*) rather than as byte counts nobody had measured # on wasm32 when this was written -- the multiple is the fact a consumer cares # about (a signal is two words, a connection one), and the raw byte counts are # still printed to the console beside it. P-SIZEOF-REMAINDERS is what makes the # multiples honest: it is 0 only if every one of the five really is a whole # number of words. # # The x86_64 control corrected two readings of mine before it passed, and both # are recorded because both are the kind of thing that would otherwise be # guessed wrong in the same direction next time: # # - the accumulator form is `sigc::signal::accumulated`, not # `sigc::signal` -- the latter names an incomplete type and # does not compile; # - sigc::hide drops exactly ONE argument, so a nullary functor reaches a # ONE-argument signal through a single hide() and not a two-argument one. nl=' ' has() { case "$3" in *"$2"*) bst_ok "$1" ;; *) bst_notok "$1" "not found: $2" ;; esac; } incd=/usr/include/sigc++-3.0 sigcd=$incd/sigc++ cfgh=/usr/lib/sigc++-3.0/include/sigc++config.h pc=/usr/lib/pkgconfig/sigc++-3.0.pc lib=/usr/lib/libsigc-3.0.a # --------------------------------------------------------------------------- # 1. The payload. check libsigc++-3/inc-dir test -d "$incd" check libsigc++-3/sigc-dir test -d "$sigcd" check libsigc++-3/umbrella-hdr test -f "$sigcd/sigc++.h" check libsigc++-3/signal-hdr test -f "$sigcd/signal.h" check libsigc++-3/slot-hdr test -f "$sigcd/functors/slot.h" check libsigc++-3/trackable-hdr test -f "$sigcd/trackable.h" check libsigc++-3/scoped-conn-hdr test -f "$sigcd/scoped_connection.h" check libsigc++-3/config-hdr test -f "$cfgh" check libsigc++-3/pkgconfig test -f "$pc" check libsigc++-3/archive test -f "$lib" # 41 headers under ${includedir}/sigc++-3.0 -- the count upstream's filelist.am # installs. A recipe that dropped a subdirectory (adaptors/, functors/, # tuple-utils/) would still satisfy every existence check above. nh=$(find "$incd" -type f 2>/dev/null | grep -c .) check_eq libsigc++-3/header-count "41" "$nh" # The three subdirectories, named so a missing one is attributable rather than # just a wrong total. check_eq libsigc++-3/adaptors-count "14" "$(find "$sigcd/adaptors" -type f 2>/dev/null | grep -c .)" check_eq libsigc++-3/functors-count "6" "$(find "$sigcd/functors" -type f 2>/dev/null | grep -c .)" check_eq libsigc++-3/tuple-utils-count "5" "$(find "$sigcd/tuple-utils" -type f 2>/dev/null | grep -c .)" # The config header is installed under ${libdir}, NOT ${includedir}: it records # choices made at build time and is therefore per-arch, which is why upstream # splits it out and why the .pc carries a second -I for it. A port that "tidied" # it into ${includedir} would break every multilib consumer and pass everything # above. check libsigc++-3/config-under-libdir test -f /usr/lib/sigc++-3.0/include/sigc++config.h check_eq libsigc++-3/no-config-in-includedir "0" \ "$(find "$incd" -name sigc++config.h 2>/dev/null | grep -c .)" # Static-only is distro policy. bst_lib_shape says nothing about whether a .so # exists -- it says that whatever IS shipped is usable -- so this passes both # before and after BRINTOS-1740 converts a recipe. bst_lib_shape libsigc++-3/lib-shape '/usr/lib/libsigc-3.0*.so*' # --------------------------------------------------------------------------- # 2. NO COLLISION WITH libsigc++-2.0. # # The two versions are designed to coexist, and every path this package uses is # version-qualified for that reason. These cases assert the qualification is # real rather than assumed: a build that installed the 3.x headers into a bare # sigc++/ or named the archive libsigc.a would work perfectly on an image with # no 2.0 on it -- and would collide the day one arrives. check_eq libsigc++-3/no-unqualified-incdir "0" \ "$(find /usr/include -maxdepth 1 -name 'sigc++' 2>/dev/null | grep -c .)" check_eq libsigc++-3/no-unqualified-archive "0" \ "$(find /usr/lib -maxdepth 1 -name 'libsigc.a' 2>/dev/null | grep -c .)" check_eq libsigc++-3/no-unqualified-pc "0" \ "$(find /usr/lib/pkgconfig -maxdepth 1 -name 'sigc++.pc' 2>/dev/null | grep -c .)" # These two cases were written as an absence -- "libsigc++-2.0 is not on this # image yet" -- to fire the day one was ported and send the reader to the three # coexistence cases above. It fired on the batch that ported this package: # BRINTOS-1853 put libsigc++-2.0 on the same image, the three cases above came # back green, and the tripwire had done its whole job. It is spent, and an # absence assertion left standing here would be a permanent red that closing no # ticket can ever clear. # # So it is inverted into the invariant it was protecting: 3.x keeps its own # version-qualified archive and include directory. Deliberately NOT "2.0 is # present" -- that would couple this suite to another package's image entry and # redden it if 2.0 were ever dropped, which is not this port's business. check_eq libsigc++-3/coexist-3-0-archive "1" \ "$(find /usr/lib -maxdepth 1 -name 'libsigc-3.0.a' 2>/dev/null | grep -c .)" check_eq libsigc++-3/coexist-3-0-headers "1" \ "$(find /usr/include -maxdepth 1 -name 'sigc++-3.0' 2>/dev/null | grep -c .)" # --------------------------------------------------------------------------- # 3. The integration surface: what a consumer compiles and links against. pctext=$(cat "$pc" 2>/dev/null) has libsigc++-3/pc-name "Name: libsigc++" "$pctext" has libsigc++-3/pc-version "Version: 3.6.0" "$pctext" has libsigc++-3/pc-libs "-lsigc-3.0" "$pctext" # BOTH include paths, and the second is the load-bearing one: sigc++config.h is # under ${libdir}, so a consumer given only ${includedir}/sigc++-3.0 fails on # the very first #include of the umbrella header. has libsigc++-3/pc-cflags-include "-I\${includedir}/sigc++-3.0" "$pctext" has libsigc++-3/pc-cflags-libconfig "-I\${libdir}/sigc++-3.0/include" "$pctext" # A build-tree path leaking into a shipped .pc is invisible to every check above. case "$pctext" in *"/usr/src/debug"*|*"/build/tmp"*|*"/workdir"*|*"/recipe-sysroot"*) pcl=leak ;; *) pcl=clean ;; esac check_eq libsigc++-3/pc-no-buildpath "clean" "$pcl" cfgtext=$(cat "$cfgh" 2>/dev/null) has libsigc++-3/cfg-major "#define SIGCXX_MAJOR_VERSION 3" "$cfgtext" has libsigc++-3/cfg-minor "#define SIGCXX_MINOR_VERSION 6" "$cfgtext" has libsigc++-3/cfg-micro "#define SIGCXX_MICRO_VERSION 0" "$cfgtext" # The deprecated API is BUILT IN on this image (build-deprecated-api defaults # true and the bbappend does not turn it off), so the macro that would omit it # must be undefined. A consumer reads exactly this to decide. case "$cfgtext" in *"#define SIGCXX_DISABLE_DEPRECATED"*) dep=disabled ;; *) dep=enabled ;; esac check_eq libsigc++-3/deprecated-api-built "enabled" "$dep" # exception_catch.h ships and is reachable from the umbrella header even though # nothing on this image can throw (see the header note). Both halves are # asserted: that the file is there, and that adaptors.h still pulls it in -- so # a consumer who reads the package contents and concludes the adaptor is # available is reading something true about the files, and section 8's note is # what tells them it cannot fire. check libsigc++-3/exception-catch-hdr test -f "$sigcd/adaptors/exception_catch.h" has libsigc++-3/exception-catch-included "exception_catch.h" \ "$(cat "$sigcd/adaptors/adaptors.h" 2>/dev/null)" # --------------------------------------------------------------------------- # 4. The archive's contents. # # C++ symbols are mangled, so unlike a C library this cannot be derived from the # header. The names below are the five translation units' public entry points -- # the ones a consumer's link actually resolves -- each named for what it is, so # a red says which half of the library is missing rather than "a symbol". arc=$(grep -ao '_ZN\?K\?4sigc[A-Za-z0-9_]*' "$lib" 2>/dev/null) has libsigc++-3/sym-signal-connect \ "_ZN4sigc11signal_base7connectEONS_9slot_baseE" "$arc" has libsigc++-3/sym-signal-connect-first \ "_ZN4sigc11signal_base13connect_firstEONS_9slot_baseE" "$arc" has libsigc++-3/sym-connection-disconnect \ "_ZN4sigc10connection10disconnectEv" "$arc" has libsigc++-3/sym-connection-block \ "_ZN4sigc10connection5blockEb" "$arc" has libsigc++-3/sym-slot-base-disconnect \ "_ZN4sigc9slot_base10disconnectEv" "$arc" # The auto-disconnect machinery: trackable's destructor-time notification and # the signal's sweep of the slots it invalidated. These two ARE the behaviour # section 6 measures, and a build that dropped trackable.cc.o would fail here # and nowhere else in this section. has libsigc++-3/sym-trackable-notify \ "_ZN4sigc9trackable16notify_callbacksEv" "$arc" has libsigc++-3/sym-signal-impl-sweep \ "_ZN4sigc8internal11signal_impl5sweepEv" "$arc" # scoped_connection is 3.x-only -- it does not exist in libsigc++-2.0 -- so it # is also the archive-level statement that this is the 3.x library. has libsigc++-3/sym-scoped-connection-release \ "_ZN4sigc17scoped_connection7releaseEv" "$arc" # All five compiled translation units are in the archive. Upstream's # sigc++/meson.build lists exactly these; a partial compile would leave the # archive linkable for some consumers and not others. for m in connection.cc.o scoped_connection.cc.o signal_base.cc.o \ trackable.cc.o functors_slot_base.cc.o; do case "$(grep -ao "$m" "$lib" 2>/dev/null)" in "") bst_notok "libsigc++-3/member-$m" "not in $lib" ;; *) bst_ok "libsigc++-3/member-$m" ;; esac done # --------------------------------------------------------------------------- # 5-8. The library RUNNING, via the cross-linked probe. probe=${TMPDIR:-/tmp}/bst-libsigcpp3-probe.$$ check libsigc++-3/probe-shipped test -f "$BST_DATA/libsigcpp3-probe" if cp "$BST_DATA/libsigcpp3-probe" "$probe" 2>/dev/null && chmod +x "$probe" 2>/dev/null; then bst_ok libsigc++-3/probe-stage out=$("$probe" 2>&1); prc=$? # Parse every P- line in ONE pass. No forks in the loop: the runner's # per-suite bound is a budget in process spawns, not in cases. P_CXXSTD=; P_EXC=; P_PTRB=; P_SZTB= P_MAJ=; P_MIN=; P_MIC=; P_DEPD= P_SZSIG=; P_SZSLOT=; P_SZCONN=; P_SZSCOPED=; P_SZTRACK= P_WSIG=; P_WSLOT=; P_WCONN=; P_WSCOPED=; P_WTRACK=; P_REM= P_EMPTY=; P_SZ1=; P_CALLS1=; P_CALLS2=; P_SZ3= P_ORDC=; P_ORDF=; P_CONNB=; P_CONNA=; P_ORDD=; P_SZD= P_BLK=; P_ORDBLK=; P_SZBLK=; P_ORDUNBLK= P_SCIN=; P_SCAFT=; P_SCSZ= P_MFSEEN=; P_TRALIVE=; P_TRDEAD=; P_TRCALLS= P_DEFACC=; P_SUMACC=; P_CNTACC=; P_SUMARGS= P_BIND=; P_HIDE=; P_BRET=; P_BRETC=; P_MFARG= P_SLEMPTY=; P_SLCALL=; P_SLCOPY=; P_SLDEF= P_CHECKS=; P_FAILURES=; P_RESULT= oIFS=$IFS; IFS="$nl" for line in $out; do tag=${line%% *}; val=${line#* } case "$tag" in P-CXXSTD) P_CXXSTD=$val ;; P-CXX-EXCEPTIONS) P_EXC=$val ;; P-PTR-BITS) P_PTRB=$val ;; P-SIZE-T-BITS) P_SZTB=$val ;; P-SIGCXX-MAJOR) P_MAJ=$val ;; P-SIGCXX-MINOR) P_MIN=$val ;; P-SIGCXX-MICRO) P_MIC=$val ;; P-SIGCXX-DEPRECATED-DISABLED) P_DEPD=$val ;; P-SIZEOF-SIGNAL-VOID) P_SZSIG=$val ;; P-SIZEOF-SLOT-VOID) P_SZSLOT=$val ;; P-SIZEOF-CONNECTION) P_SZCONN=$val ;; P-SIZEOF-SCOPED-CONNECTION) P_SZSCOPED=$val ;; P-SIZEOF-TRACKABLE) P_SZTRACK=$val ;; P-WORDS-SIGNAL-VOID) P_WSIG=$val ;; P-WORDS-SLOT-VOID) P_WSLOT=$val ;; P-WORDS-CONNECTION) P_WCONN=$val ;; P-WORDS-SCOPED-CONNECTION) P_WSCOPED=$val ;; P-WORDS-TRACKABLE) P_WTRACK=$val ;; P-SIZEOF-REMAINDERS) P_REM=$val ;; P-EMPTY-BEFORE) P_EMPTY=$val ;; P-SIZE-AFTER-ONE) P_SZ1=$val ;; P-ONE-SLOT-CALLS) P_CALLS1=$val ;; P-ONE-SLOT-CALLS-AFTER-OPERATOR) P_CALLS2=$val ;; P-SIZE-THREE) P_SZ3=$val ;; P-ORDER-CONNECT) P_ORDC=$val ;; P-ORDER-CONNECT-FIRST) P_ORDF=$val ;; P-CONNECTED-BEFORE) P_CONNB=$val ;; P-CONNECTED-AFTER) P_CONNA=$val ;; P-ORDER-AFTER-DISCONNECT) P_ORDD=$val ;; P-SIZE-AFTER-DISCONNECT) P_SZD=$val ;; P-BLOCKED) P_BLK=$val ;; P-ORDER-WHILE-BLOCKED) P_ORDBLK=$val ;; P-SIZE-WHILE-BLOCKED) P_SZBLK=$val ;; P-ORDER-AFTER-UNBLOCK) P_ORDUNBLK=$val ;; P-SCOPED-IN-SCOPE) P_SCIN=$val ;; P-SCOPED-AFTER-SCOPE) P_SCAFT=$val ;; P-SCOPED-SIZE-AFTER) P_SCSZ=$val ;; P-MEMFUN-SEEN) P_MFSEEN=$val ;; P-TRACKABLE-SIZE-ALIVE) P_TRALIVE=$val ;; P-TRACKABLE-SIZE-DEAD) P_TRDEAD=$val ;; P-TRACKABLE-CALLS-AFTER-DEATH) P_TRCALLS=$val ;; P-DEFAULT-ACCUM-RESULT) P_DEFACC=$val ;; P-SUM-ACCUM-RESULT) P_SUMACC=$val ;; P-COUNT-ACCUM-RESULT) P_CNTACC=$val ;; P-SUM-ACCUM-ARGS) P_SUMARGS=$val ;; P-BIND-RESULT) P_BIND=$val ;; P-HIDE-RESULT) P_HIDE=$val ;; P-BIND-RETURN-RESULT) P_BRET=$val ;; P-BIND-RETURN-CALLS) P_BRETC=$val ;; P-MEMFUN-ARG-RESULT) P_MFARG=$val ;; P-SLOT-EMPTY) P_SLEMPTY=$val ;; P-SLOT-CALL) P_SLCALL=$val ;; P-SLOT-COPY-CALL) P_SLCOPY=$val ;; P-SLOT-DEFAULT-EMPTY) P_SLDEF=$val ;; P-CHECKS) P_CHECKS=$val ;; P-FAILURES) P_FAILURES=$val ;; P-RESULT) P_RESULT=$val ;; esac done IFS=$oIFS # The probe's own verdict first. Its 39 internal assertions are a whole-run # gate; the named cases below are what makes a red attributable without a # rebuild, and both have to hold. check_eq libsigc++-3/probe-rc "0" "$prc" check_eq libsigc++-3/probe-result "OK" "$P_RESULT" check_eq libsigc++-3/probe-failures "0" "$P_FAILURES" # A lower bound, not the exact count: a later ticket adding a probe assertion # should not redden this suite, but a probe that silently stopped emitting # should. if [ -n "$P_CHECKS" ] && [ "$P_CHECKS" -ge 39 ] 2>/dev/null; then bst_ok libsigc++-3/probe-check-count else bst_notok libsigc++-3/probe-check-count "probe reported '$P_CHECKS' checks, want >= 39" fi # ------------------------------------------------------------------------ # 5. The tripwire: the compile-time state every value below was measured # under. A red here does not by itself mean a regression -- it means the # toolchain or the package configuration moved and everything after it would # have to be re-measured rather than merely re-read. check_eq libsigc++-3/cxxstd "201703" "$P_CXXSTD" # 0 is the DISTRO's state, asserted rather than assumed: the C++ driver # compiles -fno-exceptions because the exceptions-ON libc++ does not link # (brintos/hwjs-cc#10). This is the case that makes the exception_catch note # in section 3 a measurement instead of a claim. check_eq libsigc++-3/cxx-exceptions "0" "$P_EXC" check_eq libsigc++-3/ptr-bits "32" "$P_PTRB" check_eq libsigc++-3/size-t-bits "32" "$P_SZTB" # The version the PROBE compiled against, from the installed config header -- # a distinct statement from section 3's, which reads the file as text. A skew # between the installed header and the installed archive shows up as these two # disagreeing. check_eq libsigc++-3/probe-version "3.6.0" "$P_MAJ.$P_MIN.$P_MIC" check_eq libsigc++-3/probe-deprecated-disabled "0" "$P_DEPD" # The ABI shapes, as multiples of a word (see the header note). x86_64 reads # 16/16/8/8/8 bytes for the five and the SAME multiples; the byte counts are # on the console beside these. check_eq libsigc++-3/words-signal "2" "$P_WSIG" check_eq libsigc++-3/words-slot "2" "$P_WSLOT" check_eq libsigc++-3/words-connection "1" "$P_WCONN" check_eq libsigc++-3/words-scoped-connection "1" "$P_WSCOPED" check_eq libsigc++-3/words-trackable "1" "$P_WTRACK" # 0 == every one of the five is a whole number of words, which is what makes # the five multiples above facts rather than truncations. check_eq libsigc++-3/sizeof-remainders "0" "$P_REM" # ------------------------------------------------------------------------ # 6. Connect, emit, ordering, disconnect, block, scope. check_eq libsigc++-3/signal-empty-before "1" "$P_EMPTY" check_eq libsigc++-3/size-after-one "1" "$P_SZ1" check_eq libsigc++-3/one-slot-calls "1" "$P_CALLS1" # emit() and operator() are the same call; a build where one of them became a # no-op would pass every existence check and half the cases here. check_eq libsigc++-3/operator-is-emit "2" "$P_CALLS2" check_eq libsigc++-3/size-three "3" "$P_SZ3" # CONNECTION ORDER IS CALL ORDER. A container change upstream would keep every # count-based case green and break every consumer that depends on it. check_eq libsigc++-3/order-connect "abc" "$P_ORDC" check_eq libsigc++-3/order-connect-first "cab" "$P_ORDF" check_eq libsigc++-3/connected-before "1" "$P_CONNB" check_eq libsigc++-3/connected-after-disconnect "0" "$P_CONNA" check_eq libsigc++-3/order-after-disconnect "b" "$P_ORDD" check_eq libsigc++-3/size-after-disconnect "1" "$P_SZD" # BLOCKING IS NOT DISCONNECTION -- the slot stays in the list and comes back. # The size case is what separates the two: a consumer that conflated them # would see the same emit result for one state and not the other. check_eq libsigc++-3/blocked-flag "1" "$P_BLK" check_eq libsigc++-3/order-while-blocked "c" "$P_ORDBLK" check_eq libsigc++-3/size-while-blocked "2" "$P_SZBLK" check_eq libsigc++-3/order-after-unblock "bc" "$P_ORDUNBLK" # scoped_connection is the 3.x RAII arm and has no libsigc++-2.0 counterpart. check_eq libsigc++-3/scoped-in-scope "a" "$P_SCIN" check_eq libsigc++-3/scoped-after-scope "none" "$P_SCAFT" check_eq libsigc++-3/scoped-size-after "0" "$P_SCSZ" # ------------------------------------------------------------------------ # 7. Trackable auto-disconnect -- the headline behaviour. # # Emitting a signal after the slot's subject has been destroyed must be safe # and must call nothing. A framework that merely stored the object pointer # would call into freed storage; on this target that returns a plausible # wrong answer at least as readily as it traps, which is why it is measured # in three separate cases rather than inferred from "it did not crash". check_eq libsigc++-3/memfun-called-while-alive "1" "$P_MFSEEN" check_eq libsigc++-3/trackable-size-alive "1" "$P_TRALIVE" check_eq libsigc++-3/trackable-size-after-death "0" "$P_TRDEAD" check_eq libsigc++-3/trackable-calls-after-death "none" "$P_TRCALLS" # ------------------------------------------------------------------------ # 8. Return values, accumulators and adaptors. # With NO accumulator, emit() yields the LAST connected slot's value; the # earlier slots still RUN and their values are discarded. check_eq libsigc++-3/default-accumulator "3" "$P_DEFACC" # The accumulated form: 1 + 2 + 3, folded by the suite's own accumulator. check_eq libsigc++-3/sum-accumulator "6" "$P_SUMACC" # A second accumulator that counts rather than sums -- so a "6" arrived at by # some path other than visiting each slot once would not also produce a "2". check_eq libsigc++-3/count-accumulator "2" "$P_CNTACC" # (3+4) twice: the arguments reach every slot unchanged. check_eq libsigc++-3/sum-accumulator-args "14" "$P_SUMARGS" check_eq libsigc++-3/bind "15" "$P_BIND" check_eq libsigc++-3/hide "2" "$P_HIDE" check_eq libsigc++-3/bind-return "42" "$P_BRET" # bind_return substitutes the RETURN VALUE and still calls the wrapped # functor; without this case a bind_return that dropped the call entirely # would look identical. check_eq libsigc++-3/bind-return-still-calls "1" "$P_BRETC" check_eq libsigc++-3/mem-fun-with-arg "42" "$P_MFARG" check_eq libsigc++-3/slot-not-empty "0" "$P_SLEMPTY" check_eq libsigc++-3/slot-call "42" "$P_SLCALL" # A copied slot is an independent, still-callable slot. check_eq libsigc++-3/slot-copy-call "3" "$P_SLCOPY" check_eq libsigc++-3/slot-default-empty "1" "$P_SLDEF" else bst_notok libsigc++-3/probe-stage "cannot stage $BST_DATA/libsigcpp3-probe" fi rm -f "$probe"