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

Infix gt #5

Merged
merged 4 commits into from Mar 31, 2016
Merged

Infix gt #5

merged 4 commits into from Mar 31, 2016

Conversation

Xliff
Copy link
Contributor

@Xliff Xliff commented Mar 30, 2016

This pull request removes the comparator operators from DateTime::Math, since they have now been internally implemented by Rakudo.

The problem was discovered based on this error from the test suite.

==> Testing DateTime::Math
Ambiguous call to 'infix:«>»'; these signatures all match:
:(DateTime:D \a, DateTime:D \b)
:(DateTime $a, DateTime $b)
in block at t/math.t line 27

Removing the comparators seemed the easiest solution. Now all test cases pass:

ok 1 - year changed correctly, add 1d
ok 2 - month changed correctly, add 1d
ok 3 - day changed correctly, add 1d
ok 4 - year changed correctly, subtract 1y
ok 5 - month changed correctly, subtract 1y
ok 6 - day changed correctly, subtract 1y
ok 7 - DateTime - DateTime
ok 8 - from-seconds to days
ok 9 - duration-to-from() works.
ok 10 - DateTime > DateTime
ok 11 - DateTime < DateTime
ok 12 - DateTime >= DateTime
ok 13 - DateTime <= DateTime
ok 14 - DateTime == DateTime
ok 15 - DateTime cmp DateTime
ok 16 - DateTime <=> DateTime
ok 17 - DateTime != DateTime

@supernovus supernovus merged commit a700865 into raku-community-modules:master Mar 31, 2016
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.

None yet

2 participants