diff options
author | Stephen Hines <srhines@google.com> | 2015-07-24 16:45:36 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2015-07-27 13:04:30 -0700 |
commit | 648a1c137663ef7207684d0d7009dd5518942111 (patch) | |
tree | deb2260741dc70a883a4811282e5725e0f68f9a8 /java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/UT_unsigned.java | |
parent | 697efc125b3a9844602551ff1de11f275761e584 (diff) | |
download | rs-648a1c137663ef7207684d0d7009dd5518942111.tar.gz |
Prepare for arm64 prebuilts of RS support library.
Bug: 22693954
This change fixes update_rs_prebuilts.sh to build for arm64 as well. It
also makes some changes to RSTest_CompatLib for working on arm64 (i.e.
removed APIs, etc.). The old version of RSTest_CompatLib is retained as
RSTest_CompatLibLegacy, but it is disabled from building due to errors
with mma and FORCE_BUILD_RS_COMPAT. We also now need to ensure we
properly build all the required libraries (both .so and .a files).
Change-Id: If89b8a542eb0d61db0ba186d4e3221bcc6e5664b
Diffstat (limited to 'java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/UT_unsigned.java')
-rw-r--r-- | java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/UT_unsigned.java | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/UT_unsigned.java b/java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/UT_unsigned.java new file mode 100644 index 00000000..d2fb5f32 --- /dev/null +++ b/java/tests/RSTest_CompatLibLegacy/src/com/android/rs/test/UT_unsigned.java @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2013 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 com.android.rs.test_compatlegacy; + +import android.content.Context; +import android.content.res.Resources; +import android.support.v8.renderscript.*; + +public class UT_unsigned extends UnitTest { + private Resources mRes; + + protected UT_unsigned(RSTestCore rstc, Resources res, Context ctx) { + super(rstc, "Unsigned", ctx); + mRes = res; + } + + private boolean initializeGlobals(ScriptC_unsigned s) { + short pUC = s.get_uc(); + if (pUC != 5) { + return false; + } + s.set_uc((short)129); + + long pUI = s.get_ui(); + if (pUI != 37) { + return false; + } + s.set_ui(0x7fffffff); + + return true; + } + + public void run() { + RenderScript pRS = RenderScript.create(mCtx); + ScriptC_unsigned s = new ScriptC_unsigned(pRS); + pRS.setMessageHandler(mRsMessage); + if (!initializeGlobals(s)) { + failTest(); + } else { + s.invoke_unsigned_test(); + pRS.finish(); + waitForMessage(); + } + pRS.destroy(); + } +} |