191d538470c011e19fa4375cc3531b5dd9ae01d55George Mount/* 291d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * Copyright (C) 2015 The Android Open Source Project 391d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * 491d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * Licensed under the Apache License, Version 2.0 (the "License"); 591d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * you may not use this file except in compliance with the License. 691d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * You may obtain a copy of the License at 791d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * 891d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * http://www.apache.org/licenses/LICENSE-2.0 991d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * 1091d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * Unless required by applicable law or agreed to in writing, software 1191d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * distributed under the License is distributed on an "AS IS" BASIS, 1291d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1391d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * See the License for the specific language governing permissions and 1491d538470c011e19fa4375cc3531b5dd9ae01d55George Mount * limitations under the License. 1591d538470c011e19fa4375cc3531b5dd9ae01d55George Mount */ 1691d538470c011e19fa4375cc3531b5dd9ae01d55George Mountpackage android.databinding.testapp; 1791d538470c011e19fa4375cc3531b5dd9ae01d55George Mount 1891d538470c011e19fa4375cc3531b5dd9ae01d55George Mountimport android.databinding.testapp.databinding.GenericViewBinding; 1991d538470c011e19fa4375cc3531b5dd9ae01d55George Mountimport android.test.UiThreadTest; 2091d538470c011e19fa4375cc3531b5dd9ae01d55George Mount 2191d538470c011e19fa4375cc3531b5dd9ae01d55George Mountpublic class GenericViewTest extends BaseDataBinderTest<GenericViewBinding> { 2291d538470c011e19fa4375cc3531b5dd9ae01d55George Mount 2391d538470c011e19fa4375cc3531b5dd9ae01d55George Mount public GenericViewTest() { 2491d538470c011e19fa4375cc3531b5dd9ae01d55George Mount super(GenericViewBinding.class); 2591d538470c011e19fa4375cc3531b5dd9ae01d55George Mount } 2691d538470c011e19fa4375cc3531b5dd9ae01d55George Mount 2791d538470c011e19fa4375cc3531b5dd9ae01d55George Mount @UiThreadTest 2891d538470c011e19fa4375cc3531b5dd9ae01d55George Mount public void testCast() throws Throwable { 2991d538470c011e19fa4375cc3531b5dd9ae01d55George Mount initBinder(); 3091d538470c011e19fa4375cc3531b5dd9ae01d55George Mount // There used to be a compile error when the View was generic 3191d538470c011e19fa4375cc3531b5dd9ae01d55George Mount assertNotNull(getBinder().view); 3291d538470c011e19fa4375cc3531b5dd9ae01d55George Mount } 3391d538470c011e19fa4375cc3531b5dd9ae01d55George Mount} 34