Repository navigation
Commit 880b108
authored
Fix RNTester image loader test compilation
## Summary:
Building the RNTester iOS unit-test target fails in `RCTImageLoaderTests.m` with `expected function body after function declarator`.
#59433 removed `RCTImageLoaderHelpers.h` and the bridge-dependent image-loader tests, but left four invocations of `RCTDefineImageURLLoader` and `RCTDefineImageDecoder`. Remove these stale invocations so the remaining `RCTImageLoaderCacheTests` can compile.
## Changelog:
[INTERNAL] [FIXED] - Fix RNTester iOS unit-test compilation after removal of the image-loader test helpers.
## Test Plan:
Reproduced on main at `f480836ad8e`, using Xcode 27.2 and an iPhone 18 Pro simulator running iOS 27.0. With RNTester's CocoaPods dependencies installed, ran the same command before and after the change, from the repository root:
```sh
xcodebuild test \
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
-scheme RNTester \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 18 Pro,OS=27.0' \
-only-testing:RNTesterUnitTests/RCTImageLoaderCacheTests \
-derivedDataPath build/image-loader-test-build/DerivedData \
-jobs 6 \
-parallel-testing-enabled NO \
-disableAutomaticPackageResolution \
CODE_SIGNING_ALLOWED=NO
```
- Before: compilation fails at the stale macro invocations in `RCTImageLoaderTests.m`.
- After: the `RNTesterUnitTests` target compiles, and `testCachedImagePreservesNaturalSizeWhenNotClipped` passes: 1 test, 0 failures.
The repository's formatting check also passes:
```sh
node scripts/clang-format.js --check packages/rn-tester/RNTesterUnitTests/RCTImageLoaderTests.m
```
Differential Revision: D130637311
Pull Request resolved: #598521 parent dac56f1 commit 880b108
1 file changed
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 16 | + | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
| |||
0 commit comments