blob: 1adc9ab04ed2b0a2484b881a8811f3f047f658d6 [file] [log] [blame] [edit]
{{- /*
--------------------------------------------------------------------------------
Template file for use with tools/src/cmd/gen to generate interpolate_attribute_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 "src/tint/ast/interpolate_attribute.h"
#include <string>
#include "src/tint/ast/test_helper.h"
#include "src/tint/utils/string.h"
namespace tint::ast {
namespace {
using InterpolateAttributeTest = TestHelper;
TEST_F(InterpolateAttributeTest, Creation) {
auto* d =
create<InterpolateAttribute>(InterpolationType::kLinear, InterpolationSampling::kCenter);
EXPECT_EQ(InterpolationType::kLinear, d->type);
EXPECT_EQ(InterpolationSampling::kCenter, d->sampling);
}
namespace interpolation_type_tests {
{{ Eval "TestParsePrintEnum" (Sem.Enum "interpolation_type")}}
} // namespace interpolation_type_tests
namespace interpolation_sampling_tests {
{{ Eval "TestParsePrintEnum" (Sem.Enum "interpolation_sampling")}}
} // namespace interpolation_sampling_tests
} // namespace
} // namespace tint::ast