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

Commit 2e618a14 authored by Oleg Petšjonkin's avatar Oleg Petšjonkin Committed by Android (Google) Code Review
Browse files

Merge "Renaming Kotlin tests according to style guide" into main

parents 2e8f6f01 fbfb01e0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ class AppRequestObserverTest {
    }

    @Test
    fun `test app request votes`(@TestParameter testCase: AppRequestTestCase) {
    fun testAppRequestVotes(@TestParameter testCase: AppRequestTestCase) {
        whenever(mockFlags.ignoreAppPreferredRefreshRateRequest())
                .thenReturn(testCase.ignoreRefreshRateRequest)
        val displayModeDirector = DisplayModeDirector(
+3 −3
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ class BaseModeRefreshRateVoteTest {
    }

    @Test
    fun `updates summary with base mode refresh rate if not set`() {
    fun updatesSummary_doesNotUpdateSummary_baseModeRefreshRateNotSet() {
        val summary = createVotesSummary()

        baseModeVote.updateSummary(summary)
@@ -48,7 +48,7 @@ class BaseModeRefreshRateVoteTest {
    }

    @Test
    fun `keeps summary base mode refresh rate if set`() {
    fun doesNotUpdateSummary_baseModeRefreshRateSet() {
        val summary = createVotesSummary()
        summary.appRequestBaseModeRefreshRate = OTHER_BASE_REFRESH_RATE

@@ -58,7 +58,7 @@ class BaseModeRefreshRateVoteTest {
    }

    @Test
    fun `keeps summary with base mode refresh rate if vote refresh rate is negative`() {
    fun doesNotUpdateSummary_baseModeRefreshRateNotSet_requestedRefreshRateInvalid() {
        val invalidBaseModeVote = BaseModeRefreshRateVote(-10f)
        val summary = createVotesSummary()

+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ class CombinedVoteTest {
    }

    @Test
    fun `delegates update to children`() {
    fun delegatesUpdateToChildren() {
        val summary = createVotesSummary()

        combinedVote.updateSummary(summary)
+3 −3
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ import org.junit.runner.RunWith
class DisableRefreshRateSwitchingVoteTest {

    @Test
    fun `disabled refresh rate switching is not changed`(
    fun testDisableRefreshRateSwitch_alreadyDisabled(
            @TestParameter voteDisableSwitching: Boolean
    ) {
        val summary = createVotesSummary()
@@ -41,7 +41,7 @@ class DisableRefreshRateSwitchingVoteTest {
    }

    @Test
    fun `disables refresh rate switching if requested`() {
    fun disablesRefreshRateSwitch_notDisabled_requested() {
        val summary = createVotesSummary()
        val vote = DisableRefreshRateSwitchingVote(true)

@@ -51,7 +51,7 @@ class DisableRefreshRateSwitchingVoteTest {
    }

    @Test
    fun `does not disable refresh rate switching if not requested`() {
    fun doesNotDisableRefreshRateSwitch_notDisabled_notRequested() {
        val summary = createVotesSummary()
        val vote = DisableRefreshRateSwitchingVote(false)

+6 −6
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ class PhysicalVoteTest {
    }

    @Test
    fun `updates minPhysicalRefreshRate if summary has less`() {
    fun updatesMinPhysicalRefreshRateWithBiggerValue() {
        val summary = createVotesSummary()
        summary.minPhysicalRefreshRate = 45f

@@ -47,7 +47,7 @@ class PhysicalVoteTest {
    }

    @Test
    fun `does not update minPhysicalRefreshRate if summary has more`() {
    fun doesNotUpdateMinPhysicalRefreshRateWithSmallerValue() {
        val summary = createVotesSummary()
        summary.minPhysicalRefreshRate = 75f

@@ -57,7 +57,7 @@ class PhysicalVoteTest {
    }

    @Test
    fun `updates maxPhysicalRefreshRate if summary has more`() {
    fun updatesMaxPhysicalRefreshRateWithSmallerValue() {
        val summary = createVotesSummary()
        summary.maxPhysicalRefreshRate = 120f

@@ -67,7 +67,7 @@ class PhysicalVoteTest {
    }

    @Test
    fun `does not update maxPhysicalRefreshRate if summary has less`() {
    fun doesNotUpdateMaxPhysicalRefreshRateWithBiggerValue() {
        val summary = createVotesSummary()
        summary.maxPhysicalRefreshRate = 75f

@@ -77,7 +77,7 @@ class PhysicalVoteTest {
    }

    @Test
    fun `updates maxRenderFrameRate if summary has more`() {
    fun updatesMaxRenderFrameRateWithSmallerValue() {
        val summary = createVotesSummary()
        summary.maxRenderFrameRate = 120f

@@ -87,7 +87,7 @@ class PhysicalVoteTest {
    }

    @Test
    fun `does not update maxRenderFrameRate if summary has less`() {
    fun doesNotUpdateMaxRenderFrameRateWithBiggerValue() {
        val summary = createVotesSummary()
        summary.maxRenderFrameRate = 75f

Loading