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
3// found in the LICENSE file.
4
5[JavaPackage="org.chromium.mojo.bindings.test.mojom.test_constants"]
6module mojo.test;
7
8// Integral types.
9const bool kBoolValue = true;
10
11const int8 kInt8Value = -2;
12
13// In the range of (MAX_INT8, MAX_UINT8].
14const uint8 kUint8Value = 128;
15
16// In the range of [MIN_INT16, MIN_INT8).
17const int16 kInt16Value = -233;
18
19// In the range of (MAX_INT16, MAX_UINT16].
20const uint16 kUint16Value = 44204;
21
22// In the range of [MIN_INT32, MIN_INT16).
23const int32 kInt32Value = -44204;
24
25// In the range of (MAX_INT32, MAX_UINT32].
26const uint32 kUint32Value = 4294967295;
27
28// In the range of [MIN_INT64, MIN_INT32).
29const int64 kInt64Value = -9223372036854775807;
30
31// In the range of (MAX_INT64, MAX_UINT64].
32const uint64 kUint64Value = 9999999999999999999;
33
34// Floating point types.
35const double kDoubleValue = 3.14159;
36const double kDoubleInfinity = double.INFINITY;
37const double kDoubleNegativeInfinity = double.NEGATIVE_INFINITY;
38const double kDoubleNaN = double.NAN;
39
40const float kFloatValue = 2.71828;
41const float kFloatInfinity = float.INFINITY;
42const float kFloatNegativeInfinity = float.NEGATIVE_INFINITY;
43const float kFloatNaN = float.NAN;
44
45const string kStringValue = "test string contents";
46
47struct StructWithConstants {
48  const int8 kInt8Value = 5;
49  const float kFloatValue = 765.432;
50  const string kStringValue = "struct test string contents";
51};
52
53interface InterfaceWithConstants {
54  const uint32 kUint32Value = 20100722;
55  const double kDoubleValue = 12.34567;
56  const string kStringValue = "interface test string contents";
57};
58