1/* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17#include "shared.rsh" 18 19struct Simple { 20 int I; 21 long L; 22}; 23 24struct Simple simple; 25 26void checkSimple(int argI, long argL) { 27 bool failed = false; 28 29 rsDebug("argI ", argI); 30 rsDebug("simple.I ", simple.I); 31 rsDebug("argL.lo ", (unsigned)argL & ~0U); 32 rsDebug("simple.L.lo", (unsigned)simple.L & ~0U); 33 rsDebug("argL.hi ", (unsigned)((ulong)argL >> 32)); 34 rsDebug("simple.L.hi", (unsigned)((ulong)simple.L >> 32)); 35 36 _RS_ASSERT(simple.I == argI); 37 _RS_ASSERT(simple.L == argL); 38 39 if (failed) { 40 rsDebug("struct_field_simple FAILED", 0); 41 rsSendToClientBlocking(RS_MSG_TEST_FAILED); 42 } 43 else { 44 rsDebug("struct_field_simple PASSED", 0); 45 rsSendToClientBlocking(RS_MSG_TEST_PASSED); 46 } 47} 48