Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove old date time parser APIs (WPB-9934) #3171

Merged
merged 37 commits into from
Jul 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
da71d72
feat: write tests for benchmark, and create new parser without sdf
yamilmedina Jul 5, 2024
506a191
feat: cleanup deprecated serverdate with sdf
yamilmedina Jul 5, 2024
aad9fb9
feat: extract to a new class/file the new parsers
yamilmedina Jul 8, 2024
a5ed0d3
feat: extract to a new class/file the new parsers
yamilmedina Jul 8, 2024
231e900
feat: migrate mediumdateformatter
yamilmedina Jul 8, 2024
994c4e5
feat: migrate formatFullDateShortTime
yamilmedina Jul 8, 2024
1d94ec1
feat: test cleanup
yamilmedina Jul 8, 2024
ed2fd17
feat: test cleanup
yamilmedina Jul 8, 2024
cf61e6e
feat: migrate filedatetime
yamilmedina Jul 8, 2024
8099bcf
feat: migrate readreceip
yamilmedina Jul 8, 2024
a55ccfb
feat: espresso tests for validation in device
yamilmedina Jul 8, 2024
1474f5a
feat: espresso tests for validation in device
yamilmedina Jul 8, 2024
4f501f7
feat: espresso tests for validation in device
yamilmedina Jul 8, 2024
a9f6541
feat: migrage medium only date
yamilmedina Jul 8, 2024
77e550a
feat: test format
yamilmedina Jul 8, 2024
64f3be4
fix: tests locally, force locales
yamilmedina Jul 8, 2024
10424aa
fix: detekt
yamilmedina Jul 8, 2024
73ae392
Merge branch 'develop' into feat/remove-oldapi-simpledateformat
yamilmedina Jul 8, 2024
8569b18
fix: detekt
yamilmedina Jul 8, 2024
f772a75
fix: detekt
yamilmedina Jul 8, 2024
1ec6e0e
fix: detekt
yamilmedina Jul 9, 2024
273c36d
chore: fix detekt
yamilmedina Jul 9, 2024
52910d0
refactor: extract uimessage time
yamilmedina Jul 9, 2024
bedb199
refactor: extract uimessage time
yamilmedina Jul 9, 2024
c0c7bb5
refactor: extract uimessage time, cleanup
yamilmedina Jul 9, 2024
af431bf
Merge branch 'develop' into feat/remove-oldapi-simpledateformat
yamilmedina Jul 9, 2024
78d80a0
fix: tests locally, force locales
yamilmedina Jul 9, 2024
022d605
Merge branch 'develop' into feat/remove-oldapi-simpledateformat
yamilmedina Jul 9, 2024
ea000d9
fix: pr comments stable funcs
yamilmedina Jul 9, 2024
5d3eca3
Merge branch 'develop' into feat/remove-oldapi-simpledateformat
yamilmedina Jul 9, 2024
54741a3
fix: pr comments stable funcs
yamilmedina Jul 9, 2024
3afc7d3
fix: pr deprecation notice
yamilmedina Jul 9, 2024
79e5bda
fix: pr deprecation notice
yamilmedina Jul 9, 2024
cc21fec
Merge branch 'develop' into feat/remove-oldapi-simpledateformat
mchenani Jul 12, 2024
37bce40
feat: cleanup code mapper
yamilmedina Jul 12, 2024
1a9414f
feat: cleanup code mapper
yamilmedina Jul 12, 2024
efd3770
feat: cleanup code mapper
yamilmedina Jul 12, 2024
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
Prev Previous commit
Next Next commit
feat: espresso tests for validation in device
  • Loading branch information
yamilmedina committed Jul 8, 2024
commit a55ccfbc69faed429ac7f5481dbbafb3a6b97dbf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package com.wire.android.util

import com.wire.kalium.util.DateTimeUtil.toIsoDateTimeString
import kotlinx.datetime.Clock
import org.junit.Assert.assertTrue
import org.junit.Test
import kotlin.time.measureTime

Expand All @@ -36,19 +37,20 @@ class DateTimeUtilTest {
// simple date format
val duration1 = measureTime {
repeat(ITERATIONS) {
date.serverDate()
serverDateOld(date)
}
}

// datetime format
val duration2 = measureTime {
repeat(ITERATIONS) {
serverDateOld(date)
date.serverDate()
}
}

println("The duration of using ServerDate/LocalDateTimeFormat was: $duration1")
println("The duration of using ServerDateOld/SimpleDateFormat was: $duration2")
println("The duration of using ServerDateOld/SimpleDateFormat was: $duration1")
println("The duration of using ServerDate/LocalDateTimeFormat was: $duration2")
assertTrue(duration1 > duration2)
}

@Test
Expand Down Expand Up @@ -76,6 +78,7 @@ class DateTimeUtilTest {

println("The duration of using TextApi/DateFormat was: $duration1")
println("The duration of using TimeApi/DateTimeFormatter was: $duration2")
assertTrue(duration1 > duration2)
}

companion object {
Expand Down