Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Mac fixes#834

Open
snej wants to merge3 commits intodoctest:dev
base:dev
Choose a base branch
Loading
fromsnej:mac-fixes
Open

Mac fixes#834

snej wants to merge3 commits intodoctest:devfromsnej:mac-fixes

Conversation

snej
Copy link

@snejsnej commentedDec 1, 2023

Description

Fixed issues using doctest on macOS. Each fix is in a separate commit.

The existing platform checks assumed that <TargetConditionals.h> wasalready included prior to doctest.h. If it wasn't, DOCTEST_PLATFORM_MACwouldn't get set because doctest was checking for macros defined inthat header.This caused issues in cross-platform code being run/tested on anApple platform; I first noticed that breakpoints on CHECK didn't work.Since the comment above said "this is how Catch does it", I went toa recent version of Catch and copied/adapted its platform check,which does work properly. I changed it a bit because there's no realneed to distinguish between macOS and iOS or other Apple platforms(AFAIK) since they work the same under the hood; DOCTEST_PLATFORM_MACwill be set on any Apple platform. If there's a need to specialize,there are several other macros in TargetConditionals.h that can bechecked.
Copied the ARM assembly instruction from Catch2 v3.It works on my M2 MacBook Pro :)
@codecovCodecov
Copy link

codecovbot commentedDec 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base(d7a5eeb) 92.11% compared to head(e270ddd) 92.11%.

Additional details and impacted files
@@           Coverage Diff           @@##              dev     #834   +/-   ##=======================================  Coverage   92.11%   92.11%           =======================================  Files           2        2             Lines        2168     2168           =======================================  Hits         1997     1997             Misses        171      171

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

@snej
Copy link
Author

snej commentedDec 2, 2023
edited
Loading

Hm, the Windows clang builds fail with an error I’ve never seen before, in code I didn’t touch:

2023-12-01T19:14:13.0706185Z D:/a/doctest/doctest/doctest/parts\doctest_fwd.h:617:47: error: unsafe buffer access [-Werror,-Wunsafe-buffer-usage]2023-12-01T19:14:13.0707209Z     bool isOnStack() const noexcept { return (buf[last] & 128) == 0; }

I see#824 has exactly the same errors, so this isn’t a regression from this PR.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@snej

[8]ページ先頭

©2009-2025 Movatter.jp