blob: c6110ed952b6ecc446f1cd376c3d6f2f3b441f22 [file] [log] [blame]
// Copyright 2018 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.
package codegen
const testBaseTemplate = `
{{- define "TestBase" -}}
// WARNING: This file is machine generated by fidlgen.
#pragma once
{{ $root := . -}}
{{ range .Headers -}}
#include <{{ . }}/{{ $root.IncludeStem }}.h>
{{ end -}}
#include <{{ .PrimaryHeader }}>
{{- range .Library }}
namespace {{ . }} {
{{- end }}
namespace testing {
{{ "" }}
{{- range .Decls }}
{{- if Eq .Kind Kinds.Protocol }}{{ template "ProtocolTestBase" . }}{{- end }}
{{- end -}}
} // namespace testing
{{- range .LibraryReversed }}
} // namespace {{ . }}
{{- end }}
{{ end }}
`