This is an archive of the discontinued LLVM Phabricator instance.

[libc++] [LWG3221] Add tests for wrapping operator+(year_month, months).
ClosedPublic

Authored by curdeius on Dec 6 2020, 8:12 AM.

Details

Summary

The behaviour didn't change since commit 5b08c1742a536f54bd5e270b00ff851cbc7314ef (Recommit <chrono> changes with a couple xtra tests marked to fail on apple's clang.)

Diff Detail

Event Timeline

curdeius requested review of this revision.Dec 6 2020, 8:12 AM
curdeius created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2020, 8:12 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript

A few minor nits, but otherwise LGTM.

libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp
31–32

Since you're cleaning up this code. would it make sense to change these ifs by asserts?

106

Since the test is C++20, can you remove the empty string?

132

Since the test is C++20, can you remove the empty string?

curdeius updated this revision to Diff 309816.Dec 6 2020, 11:38 PM
  • Use assert. Get rid of empty message in static_assert.
curdeius marked 3 inline comments as done.Dec 6 2020, 11:39 PM
curdeius added inline comments.Dec 6 2020, 11:41 PM
libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp
38–52

Actually I should get rid of these two, since I test the whole test() now in constexpr context. WDYT?

ldionne added inline comments.Dec 7 2020, 9:45 AM
libcxx/docs/Cxx2aStatusIssuesStatus.csv
171

You checked the blame to figure out what version we shipped that in?

libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp
38–52

Agreed.

Mordante added inline comments.Dec 7 2020, 9:45 AM
libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp
38–52

Good point. I agree.

curdeius edited the summary of this revision. (Show Details)Dec 7 2020, 11:25 PM
curdeius edited the summary of this revision. (Show Details)Dec 7 2020, 11:33 PM
curdeius updated this revision to Diff 310094.Dec 7 2020, 11:34 PM
  • Remove old constexpr tests.
curdeius marked an inline comment as done.Dec 7 2020, 11:34 PM
curdeius added inline comments.
libcxx/docs/Cxx2aStatusIssuesStatus.csv
171

Yes, that's what I did. I updated the summary to mention the concerned commit.

ldionne accepted this revision.Dec 8 2020, 8:18 AM

Thanks!

This revision is now accepted and ready to land.Dec 8 2020, 8:18 AM
This revision was automatically updated to reflect the committed changes.
curdeius marked an inline comment as done.