blob: 8a98055d5faab5fa015775fc19678ede940fe473 [file] [log] [blame]
Yifan Hongab407f02016-08-12 17:39:44 -07001package android.hardware.tests.expression@1.0;
2
3@hal_type(type="LIGHT")
4
5interface IExpression {
6 enum int_literals : int32_t {
7 literal = 4,
8 literalL = -4L,
9 simpleArithmetic = 4 + 1,
10 simpleIdentifier = literalL,
11 simpleIdentifier2 = literalL + simpleArithmetic,
12 boolExpr = 1 == 7 && !((3 != 4 || (2 < 3 <= 3 > 4)) >= 0),
13 bitExpr = ~42 & (1 << 3 | 16 >> 2) ^ 7,
14 arithmeticExpr = 2 + 3 - 4 * -7 / (10 % 3),
15 messyExpr = 2 + (-3&4 / 7),
16 paranExpr = (((((1 + 1))))),
17 ternary = 1?2:3,
18 ternary2 = 1&&2?3:4,
19 complicatedTernary2 = 1 - 1 && 2 + 3 || 5 ? 7 * 8 : -3
20 };
21 // const float SIMPLE_FLOAT1 = 1e20;
22 // const float SIMPLE_FLOAT2 = 1e-10L;
23 // const float SIMPLE_FLOAT3 = 1.;
24 // const float SIMPLE_FLOAT4 = 1.e-2;
25 // const float SIMPLE_FLOAT5 = 3.1416;
26 // const float SIMPLE_FLOAT6 = .5f;
27 // const float SIMPLE_FLOAT7 = 0.5e-3L;
28 // struct expressionist_t {
29 // uint8_t[1 << 10] buffer;
30 // };
31 // @param(name = "mask", normal = 1 << 5)
32 // setExpression(expressionist_t state, int32_t mask) generates (int32_t ret);
33};