Skip to content

Commit 42e0322

Browse files
Material Design Teamdsn5ft
authored andcommitted
[Catalog] Update MemoryViewTest
PiperOrigin-RevId: 786682693
1 parent 223bf15 commit 42e0322

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

catalog/test/javatests/io/material/catalog/feature/MemoryViewTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import android.annotation.SuppressLint;
2727
import android.content.Context;
2828
import android.graphics.Canvas;
29+
import android.os.Build.VERSION_CODES;
2930
import android.view.View.MeasureSpec;
3031
import android.view.ViewGroup.LayoutParams;
3132
import androidx.test.core.app.ApplicationProvider;
@@ -40,7 +41,7 @@
4041

4142
/** Tests for {@link MemoryView}. */
4243
@RunWith(RobolectricTestRunner.class)
43-
@Config(sdk = Config.OLDEST_SDK)
44+
@Config(sdk = VERSION_CODES.M)
4445
public class MemoryViewTest {
4546

4647
private static final int BYTES_IN_MB = 1024 * 1024;
@@ -70,7 +71,7 @@ public void setUpRuntime() {
7071
public void memoryView_correctText_withProvidedRuntime() {
7172
memoryView.refreshMemStats(runtime);
7273

73-
assertThat(memoryView.getText().toString()).isEqualTo("used: 25MB / 100MB (25%)");
74+
assertThat(memoryView.getText().toString()).isEqualTo("used: 25 MB / 100 MB (25%)");
7475
}
7576

7677
@Test
@@ -85,7 +86,7 @@ public void memoryView_pathNotEmpty_afterRefreshing() {
8586
assertThat(shadowCanvas.getPathPaintHistoryCount()).isEqualTo(1);
8687

8788
ShadowPath drawnPath = shadowOf(shadowCanvas.getDrawnPath(0));
88-
assertThat(drawnPath.getPoints().get(0)).isEqualTo(new Point(34f, 250f, MOVE_TO));
89+
assertThat(drawnPath.getPoints().get(0)).isEqualTo(new Point(36f, 250f, MOVE_TO));
8990
}
9091

9192
@SuppressLint("WrongCall") // Testing onDraw

0 commit comments

Comments
 (0)