Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Describing assertion failures #19

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

[WIP] Describing assertion failures #19

wants to merge 3 commits into from

Conversation

eakurnikov
Copy link
Collaborator

No description provided.

@eakurnikov eakurnikov changed the title Describing assertion failures spike [DO NOT MERGE] Describing assertion failures Oct 1, 2019
Copy link
Contributor

@dsvoronin dsvoronin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Кажется что единственный способ не городить такие костыли: переделать то как составляет ошибку espresso, сами билдеры performException и всякие HumanReadables

import org.hamcrest.StringDescription

/**
* @return a [String] description of [ViewAssertion].
*/
internal fun ViewAssertion?.describe(): String {
if (this == null) return "null"
this ?: return "null"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я не знаю code style, но контрол флоу читается оч плохо когда ретурны не в начале строки, так что я скорее за прошлую конструкцию, еще и с фигурными скобками

} else {
viewMatcherDescribers[cachedViewMatcher!!.javaClass]
?.invoke()
?.apply { interaction.perform(this) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лишних вызовов interaction.perform не происходит?

@CLAassistant
Copy link

CLAassistant commented Nov 19, 2019

CLA assistant check
All committers have signed the CLA.

@RuslanMingaliev RuslanMingaliev changed the title [DO NOT MERGE] Describing assertion failures [WIP] Describing assertion failures May 15, 2020
@RuslanMingaliev
Copy link
Collaborator

@eakurnikov any updates on this?

@RuslanMingaliev RuslanMingaliev marked this pull request as draft June 30, 2020 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants