| {{/* | |
| // Copyright 2024 The Fuchsia Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| */}} | |
| {{- define "Filename:driver/TestBase" -}} | |
| fidl/{{ .LibraryDots }}/cpp/driver/test_base.h | |
| {{- end }} | |
| {{- define "File:driver/TestBase" -}} | |
| {{- UseUnified -}} | |
| {{- SetTransport "Driver" -}} | |
| // WARNING: This file is machine generated by fidlgen. | |
| {{ range $experiment := .Experiments }} | |
| // fidl_experiment = {{ $experiment }} | |
| {{- end }} | |
| #pragma once | |
| #include <{{ .Library | Filename "driver/UnifiedHeader" }}> | |
| #pragma clang diagnostic push | |
| #pragma clang diagnostic ignored "-Wshadow" | |
| {{ range (call .ProtocolsForTransport "Driver") }} | |
| {{ EnsureNamespace "fidl::testing" }} | |
| template<> | |
| class {{ .TestBase.Name }} : public {{ .NaturalServer }} { | |
| public: | |
| virtual ~{{ .TestBase.Name }}() = default; | |
| virtual void NotImplemented_(const std::string& name, ::fidl::CompleterBase& completer) = 0; | |
| {{- range .ClientMethods }} | |
| virtual void {{ .Name }}( | |
| {{- if .HasRequestPayload }} | |
| {{- .NaturalRequestAlias.Self }}& request, | |
| {{- end }} | |
| {{ .NaturalCompleterArg }}& completer | |
| ) override { | |
| NotImplemented_("{{ .Name }}", completer); | |
| } | |
| {{- end }} | |
| }; | |
| {{ end -}} | |
| #pragma clang diagnostic pop | |
| {{ UnsetTransport -}} | |
| {{ EndOfFile }} | |
| {{ end }} |