Commit 3cfe3e3
Guard cxxreact MethodCall tests under legacy-arch macro (#56902)
Summary:
Pull Request resolved: #56902
`parseMethodCalls` (used by `packages/react-native/ReactCommon/cxxreact/tests/methodcall.cpp`) is only declared in `<cxxreact/MethodCall.h>` when legacy architecture support is compiled in. Wrap the test body in `#ifndef RCT_REMOVE_LEGACY_ARCH` so the translation unit compiles to a no-op when legacy arch is removed, instead of failing with `use of undeclared identifier 'parseMethodCalls'`.
Also configure the `tests` target so its Apple builds run under a target platform that carries the `react-fit-enabled` constraint. A new per-package `apple_target_platforms()` declares `tests-apple-platform`, and the `rn_xplat_cxx_test` rule wires it in via `fbobjc_ios_config_backed_target_platform` / `fbobjc_macosx_config_backed_target_platform`. Under that configuration `RCT_REMOVE_LEGACY_ARCH` is defined and the guarded test body is elided, matching the behavior of the rest of the post-legacy-arch test suite.
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D105737807
fbshipit-source-id: f5fa7ff73a564356746890eb528e3a91f06113f41 parent a0d39e7 commit 3cfe3e3
2 files changed
Lines changed: 8 additions & 0 deletions
File tree
- packages/react-native
- ReactCommon/cxxreact/tests
- React/Tests/Text
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| 52 | + | |
| 53 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| 157 | + | |
| 158 | + | |
0 commit comments