chromium/mojo/public/cpp/bindings/tests/default_construct_unittest.test-mojom

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module mojo.test.default_construct.mojom;

// This set of files is just to ensure that a mojom type can be typemapped
// to a non-default-constructible C++ type.
struct TestStruct {
  int32 value;
};

struct TestStructContainer {
  TestStruct test_struct;
};

struct OptionalTestStructContainer {
  TestStruct? test_struct;
};

interface TestInterface {
  TestMethod(TestStruct in) => (TestStruct out);

  TestMethodWithMap(map<uint8, TestStruct> in, uint8 idx) => (TestStruct out);

  TestMethodWithArray(array<TestStruct> in, uint8 idx) => (TestStruct out);

  TestMethodWithFixedArray(array<TestStruct, 2> in, uint8 idx) => (TestStruct out);
};