Ignore function naming check when annotated with @Test

pull/1094/head
lihenggui 11 months ago
parent 485440b550
commit 56fbe13b5a

@ -4,4 +4,4 @@
[*.{kt,kts}] [*.{kt,kts}]
ij_kotlin_allow_trailing_comma=true ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true ij_kotlin_allow_trailing_comma_on_call_site=true
ktlint_function_naming_ignore_when_annotated_with=Composable ktlint_function_naming_ignore_when_annotated_with=Composable, Test

@ -24,7 +24,6 @@ import kotlin.test.assertEquals
class ResultKtTest { class ResultKtTest {
@Suppress("ktlint:standard:function-naming")
@Test @Test
fun Result_catches_errors() = runTest { fun Result_catches_errors() = runTest {
flow { flow {

@ -27,7 +27,7 @@ import kotlin.test.assertTrue
class IntToStringIdsMigrationTest { class IntToStringIdsMigrationTest {
@Test @Test
fun intToStringIdsMigration_should_migrate_topic_ids() = runTest { fun IntToStringIdsMigration_should_migrate_topic_ids() = runTest {
// Set up existing preferences with topic int ids // Set up existing preferences with topic int ids
val preMigrationUserPreferences = userPreferences { val preMigrationUserPreferences = userPreferences {
deprecatedIntFollowedTopicIds.addAll(listOf(1, 2, 3)) deprecatedIntFollowedTopicIds.addAll(listOf(1, 2, 3))
@ -56,7 +56,7 @@ class IntToStringIdsMigrationTest {
} }
@Test @Test
fun intToStringIdsMigration_should_migrate_author_ids() = runTest { fun IntToStringIdsMigration_should_migrate_author_ids() = runTest {
// Set up existing preferences with author int ids // Set up existing preferences with author int ids
val preMigrationUserPreferences = userPreferences { val preMigrationUserPreferences = userPreferences {
deprecatedIntFollowedAuthorIds.addAll(listOf(4, 5, 6)) deprecatedIntFollowedAuthorIds.addAll(listOf(4, 5, 6))

@ -24,7 +24,7 @@ import kotlin.test.assertTrue
class ListToMapMigrationTest { class ListToMapMigrationTest {
@Test @Test
fun listToMapMigration_should_migrate_topic_ids() = runTest { fun ListToMapMigration_should_migrate_topic_ids() = runTest {
// Set up existing preferences with topic ids // Set up existing preferences with topic ids
val preMigrationUserPreferences = userPreferences { val preMigrationUserPreferences = userPreferences {
deprecatedFollowedTopicIds.addAll(listOf("1", "2", "3")) deprecatedFollowedTopicIds.addAll(listOf("1", "2", "3"))
@ -50,7 +50,7 @@ class ListToMapMigrationTest {
} }
@Test @Test
fun listToMapMigration_should_migrate_author_ids() = runTest { fun ListToMapMigration_should_migrate_author_ids() = runTest {
// Set up existing preferences with author ids // Set up existing preferences with author ids
val preMigrationUserPreferences = userPreferences { val preMigrationUserPreferences = userPreferences {
deprecatedFollowedAuthorIds.addAll(listOf("4", "5", "6")) deprecatedFollowedAuthorIds.addAll(listOf("4", "5", "6"))
@ -76,7 +76,7 @@ class ListToMapMigrationTest {
} }
@Test @Test
fun listToMapMigration_should_migrate_bookmarks() = runTest { fun ListToMapMigration_should_migrate_bookmarks() = runTest {
// Set up existing preferences with bookmarks // Set up existing preferences with bookmarks
val preMigrationUserPreferences = userPreferences { val preMigrationUserPreferences = userPreferences {
deprecatedBookmarkedNewsResourceIds.addAll(listOf("7", "8", "9")) deprecatedBookmarkedNewsResourceIds.addAll(listOf("7", "8", "9"))

@ -47,7 +47,7 @@ class TagScreenshotTests() {
val composeTestRule = createAndroidComposeRule<ComponentActivity>() val composeTestRule = createAndroidComposeRule<ComponentActivity>()
@Test @Test
fun tag_multipleThemes() { fun Tag_multipleThemes() {
composeTestRule.captureMultiTheme("Tag") { composeTestRule.captureMultiTheme("Tag") {
NiaTopicTag(followed = true, onClick = {}) { NiaTopicTag(followed = true, onClick = {}) {
Text("TOPIC") Text("TOPIC")

Loading…
Cancel
Save