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

Commit 765f1bcb authored by Edgar Wang's avatar Edgar Wang Committed by Automerger Merge Worker
Browse files

Merge "Add test case to check LineBreakWordStyle" into tm-qpr-dev am: 6a573aec

parents 77d16ca9 6a573aec
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.settingslib.widget;

import static android.graphics.text.LineBreakConfig.LINE_BREAK_WORD_STYLE_PHRASE;

import static com.google.common.truth.Truth.assertThat;

import android.content.Context;
@@ -97,4 +99,14 @@ public class MainSwitchBarTest {

        assertThat(mBar.getVisibility()).isEqualTo(View.GONE);
    }

    @Test
    public void setTitle_shouldSetCorrectLineBreakStyle() {
        final String title = "title";

        mBar.setTitle(title);
        final TextView textView = ((TextView) mBar.findViewById(R.id.switch_text));

        assertThat(textView.getLineBreakWordStyle()).isEqualTo(LINE_BREAK_WORD_STYLE_PHRASE);
    }
}