summaryrefslogtreecommitdiff
path: root/platform/ios/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.5-masterMinh Nguyễn2016-12-201-3/+0
|\ | | | | | | Also reran make style-code and manually discarded anything related to fill extrusion layers.
| * Prevent stopless functions (#7309)Fredrik Karlsson2016-12-071-3/+0
| | | | | | | | | | | | * [ios, macos] prevent stopless functions * [ios, macos] removed unused bridging header and fixed naming
| * [ios, macos] Consolidate tests of MGLStyle addSource in MGLStyleTestsJesse Bounds2016-12-021-24/+0
| | | | | | | | | | | | | | | | | | This replaces the integration test of `addSource` when duplicate identifiers are used in `MGLSourceTests` with a more direct unit test in the style class's unit test file `MGLStyleTests`. Although tests of the case where the same instance are actually integration tests where the source instance itself throws, it is easier to test all of this functionality in one place using the public facing MGLStyle API.
| * [ios, macos] Rename MGLMapViewTests back to MGLStyleLayerTestsJesse Bounds2016-12-021-2/+2
| |
| * [ios, macos] handle duplicate source errorIvo van Dongen2016-12-021-0/+24
| |
* | [ios, macos] handle duplicate source errorIvo van Dongen2016-11-301-0/+24
|/
* [ios, macos] Share more testsMinh Nguyễn2016-11-022-324/+0
| | | | Moved MGLGeoJSONSourceTests and MGLTileSetTests into platform/darwin/test/ and added them to the macOS project. Also added a private header needed to compile the tests to the macOS project.
* [ios, macos] Rationalized string enum namesMinh Nguyễn2016-11-021-7/+7
| | | | Renamed MGLGeoJSONSourceOption and MGLOfflinePackUserInfoKey constants for clarity and to remove redundancy in the Swift-bridged names. Left the old MGLOfflinePackUserInfoKey constants in place as deprecated aliases.
* [ios, macos] Make source ownership consistent and GeoJSON content properties ↵Jesse Bounds2016-10-261-23/+4
| | | | | | | | | | | | | | | | | | | writable Use common initialization logic to create an unique pointer to an mbgl source object, up front, when a MGL source is created. Keep a raw pointer to the unique pointer that is pointed at the mbgl source instance when a MGL source is created or when a MGL source is obtained by identifier from MGLStyle. Once the transfer of ownership of the mbgl source takes place, the unique ptr is null. The raw pointer can be used internally for future work that involves mutating the source. This also changes the URL, features, and geoJSONData content properties for MGLGeoJSON source to be writable. If they are set with valid data after a source has been added to the map then the map will update to reflect the new data.
* [ios, macos] Added Swift MGLStyleValue testsMinh Nguyễn2016-10-261-0/+3
| | | | Added tests of MGLStyleValue written in Swift, along with bridging headers just in case they become needed in the future.
* Add MGLPointCollection for GeoJSON multipoints (#6742)Jesse Bounds2016-10-201-51/+21
| | | | | | | | | | | | | | | | * [ios, macos] Introduce MGLPointCollection This makes MGLMultiPoint abstract again so that it is only a place for shared functionality of polygons and polylines. The multipoint feature replaces the point collection feature and can be used to initialize a MGLGeoJSONSource. The previously added swift_names for polyline and polygon are removed, for now. This also updates the iOS and macOS annotation adding logic so that unwanted shapes really are avoided. Previously the combined OR conditions meant that an annotation had to logically be NOT a kind of all three types so the check always let the annotation slip through. This also expands the guard to deflect the new MGLPointCollection.
* [ios, macos] Make feature attributes and identifier writable (#6728)Jesse Bounds2016-10-191-6/+0
| | | | | | * [ios, macos] Make feature attributes and identifier writable Instances of MGLFeature subclasses can now have their attributes and identifier properties mutated.
* [ios, macos] fixes #6346: add support for configurable API base URL (#6709)Justin R. Miller2016-10-151-4/+0
|
* [ios, macos] Teach features and shapes about GeoJSON and mbgl typesJesse Bounds2016-10-141-30/+76
| | | | | | MGLShape subclasses can now return NSDictionaries that represent the shapes' GeoJSON geometries. MGLFeature classes can now return NSDictionaries that represent the features as GeoJSON features. This makes it trivial to serialize iOS and macOS shapes and features into GeoJSON. MGLFeature instances can also return a representation of themselves as an mbgl::Feature. This capability is used in a refactoring of the implementations of MGLGeoJSONSource to more efficiently transform MGLFeatures into mbgl::Features so they can be fed directly into mbgl::GeoJSONSource without having to round trip through NSJSONSerialization. The MGLFeature identifier is converted into the mbgl::identifier type based on the type of the identifier. The MGLFeature attributes are recursively converted into an mbgl::PropertyMap and each value is converted into one of the types that the PropertyMap's Value variant supports.
* [ios, macos] Add feature initializerituaijagbone2016-10-141-1/+213
| | | | | | | | This adds a features initializer to MGLGeoJSONSource. The initializer takes shapes and converts them to JSON representation before passing to core. This also adds methods to the MGLShape concrete subclasses so that they can represent themselves in NSDictionary form suitable for transforming to JSON (GeoJSON).
* [ios, macos] Revamped MGLStyleLayer, MGLSource inheritanceMinh Nguyễn2016-10-061-2/+2
| | | | | | | | | | Removed the MGLStyleLayer protocol, because almost none of its members was actually implemented in every class that adopted the protocol. Removed the unused mapView backpointer property with no replacement. Renamed MGLBaseStyleLayer to MGLStyleLayer. Created the intermediate abstract classes MGLForegroundStyleLayer and MGLVectorStyleLayer to cover subsets of style layer classes with like functionality. Moved each MGLBaseStyleLayer initializer and the corresponding properties down to an abstract subclass such that the initializer makes sense for all concrete subclasses. Moved more initializers and the predicate property up to MGLVectorStyleLayer to eliminate duplication among the concrete subclasses. Marked these initializers as designated initializers. Removed “source” or “layer” before identifier wherever the type of identifier is apparent. Removed extra MGLGeoJSONSource initializer variants in favor of nullable parameters. Added copious documentation comments for source and style layer classes, including several previously undocumented methods and properties. In particular, some preconditions and postconditions have been documented. Added pragma marks to break up the jazzy documentation pages into sections. Reformatted exceptions for consistency.
* [ios, macos] Add tile template option to raster and vector sourcesJesse Bounds2016-09-221-0/+82
| | | A new MGLTileSet class that wraps all available core Tileset options can be created and passed into the sources. The sources pass that tileset object along to core.
* [ios, macos] Use NSDictionary for geojson source options.Jesse Bounds2016-09-021-0/+39
| | | | | | | | | | | | This removes a previous implementation of geojson options that used a new type to transfer the data around. Added in its place is an options API that takes an NSDictionary that works similarly to NSAttributedString and many other Cocoa APIs that take options. The options parser now expects the developer to send values of the type noted in the documentation and it simply converts the NSNumber to the correct type (integer, double, or bool) for mbgl. However, an exception is raised if the value is not an NSNumber.
* [ios] Added support for filters (NSPredicate)Fredrik Karlsson2016-09-021-39/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ios, macos] cleaned up filters [ios] added a filter example [ios] utest filters [ios, macos] nested predicates [ios] refactored [ios] filter -> NSPredicate [ios] fixed mbgl::Any/AllFilter -> NSPredicate [ios] translate nested mbgl::NotIn filters [ios] cleanup and added more utests [ios] fixed a bug in the None filter conversion and improved utests [ios, macos] doc [macos] added missing category [ios, macos] additional utests [ios, macos] updated documentation
* [ios] Silence MGLCalloutView related warnings in tests (#6231)Jesse Bounds2016-09-011-0/+6
| | | | | | | | The annotation view test uses a fake MGLTestCalloutView that declares conformance to the MGLCalloutView protocol. However, several properties and a method were not implemented in the test which caused several warnings that were visible if you compiled the SDK tests. This change stubs out the properties and method so the warnings go away.
* [ios, macos] Fixes #5975 Add source getter to MGLStyleFredrik Karlsson2016-08-181-2283/+0
|
* Runtime styling API for iOS/macOS (#5727)Fredrik Karlsson2016-08-112-0/+2322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios] wip runtime styling * [ios, macos] Outlined header templates * [ios, macos] cleanup and use appropiate data types * [ios, macos] removed refs to mbgl and added convenient color methods on UIColor and NSColor * [ios, macos] updated header template, included doc string * [ios, macos] outlined template for layer implementation files * [ios, macos] moved script to platform/darwin and updated comments * [ios, macos] Cleaned up the implementation template * [ios, macos] removed unused function and added support for more datatypes * [ios, macos] overhauling the type protocols * [ios, macos] removed unnecessary style classes * [ios, macos] added support for more types * [ios, macos] fixed string and number prop values * [ios, macos] enum getters * [ios, macos] added removeLayer() and removed unused layer ref * [ios, macos] fixed remaining layer types and converted style layer into a protocol * [ios, macos] fixed addLayer() and added example for line layer * [ios] GeoJSON source now works * [ios] fixed raster layer and raster source * [ios] fixed attr prop number and outlined prop function * [ios] wip functions * [ios] bool and float function fix * [ios] cleanup * [macos] fixed support for macos * [ios] fixed string functions * [ios] extended array functions * [ios] added tests and fixed a few bugs * [ios] less verbose functions and improved tests * [ios, macos] Removed unnecessary use of default arguments Default arguments aren’t supported in Node v4, and they aren’t needed here anyways, because we’re only testing for truthiness. * [ios, macos] Enum setters Rely on a macro instead of category methods to specialize the setter implementation for enum attributes, since generic types are disallowed in Objective-C method signatures and mbgl::style::PropertyType must be type-qualified. * [ios, macos] Got macOS closer to parity w/ iOS Added various classes and test classes to the macOS workspace. Also fixed lots of compiler errors and updated macosapp runtime styling example to use the new dictionary syntax for function stops. Updated all conversions from Objective-C stops to C++ stops to enumerate over the dictionary. Fixed compiler errors in enum setter implementations. Also corrected path to script in generated file comments. * [ios, macos] Added EJS templates to project * [ios, macos] Code formatting Made code format more consistent. * [ios, macos] Spelled out ID Cocoa convention is to always spell out “ID” as “identifier”, in part to avoid confusion with the id keyword. Also, URL is capitalized in most contexts, including property names. * [ios, macos] Grouped related headers together * [ios, macos] Cleaned up layer transformation Also added support for converting background layers into Objective-C. * [ios, macos] Cleaned up tests Also made the tests work on macOS by introducing a new window to host the map. * [ios, macos] Replaced TODOs with #warnings * [ios] convert array based property values * [ios, macos] color function/undefined getter * [ios, macos] fixed function/undefined getters for bool and float properties * [ios, macos] more function/undefined property getters * [ios, macos] more type conversion and cleanup * [ios, macos] disable macos runtime styling tests for now * [ios, macos] cleaned up style code script * [ios, macos] more type conversion * [ios] added a base layer to handle visibility min/max zoom * [macos] fixed base layer * [ios, macos] use accessor methods * [ios, macos] cleanup * [ios, macos] add geojson to ios and macos * [macos] rebase fix * [ios, macos] fixed enum getters and added tests for enums * [ios, macos] added an update method to base layer * [ios, macos] added some documentation * [ios, macos] docs * [ios, macos] removed refs to filters for now * [ios, macos] various tail work * [ios, macos] missing import and incorrect type
* [ios] #3979 compress telemetry events (#5490)Fredrik Karlsson2016-07-051-0/+52
| | | | | | | | | | | | | | | | * [ios] #3979 wip gzip telemetry events * [ios] expose compression from core instead of adding a new dependency * [ios] #3979 Exposed decompress from mbgl and added a test case * [ios] #3979 cleanup * [ios] #3979 cleaned up test case * [ios] #3979 cleanup * [ios] #3979 gzip -> deflate
* [ios] prevent a race condition by not fulfilling the expectation until the ↵Fredrik Karlsson2016-06-291-2/+5
| | | | view has been added (#5507)
* [ios] Always set map view reference when annotation view is created. (#5496)Jesse Bounds2016-06-281-4/+34
| | | | | | | | | | | | | | | | | | | | This fixes two issues with annotation views that were exposed when dragging them: 1) The annotation view's mapView property was not set until it was moved (in `updateAnnotations:`) so it did not always call its delegate back about the map view delegate dragging methods. This adds a call to set the property when an annotation view is created so the delegate methods are always called. 2) Since the mapView is now always set, a call to the map view's callout view for selected annotation was added to the annotation view drag handler. This forces the callout to close and eliminates an issue where the callout would remain visible as an annotation was dragged away which had the visual effect of a detached callout. To make 2 possible, the map views selected callout view was exposed in the private header.
* [ios] fixes #5129 added annotation property to MGLAnnotationView (#5307)Fredrik Karlsson2016-06-141-0/+62
| | | Also added a test case for MGLAnnotationView
* [ios, osx] Shared test bundleMinh Nguyễn2016-04-16312-26405/+3
| | | | | | The iOS and OS X SDKs now share a non-UI test bundle. Moved the iOS UI test bundle into a uitest/ subdirectory and moved the OS X SDK tests into the darwin/ subdirectory. Upgraded KIF to v3.4.2.
* [ios] Moved KIF project out of ios-tests projectMinh Nguyễn2016-04-161-88/+8
|
* [ios] Added Xcode project for iosapp, ios-bench; workspace for ios-testsMinh Nguyễn2016-04-162-23/+10
| | | | | | | | | | ios.xcodeproj is an ordinary Xcode project with ordinary Xcode targets for iosapp and ios-bench, all contained in an ordinary Xcode workspace that happens to also reference the gyp-generated platform.xcodeproj. The iosapp target links to and embeds Mapbox.framework, which is a product of the gyp-generated platform.xcodeproj. ios-tests.xcodeproj is also in the workspace, enabling simultaneous debugging of KIF tests, the SDK, and core code. Moved storyboards into Base.lproj and image assets into an asset catalog. Removed iOS 6 assets from the iosapp asset catalog. Moved the original ios-bench application icon SVG into a non-project location. Removed app/Settings.bundle, which is identical to framework/Settings.bundle. Removed a broken reference to an unused header from the ios-tests project.
* [ios] Don't use negative content insetsJason Wray2016-03-293-0/+29
| | | | | | When a map view was smaller than the entire viewport, negative content insets would be applied. Negative content insets would only be valid if the map view extended outside of its frame, which cannot happen. Fixes #4440.
* [tests] Bumped KIF hashBruno de Oliveira Abinader2016-02-181-0/+0
| | | | | Commit 766ff59663f19222993ed32e5be36894bcb6949d removes a generated .gcda file that prevents proper lcov usage.
* [ios, osx] Consolidate remaining files in platform/{ios,osx}John Firebaugh2016-02-12312-0/+26490