Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(919)

Unified Diff: mojo/public/interfaces/bindings/tests/sample_service.mojom

Issue 293033005: Mojo: Mojom: Remove default values for structs and arrays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar generator bugs Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/interfaces/bindings/tests/sample_service.mojom
diff --git a/mojo/public/interfaces/bindings/tests/sample_service.mojom b/mojo/public/interfaces/bindings/tests/sample_service.mojom
index d4327a4964cfa234d7f5b4c039db64027be12f47..72f8f1878d3ca4bca9e9f653985391a80feb8579 100644
--- a/mojo/public/interfaces/bindings/tests/sample_service.mojom
+++ b/mojo/public/interfaces/bindings/tests/sample_service.mojom
@@ -34,27 +34,48 @@ struct Foo {
bool c @4;
Bar bar @5;
Bar[] extra_bars @7;
- uint8[] data = [1,2,kThree] @6;
+ uint8[] data @6;
handle<message_pipe> source @9;
handle<data_pipe_consumer>[] input_streams @10;
handle<data_pipe_producer>[] output_streams @11;
- bool[][] array_of_array_of_bools = [[true], [false, true]] @12;
+ bool[][] array_of_array_of_bools @12;
string[][][] multi_array_of_strings @13;
};
struct DefaultsTestInner {
- int32 age @2;
- string[] names = ["Jim"] @1;
- int32 height = 6*12 @3;
+ int32 x = 123 @0;
};
struct DefaultsTest {
- sample.DefaultsTestInner[] people = [{32, ["Bob", "Bobby"]}] @1;
- uint8[] data = [1, 2, 3] @2;
- imported.Point point = {7, 15} @3;
- int32[] shape_masks = [1 << imported.SHAPE_RECTANGLE] @4;
- imported.Thing thing = {imported.SHAPE_CIRCLE, imported.COLOR_BLACK};
- Bar.Type bar_type = Bar.TYPE_BOTH;
+ int8 a0 = -12 @0;
+ uint8 a1 = 12 @1;
+ int16 a2 = 1234 @2;
+ uint16 a3 = 34567 @3;
+ int32 a4 = 123456 @4;
+ // TODO(vtl): crbug.com/375522
+ uint32 a5 /* = 3456789012 */ @5;
+ // TODO(vtl): crbug.com/375522
+ int64 a6 = 111111111111 @6;
+ uint64 a7 /* = 9999999999999999999 */ @7;
+ int32 a8 = 0x12345 @8;
+ int32 a9 = -0x12345 @9;
+ // TODO(vtl): crbug.com/375829
+ int32 a10 /* = 010 */ @10; // Octal.
+ int32 a11 /* = -010 */ @11; // Negative octal.
+ int32 a12 = +1234 @12;
+ bool a13 = true @13;
+ bool a14 = false @14;
+ float a15 = 123.25 @15;
+ double a16 = 1234567890.123 @16;
+ double a17 = 1E10 @17;
+ double a18 = -1.2E+20 @18;
+ double a19 = +1.23E-20 @19;
+
+ // TODO(vtl): Add tests for default vs null when those are implemented (for
+ // structs, arrays, and strings).
+ sample.DefaultsTestInner a20 @20;
+ uint8[] a21 @21;
+ string a22 @22;
};
struct StructWithHoleV1 {
« no previous file with comments | « mojo/public/interfaces/bindings/tests/sample_import2.mojom ('k') | mojo/public/tools/bindings/pylib/mojom/parse/parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698