android/kotlin-guides

Backticked function names in tests

Closed this issue · 1 comments

The function names section permits using underscores in test function names to ease reading: @Test fun pop_emptyStack()

I propose:

  1. Permitting the usage of backticked test function names together with spaces for separating logical components of the name: @Test fun `pop emptyStack`()
  2. Recommending either the underscored naming or the backtick-spaced as a preferred way of naming for test functions

This used to be allowed, but since the dex file format forbids spaces it didn't make sense to allow it with heavy caveats which can't be enforced by a tool.

Perhaps if the dex format gets changed it can be reconsidered.