11ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines/*
21ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines * Copyright (C) 2010 The Android Open Source Project
31ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines *
41ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines * Licensed under the Apache License, Version 2.0 (the "License");
51ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines * you may not use this file except in compliance with the License.
61ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines * You may obtain a copy of the License at
71ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines *
81ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines *      http://www.apache.org/licenses/LICENSE-2.0
91ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines *
101ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines * Unless required by applicable law or agreed to in writing, software
111ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines * distributed under the License is distributed on an "AS IS" BASIS,
121ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
131ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines * See the License for the specific language governing permissions and
141ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines * limitations under the License.
151ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines */
161ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines
171ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hinespackage com.android.rs.test;
181ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines
191ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hinesimport android.content.Context;
201ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hinesimport android.content.res.Resources;
211ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hinesimport android.renderscript.*;
221ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines
231ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hinespublic class UT_rstime extends UnitTest {
241ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines    private Resources mRes;
251ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines
261ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines    protected UT_rstime(RSTestCore rstc, Resources res, Context ctx) {
271ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines        super(rstc, "rsTime", ctx);
281ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines        mRes = res;
291ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines    }
301ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines
311ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines    public void run() {
321ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines        RenderScript pRS = RenderScript.create(mCtx);
3358b2b2412864891686bf0e2c9940ad2b58808822Stephen Hines        ScriptC_rstime s = new ScriptC_rstime(pRS);
341ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines        pRS.setMessageHandler(mRsMessage);
35d2f561d183f6f2aab19cd8552d83b32cbc7fa5beStephen Hines        s.setTimeZone("America/Los_Angeles");
361ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines        s.invoke_test_rstime(0, 0);
371ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines        pRS.finish();
381ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines        waitForMessage();
391ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines        pRS.destroy();
401ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines    }
411ac9da6717f27ecfd3c650bd1bfd84d336674dfcStephen Hines}
42