blob: 9900556cc46b82995d5d4bff4e3cf194065784f8 [file] [log] [blame]
{{- /*
--------------------------------------------------------------------------------
Template file for use with tools/src/cmd/gen to generate diagnostic_control_test.cc
See:
* tools/src/cmd/gen for structures used by this template
* https://golang.org/pkg/text/template/ for documentation on the template syntax
--------------------------------------------------------------------------------
*/ -}}
{{- Import "src/tint/templates/enums.tmpl.inc" -}}
#include <string>
#include "gtest/gtest-spi.h"
#include "src/tint/ast/diagnostic_control.h"
#include "src/tint/ast/test_helper.h"
namespace tint::ast {
namespace {
using DiagnosticControlTest = TestHelper;
TEST_F(DiagnosticControlTest, Assert_RuleNotTemplated) {
EXPECT_FATAL_FAILURE(
{
ProgramBuilder b;
ast::DiagnosticControl control(DiagnosticSeverity::kWarning,
b.Ident("name", "a", "b", "c"));
},
"internal compiler error");
}
namespace diagnostic_severity_tests {
{{ Eval "TestParsePrintEnum" (Sem.Enum "diagnostic_severity")}}
} // namespace diagnostic_severity_tests
namespace diagnostic_rule_tests {
{{ Eval "TestParsePrintEnum" (Sem.Enum "diagnostic_rule")}}
} // namespace diagnostic_rule_tests
} // namespace
} // namespace tint::ast