// Step 1904: CrossLanguageSymbolTable // In-memory symbol table linking same-origin symbols across all generated languages. // A symbol originates from one ABIBoundaryNode; it has appearances in multiple languages. // // t1: inserting a node creates entries for both fromLanguage and toLanguage // t2: lookup by (language, name) returns the correct symbol record // t3: lookup by scipSymbol returns all language appearances of that symbol // t4: multiple nodes with different language pairs all inserted correctly // t5: lookup for unknown symbol returns empty / not-found result #include "CrossLanguageSymbolTable.h" #include "ABIBoundaryExtractor.h" #include #include #include using json = nlohmann::json; 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; }