FileDocCategorySizeDatePackage
WeightSumTest.javaAPI DocAndroid 5.1 API1752Thu Mar 12 22:22:12 GMT 2015android.widget.layout.linear

WeightSumTest

public class WeightSumTest extends android.test.ActivityInstrumentationTestCase

Fields Summary
private android.view.View
mChild
private android.view.View
mContainer
Constructors Summary
public WeightSumTest()

        super("com.android.frameworks.coretests", WeightSum.class);
    
Methods Summary
protected voidsetUp()

        super.setUp();

        final Activity activity = getActivity();
        mChild = activity.findViewById(R.id.child);
        mContainer = activity.findViewById(R.id.container);
    
public voidtestLayout()

        final int childWidth = mChild.getWidth();
        final int containerWidth = mContainer.getWidth();

        assertEquals(containerWidth / 2, childWidth);
    
public voidtestPreconditions()

        assertNotNull(mChild);
        assertNotNull(mContainer);