FileDocCategorySizeDatePackage
WeightSumTest.javaAPI DocAndroid 1.5 API1760Wed May 06 22:42:02 BST 2009com.android.frameworktest.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.frameworktest", 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);