cbe590cb9f
Bug: 31110244 Change-Id: I7ce63f940199e8cd7d193bdde39fc6cd448db802
49 lines
1.7 KiB
Text
49 lines
1.7 KiB
Text
/*
|
|
* Copyright (C) 2016 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
package android.hardware.tests.expression@1.0;
|
|
|
|
@hal_type(type="LIGHT")
|
|
|
|
interface IExpression {
|
|
enum int_literals : int32_t {
|
|
literal = 4,
|
|
literalL = -4L,
|
|
simpleArithmetic = 4 + 1,
|
|
simpleIdentifier = literalL,
|
|
simpleIdentifier2 = literalL + simpleArithmetic,
|
|
boolExpr = 1 == 7 && !((3 != 4 || (2 < 3 <= 3 > 4)) >= 0),
|
|
bitExpr = ~42 & (1 << 3 | 16 >> 2) ^ 7,
|
|
arithmeticExpr = 2 + 3 - 4 * -7 / (10 % 3),
|
|
messyExpr = 2 + (-3&4 / 7),
|
|
paranExpr = (((((1 + 1))))),
|
|
ternary = 1?2:3,
|
|
ternary2 = 1&&2?3:4,
|
|
complicatedTernary2 = 1 - 1 && 2 + 3 || 5 ? 7 * 8 : -3
|
|
};
|
|
// const float SIMPLE_FLOAT1 = 1e20;
|
|
// const float SIMPLE_FLOAT2 = 1e-10L;
|
|
// const float SIMPLE_FLOAT3 = 1.;
|
|
// const float SIMPLE_FLOAT4 = 1.e-2;
|
|
// const float SIMPLE_FLOAT5 = 3.1416;
|
|
// const float SIMPLE_FLOAT6 = .5f;
|
|
// const float SIMPLE_FLOAT7 = 0.5e-3L;
|
|
// struct expressionist_t {
|
|
// uint8_t[1 << 10] buffer;
|
|
// };
|
|
// @param(name = "mask", normal = 1 << 5)
|
|
// setExpression(expressionist_t state, int32_t mask) generates (int32_t ret);
|
|
};
|