summaryrefslogtreecommitdiff
path: root/mojo/public/interfaces/bindings/tests/test_wtf_types.mojom
blob: 183f184ef342049bee3c5742bdeeaa5eee7c2dd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module mojo.test;

struct TestWTFCodeGeneration {
  string str;
  string? nullable_str;
  array<string> strs;
  array<string?> nullable_strs;
  array<array<int32>> arrays;
  array<bool> bools;
  array<handle<message_pipe>> handles;
  map<string, string?> str_map;
  map<int32, array<int32>> array_map;
  map<int32, handle<message_pipe>> handle_map;
  array<map<string, string?>> str_maps;
};

union TestWTFCodeGeneration2 {
  string str;
  array<string> strs;
  map<string, string?> str_map;
};

struct TestWTFStruct {
  enum NestedEnum {
    E0,
    E1,
  };
  string str;
  int32 integer;
};

interface TestWTF {
  enum NestedEnum {
    E0,
    E1,
  };
  EchoString(string? str) => (string? str);
  EchoStringArray(array<string?>? arr) => (array<string?>? arr);
  EchoStringMap(map<string, string?>? str_map)
      => (map<string, string?>? str_map);
};

enum TopLevelEnum {
  E0,
  E1,
};