phoenix-firestorm/indra/llcommon/tests
Nat Goodspeed 2c894ecb25 DRTVWR-558: Extend LLEventDispatcher::add() overloads.
Add LL::always_return<T>(), which takes a callable and variadic arguments. It
calls the callable with those arguments and, if the returned type is
convertible to T, converts it and returns it. Otherwise it returns T().
always_return() is generalized from, and supersedes,
LLEventDispatcher::ReturnLLSD.

Add LL::function_arity<CALLABLE>, which extends
boost::function_types::function_arity by reporting results for both
std::function<CALLABLE> and boost::function<CALLABLE>. Use for
LL::apply(function, LLSD array) as well as for LLEventDispatcher.

Make LLEventDispatcher::add() overloads uniformly distinguish between a
callable (whether non-static member function or otherwise) that accepts a
single LLSD parameter, versus any other signature. Accepting exactly one LLSD
parameter signals that the callable will accept the composite arguments LLSD
blob, instead of asking LLEventDispatcher to unpack the arguments blob into
individual arguments.

Support add(subclass method) overloads for arbitrary-parameters methods as
well as for (const LLSD&) methods. Update tests accordingly: we need no longer
pass the boilerplate lambda instance getter that binds and returns 'this'.

Extract to the two LLEventDispatcher::make_invoker() overloads the LL::apply()
logic formerly found in ReturnLLSD.

Change lleventdispatcher_test.cpp tests from boost::bind(), which accepts
variadic arguments (even though it only passes a fixed set to the target
callable), to fixed-signature lambdas. This is because the revamped add()
overloads care about signature.

Add a test for a non-static method that accepts (const LLSD&), in other words
the composite arguments LLSD blob, and likewise returns LLSD.

(cherry picked from commit 95b787f7d7226ee9de79dfc9816f33c8bf199aad)
2023-07-13 12:49:09 -04:00
..
StringVec.h
apply_test.cpp DRTVWR-558: Add LL::apply() test for function(const LLSD&). 2023-07-13 12:34:31 -04:00
bitpack_test.cpp
classic_callback_test.cpp
commonmisc_test.cpp
lazyeventapi_test.cpp
listener.h
llallocator_heap_profile_test.cpp
llallocator_test.cpp
llbase64_test.cpp
llcond_test.cpp
lldate_test.cpp
lldeadmantimer_test.cpp
lldependencies_test.cpp
llerror_test.cpp
lleventcoro_test.cpp
lleventdispatcher_test.cpp DRTVWR-558: Extend LLEventDispatcher::add() overloads. 2023-07-13 12:49:09 -04:00
lleventfilter_test.cpp
llexception_test.cpp
llframetimer_test.cpp
llheteromap_test.cpp
llinstancetracker_test.cpp
lllazy_test.cpp
llleap_test.cpp DRTVWR-558: Fix builds on macOS 12.5 Monterey. 2023-07-13 12:32:15 -04:00
llmainthreadtask_test.cpp
llmemtype_test.cpp
llpounceable_test.cpp
llprocess_test.cpp
llprocessor_test.cpp
llprocinfo_test.cpp
llrand_test.cpp
llsdserialize_test.cpp SL-19647: Eliminate LLSDArray entirely. 2023-05-03 17:38:30 -04:00
llsingleton_test.cpp
llstreamqueue_test.cpp
llstring_test.cpp
lltrace_test.cpp
lltreeiterators_test.cpp
llunits_test.cpp
lluri_test.cpp
stringize_test.cpp
threadsafeschedule_test.cpp
tuple_test.cpp
workqueue_test.cpp
wrapllerrs.h DRTVWR-558: Allow directly streaming test helper class CaptureLog. 2023-07-13 12:47:58 -04:00