Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented May 13, 2021

Add ZIO Test generators for the following java.time types:

  • DayOfWeek
  • LocalDate
  • LocalTime
  • Month
  • MonthDay
  • OffsetTime
  • Period
  • Year
  • YearMonth
  • ZonedDateTime
  • ZoneId
  • ZoneOffset

@adamgfraser
Copy link
Contributor

@igrebenik Let me know when you are ready for a review on this!

@jdegoes
Copy link
Member

jdegoes commented May 17, 2021

@igrebenik

Looks like some Scala-specific version failures, e.g.:

[error] /home/runner/work/zio/zio/test/shared/src/main/scala/zio/test/TimeVariants.scala:23:14: object jdk is not a member of package scala
[error] import scala.jdk.CollectionConverters._
[error]              ^
[error] /home/runner/work/zio/zio/test/shared/src/main/scala/zio/test/TimeVariants.scala:158:48: value asScala is not a member of java.util.Set[String]
[error]     val zoneIds = ZoneId.getAvailableZoneIds().asScala
[error]                                                ^
[error] /home/runner/work/zio/zio/test/shared/src/main/scala/zio/test/TimeVariants.scala:159:23: value range is not a member of object scala.collection.immutable.Set
[error]     val idMap   = Set.range(0, zoneIds.size).zip(zoneIds).toMap

@ghost
Copy link
Author

ghost commented May 17, 2021

@jdegoes @adamgfraser Right! Actually, 30 checks have failed. Well, I've never had a chance to support multiple versions of Scala let alone different platforms!!! gotta figure out how do it properly)

@ghost
Copy link
Author

ghost commented May 17, 2021

@adamgfraser ready for the review)

Copy link
Contributor

@adamgfraser adamgfraser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments on the implementation but otherwise looks good. Thanks for adding!

@ghost
Copy link
Author

ghost commented May 20, 2021

@adamgfraser could you check the changes I made?

Copy link
Contributor

@adamgfraser adamgfraser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something still seems off about the anyZoneId implementation but otherwise looks good!

Copy link
Contributor

@adamgfraser adamgfraser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your work on this!

@adamgfraser adamgfraser merged commit 4264aa2 into zio:master May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants