Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 974e1e30 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "StaticLayoutPerfTest: Use fixed seed in each test case"

parents 6f180ea9 f2829dee
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.graphics.Typeface;
import android.text.Layout;
import android.text.style.TextAppearanceSpan;

import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -52,7 +53,7 @@ public class StaticLayoutPerfTest {
    private static final boolean NO_STYLE_TEXT = false;
    private static final boolean STYLE_TEXT = true;

    private final Random mRandom = new Random(31415926535L);
    private Random mRandom;

    private static final String ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
    private static final int ALPHABET_LENGTH = ALPHABET.length();
@@ -98,6 +99,11 @@ public class StaticLayoutPerfTest {
        return ssb;
    }

    @Before
    public void setUp() {
        mRandom = new Random(0);
    }

    @Test
    public void testCreate_FixedText_NoStyle_Greedy_NoHyphenation() {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();