mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Remove outdated tests
This commit is contained in:
@@ -48,42 +48,42 @@ class BackendTest : BaseTest() {
|
|||||||
dbFile.delete()
|
dbFile.delete()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
// @Test
|
||||||
fun testMainScreenDataSource() {
|
// fun testMainScreenDataSource() {
|
||||||
val listener = object : MainScreenDataSource.Listener {
|
// val listener = object : MainScreenDataSource.Listener {
|
||||||
override fun onDataChanged(newData: MainScreenDataSource.Data) {
|
// override fun onDataChanged(newData: MainScreenDataSource.Data) {
|
||||||
val expected = MainScreenDataSource.Data(
|
// val expected = MainScreenDataSource.Data(
|
||||||
ids = listOf(0, 10, 9, 2, 3, 4, 5, 11, 6, 7, 8),
|
// ids = listOf(0, 10, 9, 2, 3, 4, 5, 11, 6, 7, 8),
|
||||||
scores = listOf(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
// scores = listOf(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||||
0.0, 0.0, 0.0),
|
// 0.0, 0.0, 0.0),
|
||||||
names = listOf("Wake up early", "Eat healthy", "Floss",
|
// names = listOf("Wake up early", "Eat healthy", "Floss",
|
||||||
"Journal", "Track time", "Meditate",
|
// "Journal", "Track time", "Meditate",
|
||||||
"Work out", "Take a walk", "Read books",
|
// "Work out", "Take a walk", "Read books",
|
||||||
"Learn French", "Play chess"),
|
// "Learn French", "Play chess"),
|
||||||
colors = listOf(PaletteColor(8), PaletteColor(8),
|
// colors = listOf(PaletteColor(8), PaletteColor(8),
|
||||||
PaletteColor(8), PaletteColor(11),
|
// PaletteColor(8), PaletteColor(11),
|
||||||
PaletteColor(11), PaletteColor(15),
|
// PaletteColor(11), PaletteColor(15),
|
||||||
PaletteColor(15), PaletteColor(15),
|
// PaletteColor(15), PaletteColor(15),
|
||||||
PaletteColor(2), PaletteColor(2),
|
// PaletteColor(2), PaletteColor(2),
|
||||||
PaletteColor(13)),
|
// PaletteColor(13)),
|
||||||
checkmarks = listOf(
|
// checkmarks = listOf(
|
||||||
listOf(2, 0, 0, 0, 0, 2, 0),
|
// listOf(2, 0, 0, 0, 0, 2, 0),
|
||||||
listOf(0, 2, 2, 2, 2, 2, 0),
|
// listOf(0, 2, 2, 2, 2, 2, 0),
|
||||||
listOf(0, 0, 0, 0, 2, 0, 0),
|
// listOf(0, 0, 0, 0, 2, 0, 0),
|
||||||
listOf(0, 2, 0, 2, 0, 0, 0),
|
// listOf(0, 2, 0, 2, 0, 0, 0),
|
||||||
listOf(2, 2, 2, 0, 2, 2, 2),
|
// listOf(2, 2, 2, 0, 2, 2, 2),
|
||||||
listOf(2, 1, 1, 2, 1, 2, 2),
|
// listOf(2, 1, 1, 2, 1, 2, 2),
|
||||||
listOf(2, 0, 2, 0, 2, 1, 2),
|
// listOf(2, 0, 2, 0, 2, 1, 2),
|
||||||
listOf(0, 2, 2, 2, 2, 0, 0),
|
// listOf(0, 2, 2, 2, 2, 0, 0),
|
||||||
listOf(0, 2, 2, 2, 2, 2, 0),
|
// listOf(0, 2, 2, 2, 2, 2, 0),
|
||||||
listOf(0, 0, 2, 0, 2, 0, 2),
|
// listOf(0, 0, 2, 0, 2, 0, 2),
|
||||||
listOf(0, 2, 0, 0, 2, 2, 0)))
|
// listOf(0, 2, 0, 0, 2, 2, 0)))
|
||||||
assertEquals(newData, expected)
|
// assertEquals(newData, expected)
|
||||||
latch.countDown()
|
// latch.countDown()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
backend.mainScreenDataSource.observable.addListener(listener)
|
// backend.mainScreenDataSource.observable.addListener(listener)
|
||||||
backend.mainScreenDataSource.requestData()
|
// backend.mainScreenDataSource.requestData()
|
||||||
assertTrue(latch.await(3, TimeUnit.SECONDS))
|
// assertTrue(latch.await(3, TimeUnit.SECONDS))
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,19 +22,6 @@ import UIKit
|
|||||||
|
|
||||||
@testable import uhabits
|
@testable import uhabits
|
||||||
|
|
||||||
class IosDateTimeTest : XCTestCase {
|
|
||||||
func testPlusMinusDay() {
|
|
||||||
let today = LocalDate(year: 2019, month: 3, day: 25)
|
|
||||||
let calc = IosLocalDateCalculator()
|
|
||||||
let d1 = calc.minusDays(date: today, days: 28)
|
|
||||||
let d2 = calc.plusDays(date: today, days: 7)
|
|
||||||
let d3 = calc.plusDays(date: today, days: 42)
|
|
||||||
XCTAssert(d1.isEqual(LocalDate(year: 2019, month: 2, day: 25)))
|
|
||||||
XCTAssert(d2.isEqual(LocalDate(year: 2019, month: 4, day: 1)))
|
|
||||||
XCTAssert(d3.isEqual(LocalDate(year: 2019, month: 5, day: 6)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class IosDateFormatterTest : XCTestCase {
|
class IosDateFormatterTest : XCTestCase {
|
||||||
func testShortMonthName() {
|
func testShortMonthName() {
|
||||||
let fmt = IosLocalDateFormatter()
|
let fmt = IosLocalDateFormatter()
|
||||||
|
|||||||
Reference in New Issue
Block a user