Skip to content

Time Module: Generation of java.util.GregorianCalendar #228

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

Open
jlink opened this issue Sep 16, 2021 · 0 comments
Open

Time Module: Generation of java.util.GregorianCalendar #228

jlink opened this issue Sep 16, 2021 · 0 comments

Comments

@jlink
Copy link
Collaborator

jlink commented Sep 16, 2021

Testing Problem

Calendar instances can currently not be automatically generated in jqwik.

Provide default generators and DSL for generating GregorianCalendar instances:

  • DateTimes.calendars() -> GregorianCalendarArbitrary
  • Default generation for @ForAll Calendar
  • All relevant contraint annotations should work (e.g. DateTimeRange, HourRange).

Suggested Solution

Use OffsetDateTime generation under the hood and map to Calendar instances.

Discussion

How can other Calendar subtypes, e.g. BuddhistCalendar, sensibly be generated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant