Extend test generator to generate tests for Float16 http://b/27512382 Extend the test generator to add a short and double field to the Arguments class for Float16 parameters. Input short values get converted to double while initializating the Arguments class and output short values get converted to double before invoking Target.Floaty.couldBe(). Change-Id: I9848cb4b2ba7b79c5b77d849a4c48e827d24f64c
diff --git a/api/Specification.cpp b/api/Specification.cpp index 7afeea4..3b794ad 100644 --- a/api/Specification.cpp +++ b/api/Specification.cpp
@@ -35,7 +35,7 @@ const unsigned int MIN_API_LEVEL = 9; const NumericalType TYPES[] = { - {"f16", "FLOAT_16", "half", "float", FLOATING_POINT, 11, 5}, + {"f16", "FLOAT_16", "half", "short", FLOATING_POINT, 11, 5}, {"f32", "FLOAT_32", "float", "float", FLOATING_POINT, 24, 8}, {"f64", "FLOAT_64", "double", "double", FLOATING_POINT, 53, 11}, {"i8", "SIGNED_8", "char", "byte", SIGNED_INTEGER, 7, 0}, @@ -170,6 +170,7 @@ scanner->error(lineNumber) << "Should have a name.\n"; } variableName += capitalize(specName); + doubleVariableName = variableName + "Double"; } rsAllocName = "gAlloc" + capitalize(variableName); javaAllocName = variableName;