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

Side by Side Diff: mojo/public/interfaces/bindings/tests/test_constants.mojom

Issue 2637393002: Make mojom-generated C++ string constants really constant. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_constants"] 5 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_constants"]
6 module mojo.test; 6 module mojo.test;
7 7
8 // Integral types. 8 // Integral types.
9 const bool kBoolValue = true; 9 const bool kBoolValue = true;
10 10
(...skipping 24 matching lines...) Expand all
35 const double kDoubleValue = 3.14159; 35 const double kDoubleValue = 3.14159;
36 const double kDoubleInfinity = double.INFINITY; 36 const double kDoubleInfinity = double.INFINITY;
37 const double kDoubleNegativeInfinity = double.NEGATIVE_INFINITY; 37 const double kDoubleNegativeInfinity = double.NEGATIVE_INFINITY;
38 const double kDoubleNaN = double.NAN; 38 const double kDoubleNaN = double.NAN;
39 39
40 const float kFloatValue = 2.71828; 40 const float kFloatValue = 2.71828;
41 const float kFloatInfinity = float.INFINITY; 41 const float kFloatInfinity = float.INFINITY;
42 const float kFloatNegativeInfinity = float.NEGATIVE_INFINITY; 42 const float kFloatNegativeInfinity = float.NEGATIVE_INFINITY;
43 const float kFloatNaN = float.NAN; 43 const float kFloatNaN = float.NAN;
44 44
45 const string kStringValue = "test string contents";
46
45 struct StructWithConstants { 47 struct StructWithConstants {
46 const int8 kInt8Value = 5; 48 const int8 kInt8Value = 5;
47 const float kFloatValue = 765.432; 49 const float kFloatValue = 765.432;
50 const string kStringValue = "struct test string contents";
48 }; 51 };
49 52
50 interface InterfaceWithConstants { 53 interface InterfaceWithConstants {
51 const uint32 kUint32Value = 20100722; 54 const uint32 kUint32Value = 20100722;
52 const double kDoubleValue = 12.34567; 55 const double kDoubleValue = 12.34567;
56 const string kStringValue = "interface test string contents";
53 }; 57 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698