| {{/* |
| // Copyright 2023 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:TestBase" -}} |
| fidl/{{ .LibraryDots }}/cpp/test_base.h |
| {{- end }} |
| |
| |
| {{- define "File:TestBase" -}} |
| {{- UseUnified -}} |
| {{- SetTransport "Channel" -}} |
| // WARNING: This file is machine generated by fidlgen. |
| {{ range $experiment := .Experiments }} |
| // fidl_experiment = {{ $experiment }} |
| {{- end }} |
| |
| #pragma once |
| |
| #include <{{ .Library | Filename "UnifiedHeader" }}> |
| |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wshadow" |
| |
| {{ range (call .ProtocolsForTransport "Channel") }} |
| {{ 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 |
| ) { |
| NotImplemented_("{{ .Name }}", completer); |
| } |
| {{- end }} |
| }; |
| {{ end -}} |
| |
| #pragma clang diagnostic pop |
| |
| {{ UnsetTransport -}} |
| {{ EndOfFile }} |
| {{ end }} |