155 Commits

Author SHA1 Message Date
ciciplusplus
dcc056a75f Do not run test_read_directory_as_fd on macOS itself
Change-Id: I9bd8ad8f65263abb983c5a369867c76663766c21
2026-01-26 00:32:41 +01:00
ciciplusplus
4256099917 Improve handling of seeking and reading a directory as fd
Change-Id: Iec83ba57ad63db8a2cac6009c6825c5eafc25a80
2026-01-26 00:06:28 +01:00
ciciplusplus
bb166f714d Resolve path to test app properly instead of hardcoding.
This make sure that related cli tests are passing on the real device!

Change-Id: I8b7d30f0d7ddd2b4d613fc21d6b268a8ad5c8b9c
2026-01-25 00:11:48 +01:00
ciciplusplus
230bc855fc NSMutableString deleteCharactersInRange: implementation + tests
Change-Id: I711a6ba7518f1dc323c3df436c5b0aede3c50353
2026-01-13 23:15:29 +01:00
ciciplusplus
dc52f161f8 Fix first run of make-ipa.sh
Change-Id: I67f3b30ef5f413c5d640b3bd0e60c59dd715aa23
2026-01-11 11:46:28 +01:00
ciciplusplus
8f46b692a6 Add "Sanity check tests" to the macOS CI
This step ensures that our non-iOS-specific tests are passing on macOS.

Change-Id: Iec2e2cfcde9df081338be97cfe93765b24031555
2026-01-03 23:16:05 +01:00
hikari_no_yume
e0904ba38f Fix formatting
Change-Id: Ib619e564f6f28104c98d022a0e54b6c7211af73d
2025-12-08 01:17:34 +01:00
alborrajo
2741cac564 Add CAAnimation tests to TestApp
Change-Id: I8f6f1872fd374cb2ba4e245ab9e1f3d7c33497bc
2025-12-08 00:12:46 +00:00
alborrajo
da12f91f98 make-ipa.sh script improvements
Change-Id: I0c22120f47e174c3ff6f9e0c44306c0f01a7ad5a
2025-12-08 00:12:46 +00:00
hikari_no_yume
1e106c0223 Support rendering and touch input for multiple windows
Change-Id: Ib4beb44f810247bee941edd0d757048527eb2304
2025-11-18 00:46:08 +01:00
alborrajo
c20ef808df Updated tests readme
Change-Id: Iea3e55df11874cdf1701ad8acba10e8f1eeff73d
2025-11-05 19:52:09 +00:00
hikari_no_yume
58773d6b49 Support CALayer affineTransform and UIView transform
Fixes #388. The lack of support for transforms has been a longstanding
limitation of the compositor and code for co-ordinate space conversion
and hit testing. This will fix many games that need these for rotating
individual UI elements, or the entire game screen, and will enable
eventually supporting iOS's support for automatic rotation of UI.

This commit also improves bounds.origin support, and adds support for
-[CALayer convertPoint:toLayer:] and -[CALayer convertPoint:fromLayer:].

Change-Id: I6b421e2f853d50c4742f851f61117c2b6545a3ba
2025-10-26 18:12:29 +01:00
hikari_no_yume
56613c794c Support point/rect conversion to/from screen-space co-ordinates
This fixes the incorrect offset applied to touch input handling for
windows that aren't positioned at (0,0), and adds support for:

- CALayer convertPoint:fromLayer: with nil layer parameter
- CALayer convertPoint:toLayer: with nil layer parameter
- UIWindow convertPoint:fromWindow:
- UIWindow convertPoint:toWindow:

The CALayer visual tests were modified to enable partial testing of
this. This was also tested by the fact the GUI tests part of TestApp
happened to be affected by the incorrect offset in touch handling.

Change-Id: I00aab7f0b63bc87c8b630e433fd87b06a8925c3f
2025-10-24 01:04:01 +02:00
hikari_no_yume
8378ebc9d6 Add three basic visual tests for CALayer compositing
Change-Id: Ia567c89cdd1f7574edb08c45eff3a96229fbae4f
2025-10-23 21:43:46 +02:00
hikari_no_yume
267b57deb0 Split TestApp GUI tests into multiple screens/classes
Change-Id: If98473a050bd56819f4e2ccaed1d0d7adf4731f7
2025-10-23 19:23:45 +02:00
Alexander Cieslewicz
0b857879c3 Build a fat testapp binary for armv6 compatibility
Change-Id: I5bd97ab561aea4737e09e456d87995bbc1402b61
2025-10-20 15:50:30 +02:00
Alexander Cieslewicz
67f50afa83 Fix testapp and touchHLE to prevent segfaults on IOS
setlocale only has access to C and POSIX locales.
CFUrlFromBytes returns null when it cant build a valid url. An empty str
is invalid and returns null.

Change-Id: Ied6b2d29798660740bd8b4f96baff9e71c1b8078
2025-10-20 11:57:00 +02:00
hikari_no_yume
2b89ee27cd Make the “ball” round
Change-Id: I42b9d62bb3320ee09b994f764b637055f5bcef51
2025-10-16 19:10:16 +02:00
abnormalmaps
7fe4ddcf20 Fix AutoReleasePoolTest licensing
Change-Id: I1005cceac97d33cd253154cbf02abf253b097787
2025-10-16 03:56:20 -04:00
hikari_no_yume
a382620d8b Add a bouncing ball to TestApp
Change-Id: Ide7e4d68c1fe344326094fc60433293a09f02b35
2025-10-16 02:39:22 +02:00
hikari_no_yume
568fde3794 Auto-discover and link all TestApp source files instead of including
Change-Id: I57be914f413f0ce4172a4c8028890ddad55b01c9
2025-10-15 22:51:35 +02:00
hikari_no_yume
2708418f44 Uncomment CGAffineTransformIdentity test now that it links properly
Change-Id: Ic4db2d9407c1c7cefae9b1850b89210cf911d908
2025-10-15 22:20:36 +02:00
hikari_no_yume
fa6a5e4010 Move all TestApp definitions of Apple stuff to one file
Change-Id: I8875a0896b2205e25f50cebf71c49c0a20c7fb9c
2025-10-15 22:12:48 +02:00
hikari_no_yume
2315da8e2d Add argc/argv to touchHLE, and add a non-automated UIKit part to TestApp
This makes TestApp into a foundation can be used for testing UIKit and
other graphical things (Core Animation, OpenGL ES, etc). For the
moment, it's just a very simple hello-world.

Change-Id: Ib1ac99d14f243ba190380b21fa044e6a41ed85fb
2025-10-15 21:07:31 +02:00
Alexander Cieslewicz
23cc034b6c Copy framework headers from sdk to stub
Change-Id: I27cf3cdeb62c31a6e0d790a8ae00fabb4df3f216
2025-10-15 14:24:29 +02:00
hikari_no_yume
4d02890f47 Tiny cleanup
Change-Id: I6b38d483f605113c9206638150e7bd87a6301b60
2025-10-05 15:41:02 +02:00
hikari_no_yume
208a2ac94b Use -framework/-F rather than -l/-L for frameworks in TestApp build
Change-Id: I3a0bde5ef55389126db267d52a79ce19e40593a2
2025-10-05 15:32:55 +02:00
hikari_no_yume
4f4a76ea13 Fix integration test build linker args
Change-Id: Iab0a446616c43e79d2eef8fd8a84f187fa653681
2025-10-05 14:19:32 +02:00
hikari_no_yume
399d620936 Create separate stub library for each host dylib when building TestApp
With the refactoring from bb48020caf, we
now know which library each host class/constant/function belongs to,
so we can now generate a full set of stub libraries which, when linked
against, will result in a TestApp binary that references all the right
libSystem, libobjc, Foundation, UIKit etc paths.

touchHLE doesn't currently care much about the referenced dylib paths
(likely to change in future), but real iOS does. This commit makes
TestApp partially work on at least some versions of iOS (see the remarks
in tests/README.md).

This commit also makes __objc_empty_cache and __objc_empty_vtable exist
in libobjc's exported constants, rather than having them special-cased
in both the linker and the stub generation, just to make things cleaner.

Change-Id: I85897fc8adc1cf75fdc35775b0a16054d62fbeb4
2025-10-05 03:41:07 +02:00
abnormalmaps
c5147112b4 Allow autoreleasepool deallocation beneath the top
Allows NSAutoreleasePool to deallocate even if it is not the topmost
autoreleasepool for the current thread by deallocating all pools above
it. This matches iOS Simulator behaviour.

Change-Id: If62dec7f2160bf919cce8c094e2be879b3e4b477
2025-09-24 04:16:42 +00:00
abnormalmaps
9666ff6746 Support building Objective C in TestApp
Supports building Objective-C code inside TestApp by using the
common3.0-sdk.

Change-Id: I684e2892f750c03818dd2bc35f0d108e61611e15
2025-09-18 12:22:40 +02:00
ciciplusplus
4c11f6086c Improve JPEG test a bit
Change-Id: I6604411c7605f69d13f8b6d686843e251582fd57
2025-09-14 23:31:49 +02:00
ciciplusplus
e20dda1fbf Implement CGImageCreateWithJPEGDataProvider()
Change-Id: I25e39c6ee479e55ac75a6e3ddeb8effb9ea7d115
2025-09-14 23:17:06 +02:00
ciciplusplus
76aee11541 Implement CFURLHasDirectoryPath()
Change-Id: Iefaf17fa0c170e270eacde1818f1fc0ceedb6df0
2025-09-14 16:04:21 +02:00
ciciplusplus
8074cf9f12 Implement fesetround(FE_TOWARDZERO) affecting lrint()
Change-Id: I3f1ee233e4e1fa6b6952290a9eb0765ce6cda7b3
2025-08-26 23:06:15 +02:00
ciciplusplus
bb959184da Refactor strtoul_inner to use str_to_i128_inner_generic
Change-Id: I09af01e04640f99fcb5fc919518055afb7f16a9a
2025-08-26 00:53:25 +02:00
ciciplusplus
92c2b0709e Replace CGRectMake with in-place CGRect creation in a test app.
Apparently, it produces `Undefined symbols for architecture arm64` if
main.c of the test app is build for macOS.

Change-Id: I74b53a72680bbda0abebd678ad4e4a6ee8295d44
2025-08-13 11:37:35 +01:00
apexad
181600c38f Add CGRect Make/Min/Max(X/Y)/Height/Width functions
Change-Id: I4f28ad7914247f3fe189ccca9e97bc9862cabbf4
2025-08-11 13:53:48 +00:00
ciciplusplus
32ae4e307b Implement memset_pattern functions
Change-Id: I2ea1976b7b5521acde162cfb4fbca16e445a1313
2025-08-11 00:16:22 +01:00
ciciplusplus
31b8490ea2 Implement CFNumberGetValue(), CFNumberCompare() and CFBooleanGetValue()
Also implement NSNumber isEqualToNumber: and compare: methods

Change-Id: I8be7caa048423e76b7a39b0a9fce9d4fbfc2dbd0
2025-08-06 21:07:48 +02:00
ciciplusplus
612bdbd95f Implement rest of fscanf() to be on par with current sscanf()
Change-Id: Id126cc7670c1ef23833363af3f6da23012d6e53a
2025-08-03 19:50:46 +02:00
ciciplusplus
1f7908966b Implement support for %f in fscanf() in generic way
Change-Id: I741450066cedbecb4206baff05ed1a4e0205de3c
2025-08-03 19:50:30 +02:00
ciciplusplus
3a72259483 fscanf() implementation
Change-Id: I058c0511dbf110e4d3338515799fbe68099862c9
2025-08-02 19:18:04 +02:00
ciciplusplus
e8afa013bc Fix format whitespace skipping in sscanf()
Change-Id: I5a32a0afe6ca7da38bbac12eb02bc1535b311bb8
2025-08-02 15:30:59 +02:00
abnormalmaps
4caf79fe82 Fix pthread_cond_signal, add pthread_cond_broadcast
Before this commit, pthread_cond_signal signalled all threads and
remained signalled after it was signaled for the first time. This commit
fixes this behaviour to only wake up waiting threads, and adds
pthread_cond_broadcast based on the new implementation.

Change-Id: I16ee75a09d2e064d258fcc1c981c8987805343e5
2025-07-24 22:30:12 +00:00
ciciplusplus
ef1a775bf6 Fix whitespaces skipping in sscanf family
Change-Id: Iedf854e672c6432a69e3a683574ce03871c323cc
2025-07-06 21:47:09 +02:00
ciciplusplus
d45a395143 Implement getc() and ungetc()
Change-Id: I060471a9604304e9441394c3ba136cd2d71c0052
2025-06-14 22:07:26 +00:00
ciciplusplus
13a19a1a13 Partially handle '+' in printf family for integers
Previously, it would fail silently, resulting in incorrect results

Change-Id: I61553319759ba522362212ca26728848b8ea6a93
2025-06-14 23:01:25 +02:00
ciciplusplus
ce9164715b Fix padding for %p in printf
Change-Id: I5f75836925d604dcc233b503c2fda640d9d9c566
2025-06-06 23:16:17 +02:00
ciciplusplus
21361b1e11 Fix %e and %g formatting for zeros in printf family.
Also simplify %g handling.

Change-Id: I52b2cb1bfe80c2e1f18dea4595c644c33874779c
2025-04-19 19:24:59 +02:00