From f8976a9935509f514efb0cfee9e9213a85b0aaf6 Mon Sep 17 00:00:00 2001 From: Flo Edelmann Date: Thu, 25 Jan 2024 20:51:27 +0100 Subject: [PATCH] Lint --- .../streetcomplete/data/logs/LogsDaoTest.kt | 1 - .../streetcomplete/data/AndroidDatabase.kt | 1 - .../data/StreetCompleteSQLiteOpenHelper.kt | 27 ------------------- .../data/elementfilter/StringWithCursor.kt | 2 +- .../streetcomplete/osm/RoadWidth.kt | 4 +-- .../overlays/cycleway/CyclewayOverlay.kt | 2 +- .../cycleway/StreetCyclewayOverlayForm.kt | 2 +- .../overlays/surface/SurfaceOverlayForm.kt | 2 +- .../quests/cycleway/AddCycleway.kt | 2 +- .../quests/cycleway/AddCyclewayForm.kt | 2 +- .../quests/level/AddLevelForm.kt | 2 +- .../AddRecyclingContainerMaterials.kt | 4 --- .../segregated/AddCyclewaySegregation.kt | 2 -- .../quests/surface/AddPathSurface.kt | 1 - .../screens/main/MainFragment.kt | 2 +- .../elementfilter/StringWithCursorTest.kt | 6 ++--- .../BicycleBoulevardKtTest.kt | 2 +- .../SeparateCyclewayCreatorKtTest.kt | 2 +- ...aneNarrowingTrafficCalmingCreatorKtTest.kt | 2 +- .../StreetParkingCreatorKtTest.kt | 2 +- .../osm/surface/SurfaceUtilsKtTest.kt | 1 - .../quests/barrier_type/AddStileTypeTest.kt | 2 +- .../bus_stop_name/AddBusStopNameTest.kt | 1 - .../bus_stop_shelter/AddBusStopShelterTest.kt | 2 +- .../car_wash_type/AddCarWashTypeTest.kt | 2 +- .../crossing_type/AddCrossingTypeTest.kt | 6 ++--- .../DrinkingWaterTypeTest.kt | 2 +- .../foot/AddProhibitedForPedestriansTest.kt | 2 +- .../quests/max_weight/AddMaxWeightTest.kt | 2 +- .../quests/parking_fee/FeeTest.kt | 3 +-- .../quests/parking_fee/MaxStayTest.kt | 2 +- .../quests/place_name/AddPlaceNameTest.kt | 2 +- .../AddPostboxCollectionTimesTest.kt | 2 +- .../quests/postbox_ref/AddPostboxRefTest.kt | 2 +- .../AddRecyclingContainerMaterialsTest.kt | 6 +---- .../segregated/AddCyclewaySegregationTest.kt | 1 - .../smoothness/SmoothnessAnswerKtTest.kt | 2 +- .../quests/sport/AddSportTest.kt | 2 +- 38 files changed, 34 insertions(+), 78 deletions(-) diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/logs/LogsDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/logs/LogsDaoTest.kt index 974bbbe7ca..ed34bec950 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/logs/LogsDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/logs/LogsDaoTest.kt @@ -78,4 +78,3 @@ private fun createMessage( null, timestamp ) - diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/AndroidDatabase.kt b/app/src/main/java/de/westnordost/streetcomplete/data/AndroidDatabase.kt index 2cef2e710b..728b9f46b2 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/AndroidDatabase.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/AndroidDatabase.kt @@ -10,7 +10,6 @@ import android.database.sqlite.SQLiteDatabase.CONFLICT_IGNORE import android.database.sqlite.SQLiteDatabase.CONFLICT_NONE import android.database.sqlite.SQLiteDatabase.CONFLICT_REPLACE import android.database.sqlite.SQLiteDatabase.CONFLICT_ROLLBACK -import android.database.sqlite.SQLiteOpenHelper import android.database.sqlite.SQLiteStatement import androidx.core.database.getBlobOrNull import androidx.core.database.getDoubleOrNull diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/StreetCompleteSQLiteOpenHelper.kt b/app/src/main/java/de/westnordost/streetcomplete/data/StreetCompleteSQLiteOpenHelper.kt index 2c1b6426a5..e95fc04d48 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/StreetCompleteSQLiteOpenHelper.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/StreetCompleteSQLiteOpenHelper.kt @@ -3,33 +3,6 @@ package de.westnordost.streetcomplete.data import android.content.Context import android.database.sqlite.SQLiteDatabase import android.database.sqlite.SQLiteOpenHelper -import androidx.core.content.contentValuesOf -import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesTable -import de.westnordost.streetcomplete.data.logs.LogsTable -import de.westnordost.streetcomplete.data.osm.created_elements.CreatedElementsTable -import de.westnordost.streetcomplete.data.osm.edits.EditElementsTable -import de.westnordost.streetcomplete.data.osm.edits.ElementEditsTable -import de.westnordost.streetcomplete.data.osm.edits.ElementIdProviderTable -import de.westnordost.streetcomplete.data.osm.edits.upload.changesets.OpenChangesetsTable -import de.westnordost.streetcomplete.data.osm.geometry.RelationGeometryTable -import de.westnordost.streetcomplete.data.osm.geometry.WayGeometryTable -import de.westnordost.streetcomplete.data.osm.mapdata.NodeTable -import de.westnordost.streetcomplete.data.osm.mapdata.RelationTables -import de.westnordost.streetcomplete.data.osm.mapdata.WayTables -import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestTable -import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestsHiddenTable -import de.westnordost.streetcomplete.data.osmnotes.NoteTable -import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsTable -import de.westnordost.streetcomplete.data.osmnotes.notequests.NoteQuestsHiddenTable -import de.westnordost.streetcomplete.data.user.achievements.UserAchievementsTable -import de.westnordost.streetcomplete.data.user.achievements.UserLinksTable -import de.westnordost.streetcomplete.data.user.statistics.ActiveDaysTable -import de.westnordost.streetcomplete.data.user.statistics.CountryStatisticsTables -import de.westnordost.streetcomplete.data.user.statistics.EditTypeStatisticsTables -import de.westnordost.streetcomplete.data.visiblequests.QuestPresetsTable -import de.westnordost.streetcomplete.data.visiblequests.QuestTypeOrderTable -import de.westnordost.streetcomplete.data.visiblequests.VisibleQuestTypeTable -import de.westnordost.streetcomplete.quests.oneway_suspects.data.WayTrafficFlowTable class StreetCompleteSQLiteOpenHelper(context: Context, dbName: String) : SQLiteOpenHelper(context, dbName, null, DatabaseInitializer.DB_VERSION) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/StringWithCursor.kt b/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/StringWithCursor.kt index 389054056b..56dc4bf20b 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/StringWithCursor.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/StringWithCursor.kt @@ -51,7 +51,7 @@ class StringWithCursor(private val string: String) { /** @return the position relative to the cursor position at which the given [block] returns true * If not found, the position past the end of the string is returned */ fun findNext(offs: Int = 0, block: (Char) -> Boolean): Int { - for (i in cursorPos + offs ..< string.length) { + for (i in cursorPos + offs.. { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/segregated/AddCyclewaySegregation.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/segregated/AddCyclewaySegregation.kt index 8fd795c9e5..b395dc6867 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/segregated/AddCyclewaySegregation.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/segregated/AddCyclewaySegregation.kt @@ -6,9 +6,7 @@ import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.BICYCLIST import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.OUTDOORS import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.removeCheckDatesForKey import de.westnordost.streetcomplete.osm.surface.ANYTHING_PAVED -import de.westnordost.streetcomplete.osm.updateWithCheckDate import de.westnordost.streetcomplete.quests.segregated.CyclewaySegregation.* class AddCyclewaySegregation : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/surface/AddPathSurface.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/surface/AddPathSurface.kt index 9b8b6dfe3e..8787f45d1e 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/surface/AddPathSurface.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/surface/AddPathSurface.kt @@ -9,7 +9,6 @@ import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement. import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.WHEELCHAIR import de.westnordost.streetcomplete.osm.Tags import de.westnordost.streetcomplete.osm.changeToSteps -import de.westnordost.streetcomplete.osm.surface.ANYTHING_UNPAVED import de.westnordost.streetcomplete.osm.surface.INVALID_SURFACES import de.westnordost.streetcomplete.osm.surface.applyTo diff --git a/app/src/main/java/de/westnordost/streetcomplete/screens/main/MainFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/screens/main/MainFragment.kt index 2b485c9dab..e9ab203b69 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/screens/main/MainFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/screens/main/MainFragment.kt @@ -65,8 +65,8 @@ import de.westnordost.streetcomplete.data.quest.QuestType import de.westnordost.streetcomplete.data.quest.VisibleQuestsSource import de.westnordost.streetcomplete.databinding.EffectQuestPlopBinding import de.westnordost.streetcomplete.databinding.FragmentMainBinding -import de.westnordost.streetcomplete.osm.level.parseLevelsOrNull import de.westnordost.streetcomplete.osm.level.levelsIntersect +import de.westnordost.streetcomplete.osm.level.parseLevelsOrNull import de.westnordost.streetcomplete.overlays.AbstractOverlayForm import de.westnordost.streetcomplete.overlays.IsShowingElement import de.westnordost.streetcomplete.overlays.Overlay diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/StringWithCursorTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/StringWithCursorTest.kt index 7bcf0c4d7d..353614a0fd 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/StringWithCursorTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/StringWithCursorTest.kt @@ -163,11 +163,11 @@ class StringWithCursorTest { @Test fun advanceWhile() { val x = StringWithCursor("hello you !") - assertEquals(0, x.advanceWhile { it == ' '}) + assertEquals(0, x.advanceWhile { it == ' ' }) x.advanceBy(5) - assertEquals(1, x.advanceWhile { it == ' '}) + assertEquals(1, x.advanceWhile { it == ' ' }) x.advanceBy(3) - assertEquals(3, x.advanceWhile { it == ' '}) + assertEquals(3, x.advanceWhile { it == ' ' }) } @Test fun retreatWhile() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/bicycle_boulevard/BicycleBoulevardKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/bicycle_boulevard/BicycleBoulevardKtTest.kt index db2f5757d5..4bd1a3cc01 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/bicycle_boulevard/BicycleBoulevardKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/bicycle_boulevard/BicycleBoulevardKtTest.kt @@ -6,8 +6,8 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryCh import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.osm.bicycle_boulevard.BicycleBoulevard.* -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class BicycleBoulevardKtTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/cycleway_separate/SeparateCyclewayCreatorKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/cycleway_separate/SeparateCyclewayCreatorKtTest.kt index 86518e89cf..bc65fbac47 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/cycleway_separate/SeparateCyclewayCreatorKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/cycleway_separate/SeparateCyclewayCreatorKtTest.kt @@ -7,8 +7,8 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDe import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.osm.cycleway_separate.SeparateCycleway.* import de.westnordost.streetcomplete.osm.nowAsCheckDateString -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class SeparateCyclewayCreatorKtTest { @Test fun `apply none`() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/lane_narrowing_traffic_calming/LaneNarrowingTrafficCalmingCreatorKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/lane_narrowing_traffic_calming/LaneNarrowingTrafficCalmingCreatorKtTest.kt index 01835cceb4..7c723136a5 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/lane_narrowing_traffic_calming/LaneNarrowingTrafficCalmingCreatorKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/lane_narrowing_traffic_calming/LaneNarrowingTrafficCalmingCreatorKtTest.kt @@ -7,8 +7,8 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDe import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.osm.lane_narrowing_traffic_calming.LaneNarrowingTrafficCalming.* import de.westnordost.streetcomplete.osm.nowAsCheckDateString -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class LaneNarrowingTrafficCalmingCreatorKtTest { @Test fun `set traffic_calming`() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingCreatorKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingCreatorKtTest.kt index db0d59dc48..020666b6d2 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingCreatorKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingCreatorKtTest.kt @@ -9,8 +9,8 @@ import de.westnordost.streetcomplete.osm.nowAsCheckDateString import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.* import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.* import kotlin.test.Test -import kotlin.test.assertFailsWith import kotlin.test.assertEquals +import kotlin.test.assertFailsWith class StreetParkingCreatorKtTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/surface/SurfaceUtilsKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/surface/SurfaceUtilsKtTest.kt index f3b7ba7f04..d16fc62fc8 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/surface/SurfaceUtilsKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/surface/SurfaceUtilsKtTest.kt @@ -5,7 +5,6 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryChange import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify -import de.westnordost.streetcomplete.util.ktx.containsExactlyInAnyOrder import kotlin.test.* import kotlin.test.Test diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileTypeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileTypeTest.kt index 5cd7b34932..b9b68cb2be 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileTypeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileTypeTest.kt @@ -5,8 +5,8 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDe import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.osm.nowAsCheckDateString import de.westnordost.streetcomplete.quests.answerAppliedTo -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class AddStileTypeTest { private val questType = AddStileType() diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/bus_stop_name/AddBusStopNameTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/bus_stop_name/AddBusStopNameTest.kt index bfe969395b..e8918bd555 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/bus_stop_name/AddBusStopNameTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/bus_stop_name/AddBusStopNameTest.kt @@ -10,7 +10,6 @@ class AddBusStopNameTest { private val questType = AddBusStopName() - @Test fun `apply no name answer`() { assertEquals( setOf(StringMapEntryAdd("name:signed", "no")), diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/bus_stop_shelter/AddBusStopShelterTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/bus_stop_shelter/AddBusStopShelterTest.kt index 669da28e99..d176d7ab7a 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/bus_stop_shelter/AddBusStopShelterTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/bus_stop_shelter/AddBusStopShelterTest.kt @@ -6,8 +6,8 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryMo import de.westnordost.streetcomplete.osm.nowAsCheckDateString import de.westnordost.streetcomplete.quests.answerApplied import de.westnordost.streetcomplete.quests.answerAppliedTo -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class AddBusStopShelterTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashTypeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashTypeTest.kt index 5cc49f1714..e66248326a 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashTypeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashTypeTest.kt @@ -1,10 +1,10 @@ package de.westnordost.streetcomplete.quests.car_wash_type import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd +import de.westnordost.streetcomplete.quests.answerApplied import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.AUTOMATED import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.SELF_SERVICE import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.SERVICE -import de.westnordost.streetcomplete.quests.answerApplied import kotlin.test.Test import kotlin.test.assertEquals diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/crossing_type/AddCrossingTypeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/crossing_type/AddCrossingTypeTest.kt index c62a59f3f4..03eed4b2f0 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/crossing_type/AddCrossingTypeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/crossing_type/AddCrossingTypeTest.kt @@ -3,12 +3,12 @@ package de.westnordost.streetcomplete.quests.crossing_type import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.osm.nowAsCheckDateString -import de.westnordost.streetcomplete.quests.crossing_type.CrossingType.MARKED -import de.westnordost.streetcomplete.quests.crossing_type.CrossingType.TRAFFIC_SIGNALS import de.westnordost.streetcomplete.quests.answerApplied import de.westnordost.streetcomplete.quests.answerAppliedTo -import kotlin.test.assertEquals +import de.westnordost.streetcomplete.quests.crossing_type.CrossingType.MARKED +import de.westnordost.streetcomplete.quests.crossing_type.CrossingType.TRAFFIC_SIGNALS import kotlin.test.Test +import kotlin.test.assertEquals class AddCrossingTypeTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/drinking_water_type/DrinkingWaterTypeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/drinking_water_type/DrinkingWaterTypeTest.kt index 3989cb7ed7..a1459ee49d 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/drinking_water_type/DrinkingWaterTypeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/drinking_water_type/DrinkingWaterTypeTest.kt @@ -6,8 +6,8 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryCh import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete import de.westnordost.streetcomplete.osm.SURVEY_MARK_KEY import de.westnordost.streetcomplete.osm.nowAsCheckDateString -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class DrinkingWaterTypeTest { @Test fun `set drinking water as spring`() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansTest.kt index 45bdedadbb..3346992354 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansTest.kt @@ -6,8 +6,8 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryMo import de.westnordost.streetcomplete.quests.answerApplied import de.westnordost.streetcomplete.quests.answerAppliedTo import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.* -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class AddProhibitedForPedestriansTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/max_weight/AddMaxWeightTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/max_weight/AddMaxWeightTest.kt index 84a1701339..8c88e120dd 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/max_weight/AddMaxWeightTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/max_weight/AddMaxWeightTest.kt @@ -2,8 +2,8 @@ package de.westnordost.streetcomplete.quests.max_weight import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.quests.answerApplied -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class AddMaxWeightTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/parking_fee/FeeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/parking_fee/FeeTest.kt index 3d0cc3cb45..9d1345098e 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/parking_fee/FeeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/parking_fee/FeeTest.kt @@ -8,14 +8,13 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDe import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.osm.nowAsCheckDateString import de.westnordost.streetcomplete.osm.opening_hours.parser.OpeningHoursRuleList -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class FeeTest { private val oh = OpeningHoursRuleList(listOf(Rule().apply { isTwentyfourseven = true })) private val ohStr = "24/7" - @Test fun `apply HasNoFee`() { assertEquals( setOf( diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/parking_fee/MaxStayTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/parking_fee/MaxStayTest.kt index e051e89519..9043c0c350 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/parking_fee/MaxStayTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/parking_fee/MaxStayTest.kt @@ -8,8 +8,8 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDe import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.osm.nowAsCheckDateString import de.westnordost.streetcomplete.osm.opening_hours.parser.OpeningHoursRuleList -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class MaxStayTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/place_name/AddPlaceNameTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/place_name/AddPlaceNameTest.kt index da0e12728f..4480449ad9 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/place_name/AddPlaceNameTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/place_name/AddPlaceNameTest.kt @@ -4,8 +4,8 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAd import de.westnordost.streetcomplete.osm.LocalizedName import de.westnordost.streetcomplete.quests.answerApplied import de.westnordost.streetcomplete.testutils.mock -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class AddPlaceNameTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/postbox_collection_times/AddPostboxCollectionTimesTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/postbox_collection_times/AddPostboxCollectionTimesTest.kt index 4b8c1aa93a..c1ceff28a8 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/postbox_collection_times/AddPostboxCollectionTimesTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/postbox_collection_times/AddPostboxCollectionTimesTest.kt @@ -4,8 +4,8 @@ import ch.poole.openinghoursparser.Rule import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.osm.opening_hours.parser.OpeningHoursRuleList import de.westnordost.streetcomplete.quests.answerApplied -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class AddPostboxCollectionTimesTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/postbox_ref/AddPostboxRefTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/postbox_ref/AddPostboxRefTest.kt index c39a42f594..38b21e3eef 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/postbox_ref/AddPostboxRefTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/postbox_ref/AddPostboxRefTest.kt @@ -2,8 +2,8 @@ package de.westnordost.streetcomplete.quests.postbox_ref import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.quests.answerApplied -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class AddPostboxRefTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/recycling_material/AddRecyclingContainerMaterialsTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/recycling_material/AddRecyclingContainerMaterialsTest.kt index a0e3d0522c..b72379ad10 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/recycling_material/AddRecyclingContainerMaterialsTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/recycling_material/AddRecyclingContainerMaterialsTest.kt @@ -6,6 +6,7 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryMo import de.westnordost.streetcomplete.osm.nowAsCheckDateString import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry import de.westnordost.streetcomplete.quests.answerApplied +import de.westnordost.streetcomplete.quests.answerAppliedTo import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.CLOTHES import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PAPER import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PET @@ -13,7 +14,6 @@ import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PLASTIC_BOTTLES import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PLASTIC_PACKAGING import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.SHOES -import de.westnordost.streetcomplete.quests.answerAppliedTo import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.util.ktx.nowAsEpochMilliseconds import kotlin.test.Test @@ -79,7 +79,6 @@ class AddRecyclingContainerMaterialsTest { ) } - @Test fun `apply answer with plastic`() { assertEquals( setOf( @@ -124,7 +123,6 @@ class AddRecyclingContainerMaterialsTest { ) } - @Test fun `apply answer with plastic bottles and previous plastic answer`() { assertEquals( setOf( @@ -191,7 +189,6 @@ class AddRecyclingContainerMaterialsTest { ) } - @Test fun `apply answer with plastic and previous plastic bottles answer`() { assertEquals( setOf( @@ -358,4 +355,3 @@ class AddRecyclingContainerMaterialsTest { ) } } - diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/segregated/AddCyclewaySegregationTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/segregated/AddCyclewaySegregationTest.kt index 348b9bb15f..48fc13c055 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/segregated/AddCyclewaySegregationTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/segregated/AddCyclewaySegregationTest.kt @@ -3,7 +3,6 @@ package de.westnordost.streetcomplete.quests.segregated import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry import de.westnordost.streetcomplete.quests.answerApplied -import de.westnordost.streetcomplete.quests.answerAppliedTo import de.westnordost.streetcomplete.testutils.way import kotlin.test.Test import kotlin.test.assertEquals diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/smoothness/SmoothnessAnswerKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/smoothness/SmoothnessAnswerKtTest.kt index 33c7b13343..185e48f10f 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/smoothness/SmoothnessAnswerKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/smoothness/SmoothnessAnswerKtTest.kt @@ -6,8 +6,8 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryCh import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.osm.nowAsCheckDateString -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class SmoothnessAnswerKtTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/sport/AddSportTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/sport/AddSportTest.kt index 54855e4a52..6f809ec9fd 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/sport/AddSportTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/sport/AddSportTest.kt @@ -6,8 +6,8 @@ import de.westnordost.streetcomplete.quests.answerApplied import de.westnordost.streetcomplete.quests.answerAppliedTo import de.westnordost.streetcomplete.quests.sport.Sport.SOCCER import de.westnordost.streetcomplete.quests.sport.Sport.TENNIS -import kotlin.test.assertEquals import kotlin.test.Test +import kotlin.test.assertEquals class AddSportTest {