// Step 1919: LSPCapabilityNegotiator // Tracks per-source capability sets; gates routing on capability support. // // t1: registerSource and supports // t2: shouldRoute blocks unsupported method; passes unknown methods // t3: capabilitiesFor returns sorted capability list // t4: sourcesSupporting finds all sources with a given capability // t5: unregistered source supports nothing; shouldRoute passes unknown sources #include "LSPCapabilityNegotiator.h" #include namespace ws = whetstone; static int p=0,f=0; #define T(n) { std::cout<<" "<<#n<<"... "; } #define P() { std::cout<<"PASS\n"; ++p; } #define F(m) { std::cout<<"FAIL: "< 0 ? 1 : 0; }