Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class BaselineProfileGenerator {
) {
uiAutomator {
startApp(packageName = packageName)
onView { textAsString() == "Let's Go" }.click()
onView { textAsString() == "Prompt" }.click()
onView { isEditable }.apply {
onElement { textAsString() == "Let's Go" }.click()
onElement{ textAsString() == "Prompt" }.click()
onElement{ isEditable }.apply {
Comment on lines +49 to +50
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For consistency and adherence to Kotlin's coding conventions, it's best to add a space between the function name and the opening brace of the lambda expression.1

Style Guide References

Suggested change
onElement{ textAsString() == "Prompt" }.click()
onElement{ isEditable }.apply {
onElement { textAsString() == "Prompt" }.click()
onElement { isEditable }.apply {

Footnotes

  1. The official Kotlin style guide recommends a space between a function name and the opening brace of a lambda expression. This improves code readability.

click()
text =
"wearing brown sneakers, a red t-shirt, " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ class PromptBenchmark {
) {
uiAutomator {
startApp(packageName = packageName)
onView { textAsString() == "Let's Go" }.click()
onView { textAsString() == "Prompt" }.click()
onView { isEditable }.apply {
onElement { textAsString() == "Let's Go" }.click()
onElement { textAsString() == "Prompt" }.click()
onElement { isEditable }.apply {
click()
text =
"wearing brown sneakers, a red t-shirt, " +
Expand Down