Files
app_Settings/tests/robotests/src/com/android/settings/widget/DonutViewTest.java
James Lemieux f1dade40d2 Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources
located in the APK under test.

Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -08:00

19 lines
526 B
Java

package com.android.settings.widget;
import android.content.Context;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
@RunWith(RobolectricTestRunner.class)
public class DonutViewTest {
@Test
public void getPercentageStringSpannable_doesntCrashForMissingPercentage() {
Context context = RuntimeEnvironment.application;
DonutView.getPercentageStringSpannable(context.getResources(), "50%", "h");
}
}