36#include <gtest/gtest.h>
52 resolution.filter = Compiler_Module_Name_Filter::Function;
59 std::ostringstream
out;
61 EXPECT_NE(
out.str().find(
"error[SDK001]: unknown test callee 'add'"), std::string::npos);
62 EXPECT_NE(
out.str().find(
"does not expose that name"), std::string::npos);
75 resolution.filter = Compiler_Module_Name_Filter::Function;
76 resolution.binding.kind = Compiler_Module_Export_Kind::Global;
82 std::ostringstream
out;
84 EXPECT_NE(
out.str().find(
"error[SDK002]: invalid test callee 'add'"), std::string::npos);
85 EXPECT_NE(
out.str().find(
"resolves that name as Global"), std::string::npos);
Reusable diagnostics for top-level inter-module name resolution.
size_t size_t int32_t * out
Diagnostic accumulator and renderer.
void render_plain(std::ostream &out) const
Renders all diagnostics as deterministic plain text.
size_t size() const noexcept
Returns the number of stored diagnostics.
Stores source files and resolves offsets into human-readable data.
Source_File_Id add_virtual_file(const std::string &name, const std::string &text)
Registers an in-memory source file.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Main namespace for Aleph-w library functions.
size_t compiler_emit_module_name_resolution_diagnostic(Diagnostic_Engine &diagnostics, const Source_Span &span, const Compiler_Module_Name_Resolution &resolution, const std::string &code, const std::string &subject)
Emits one structured diagnostic for a module-name resolution failure.
Structured result returned by reusable module-name resolution.
Compiler_Module_Name_Resolution_Status status