| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
`NSData-bytes` returns a `const void *`. Cast it to a `const char *`
before trying to use with a `%s` format specifier.
|
|
|
|
| |
Don't try to use more bytes then there are in the string.
|
|
|
|
|
|
|
| |
Apparently earlier compilers took our `const structs` and put them into const
data for us so their lifetime was effectively equivalent to `static`. Some
change/optimization in 11.4.1 has moved to that not being the case. Explicitly
make the data structures `static`.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the auto-generated interface methods for the desired methods. The deprecated methods were causing conflicts in the generated interface of the newer methods that would add a zero-length tuple parameter.
Example of fix for encode:error:
Interface Before:
open func encode(_ data: Data!, error: ()) throws -> String
Interface After:
open func encode(_ data: Data!) throws -> String
|
| |
|
|
|
| |
Utilities for relatively common desire to know the launch time of an app, or the boot time of a device.
|
|
|
|
|
|
| |
The helpers not mess with names, so this was actually testing Apple's
API, which does seem to have bugs/race conditions, so stop paying
attention to it.
|
|
|
|
|
|
|
|
| |
Made an assumption about how runloops worked in all versions of iOS.
Appears it was wrong in 32 bit versions on single processor.
Runloop executes all input from an input source in a single burst
which caused a test to fail.
(iOS 8.4 on iPhone4s simulator)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pick off the selector natively handled first. NSProxy's base (on my
current OS atleast) will attempt to forward things, and the fact
that the LightWeight proxy then eats the forward where there is no
target objc seems to confuse things.
This all makes the unittests fail when run in release mode, so it
just generally seems safer to reorder this.
The footnote, is NSProxy really defines a class method for this, but
since LightweightProxy doesn't have a fixed class to check with, it
can't really provide that method.
|
|
|
| |
The block must execute before the test completes.
|
|
|
|
|
|
|
|
|
| |
- Create shared scheme to use.
- Let Xcode (9.4.1) update the project files and add some warnings.
- Remove -finalize (GC days are gone)
- Add some more pragmas to compile cleanly.
- The iOS targets had a mix of 7.0 and 8.0 min versions, so make them
all 8.
|
|
|
| |
Apple has deprecated ServiceManagment as of macOS 10.10 and iOS 8.0.
|
|
|
| |
You should use libdispatch with a DISPATCH_SOURCE_TYPE_VNODE source.
|
|
|
|
|
| |
The changes here had a test looping 5 times with a 1 second wait trying to finish
in a 5 second window. That's a little too close for flakiness. Increased time out to
10 seconds.
|
| |
|
|
|
| |
Move to NSProcessInfo where appropriate.
|
|
|
| |
It has been obsolete since 10.5.
|
|
|
| |
Use NSJSONSerialization instead.
|
|
|
| |
The URLArgument categories should be replaced with usages of NSURLComponents and NSURLItems.
|
|
|
| |
These were functions that dealt with Aliases.
|
|
|
| |
This check is very flaky from OS version to OS version and whether or not you are running under the debugger.
|
|
|
|
|
|
|
| |
This gets GTMSignalHandler working with libdispatch, and also marks it
as deprecated because it is probably easier just to write your own
version to call a block instead of the method invocation here.
This also makes the tests run again which hasn't been happening for
a long time AFAICT.
|
|
|
|
|
| |
There was a race between the thread being finished and
isFinished/isExecuting reporting correctly.
There may have also been a locking issue on older single processor phones.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit 585330a68d00c4d76927ff7bf4829471944358ab.
|
|
|
|
|
|
|
| |
Basically a complete rewrite of GTMSimpleWorkerThread that should get rid of a race condition
when stopping tests and testing for "isExecuting/isFinished".
It does change the observed behaviour of GTMSimpleWorkerThread a little in that "start" no longer
blocks until the thread is starting, and we removed the unused "stop" method.
|
|
|
|
|
| |
- Set up stack trace test just so we make sure we don't recurse. Right now it is too tight and breaks on every system release.
- SQLite's behavior is actually undefined in the case of sqlite3_errcode, so don't depend on it in a test.
|
|
|
|
|
|
|
| |
ubsan output:
.../google_toolbox_for_mac/Foundation/GTMStringEncoding.m:204:16: runtime error: left shift of 10368305 by 8 places cannot be represented in type 'int'
.../google_toolbox_for_mac/Foundation/GTMStringEncoding.m:312:16: runtime error: left shift of 42406098 by 6 places cannot be represented in type 'int'
TESTED=Earth iOS --featires=ubsan
|
| |
|
|
|
|
|
|
|
| |
- Keep Gestalt APIs till 10.8.
- On 10.8 and 10.9 use sysctl and infer the OS version from there.
- On 10.10+ use NSProcessInfo.
- Added unit test to cover it.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In https://crbug.com/747643, a new version of Clang produces warnings
when attempting to format NSInteger as %zd (which is normally used for
ssize_t). Acquiesce by casting NSInteger to long and formatting using
%ld.
In the process, I audited all occurrences of %zd in GTM and found that
the remainder were being used to format size_t, which ought to use %zu,
so I’ve corrected those.
I also audited the existing uses of %zu and found them all to be
correct.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting in the 10.6 SDK, the non-underscored and all-lowercase macro
names in <AssertMacros.h> were deprecated. In the 10.13 SDK shipping in
Xcode 9 beta 3 (but not previous betas of Xcode 9), Apple has made good
on its promise to eventually disable these names. Update GTM to use the
new underscored mixed-case names.
Provided that nobody needs to target anything older than the 10.5 SDK
anymore, this should be a safe change.
Aside from GTMCarbonEvent.m, which is used by Chrome, this change is
untested, and was made by mechanically replacing uses of the various
check, require, and verify macros found in GTM.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove a bunch of code that Google stopped using/maintaining rather than trying
to update it it. Some would be hard to update, some actually has system provided
replacements; others are patterns that just don't seem as common now.
Prune out the code related to macOS <= 10.5, start pruning some of the really
old iOS support also.
Get the projects mostly limping again with modern Xcodes so tests can be run.
If someone ends up on this commit via history for something they still find
as useful, feel free to do a pull request to bring the snippet of code back to
life and update it for current SDKs.
|
|
|
|
|
|
|
|
|
| |
This avoids checking if verbose logging is enabled on every user defaults
change, and only does so when the verbose logging key changes.
In sampling a few apps, this showed up as a hit when the app changes default
(directly or via the System frameworks storing things). By using KVO for it
it basically disappears from the samples.
|