summaryrefslogtreecommitdiff
path: root/mojo/public/interfaces/bindings/tests/test_constants.mojom
diff options
context:
space:
mode:
authorHidehiko Abe <hidehiko@google.com>2018-04-23 20:01:13 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-04-23 20:01:13 -0700
commited7128dca79cff94e99465e3c1bc31d91d83c76d (patch)
treebd2d04362f66c36d4279f7a9735ba21ea3a2a021 /mojo/public/interfaces/bindings/tests/test_constants.mojom
parentd6187ab7d79d95d101c2ecb83aa98c05bcdcccd1 (diff)
parent0ab20ac2283987e63b0e7c1318db2a5cf7c668d2 (diff)
downloadlibchrome-ed7128dca79cff94e99465e3c1bc31d91d83c76d.tar.gz
Migrate libmojo repository into libchrome, part 2. am: b268b43ac6
am: 0ab20ac228 Change-Id: I1b1afe0c902f1d122b100f5bf56d1df4a94eb090
Diffstat (limited to 'mojo/public/interfaces/bindings/tests/test_constants.mojom')
-rw-r--r--mojo/public/interfaces/bindings/tests/test_constants.mojom57
1 files changed, 57 insertions, 0 deletions
diff --git a/mojo/public/interfaces/bindings/tests/test_constants.mojom b/mojo/public/interfaces/bindings/tests/test_constants.mojom
new file mode 100644
index 0000000000..272e6035a6
--- /dev/null
+++ b/mojo/public/interfaces/bindings/tests/test_constants.mojom
@@ -0,0 +1,57 @@
+// Copyright 2015 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.
+
+[JavaPackage="org.chromium.mojo.bindings.test.mojom.test_constants"]
+module mojo.test;
+
+// Integral types.
+const bool kBoolValue = true;
+
+const int8 kInt8Value = -2;
+
+// In the range of (MAX_INT8, MAX_UINT8].
+const uint8 kUint8Value = 128;
+
+// In the range of [MIN_INT16, MIN_INT8).
+const int16 kInt16Value = -233;
+
+// In the range of (MAX_INT16, MAX_UINT16].
+const uint16 kUint16Value = 44204;
+
+// In the range of [MIN_INT32, MIN_INT16).
+const int32 kInt32Value = -44204;
+
+// In the range of (MAX_INT32, MAX_UINT32].
+const uint32 kUint32Value = 4294967295;
+
+// In the range of [MIN_INT64, MIN_INT32).
+const int64 kInt64Value = -9223372036854775807;
+
+// In the range of (MAX_INT64, MAX_UINT64].
+const uint64 kUint64Value = 9999999999999999999;
+
+// Floating point types.
+const double kDoubleValue = 3.14159;
+const double kDoubleInfinity = double.INFINITY;
+const double kDoubleNegativeInfinity = double.NEGATIVE_INFINITY;
+const double kDoubleNaN = double.NAN;
+
+const float kFloatValue = 2.71828;
+const float kFloatInfinity = float.INFINITY;
+const float kFloatNegativeInfinity = float.NEGATIVE_INFINITY;
+const float kFloatNaN = float.NAN;
+
+const string kStringValue = "test string contents";
+
+struct StructWithConstants {
+ const int8 kInt8Value = 5;
+ const float kFloatValue = 765.432;
+ const string kStringValue = "struct test string contents";
+};
+
+interface InterfaceWithConstants {
+ const uint32 kUint32Value = 20100722;
+ const double kDoubleValue = 12.34567;
+ const string kStringValue = "interface test string contents";
+};