forked from keenlabs/KeenClient-iOS
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Each table - database pair will be uploaded to path database/table of configured endpoint. * No longer automatically add special columns keen, #SSUT. * Special column #UUID now become uuid * Special column time is now automatically added, with new api to turn off this default behavior. * Simple cache migration to new schema without columns keen, #SSUT and convert column #UUID to uuid. * Configure Github actions for tests * Fix tests
- Loading branch information
1 parent
6513626
commit 4f34ea6
Showing
21 changed files
with
1,375 additions
and
532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
run_tests: | ||
runs-on: macos-12 | ||
strategy: | ||
matrix: | ||
include: | ||
- xcode: "14.1" | ||
ios: "16.1" | ||
device: "iPhone 14" | ||
- xcode: "13.4.1" | ||
ios: "15.5" | ||
device: "iPhone 13" | ||
name: Test iOS (${{ matrix.ios }}) | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Select Xcode | ||
run: sudo xcode-select -switch /Applications/Xcode_${{matrix.xcode}}.app && /usr/bin/xcodebuild -version | ||
- name: Run unit tests | ||
run: xcodebuild test -scheme KeenClient -project KeenClient.xcodeproj -destination 'platform=iOS Simulator,name=${{matrix.device}},OS=${{matrix.ios}}' | xcpretty && exit ${PIPESTATUS[0]} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 17 additions & 6 deletions
23
Library/Headers/OCMock/NSNotificationCenter+OCMAdditions.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
//--------------------------------------------------------------------------------------- | ||
// $Id: NSNotificationCenter+OCMAdditions.h 57 2010-07-19 06:14:27Z erik $ | ||
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details. | ||
//--------------------------------------------------------------------------------------- | ||
/* | ||
* Copyright (c) 2009-2021 Erik Doernenburg and contributors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
* not use these files except in compliance with the License. You may obtain | ||
* a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@class OCMockObserver; | ||
@class OCObserverMockObject; | ||
|
||
|
||
@interface NSNotificationCenter(OCMAdditions) | ||
|
||
- (void)addMockObserver:(OCMockObserver *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender; | ||
- (void)addMockObserver:(OCObserverMockObject *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (c) 2014-2021 Erik Doernenburg and contributors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
* not use these files except in compliance with the License. You may obtain | ||
* a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
|
||
#if defined(__cplusplus) | ||
#define OCMOCK_EXTERN extern "C" | ||
#else | ||
#define OCMOCK_EXTERN extern | ||
#endif | ||
|
||
|
||
OCMOCK_EXTERN BOOL OCMIsObjectType(const char *objCType); | ||
OCMOCK_EXTERN BOOL OCMIsSubclassOfMockClass(Class cls); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (c) 2014-2021 Erik Doernenburg and contributors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
* not use these files except in compliance with the License. You may obtain | ||
* a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <OCMock/OCMFunctions.h> | ||
|
||
@interface OCMLocation : NSObject | ||
{ | ||
id testCase; | ||
NSString *file; | ||
NSUInteger line; | ||
} | ||
|
||
+ (instancetype)locationWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine; | ||
|
||
- (instancetype)initWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine; | ||
|
||
- (id)testCase; | ||
- (NSString *)file; | ||
- (NSUInteger)line; | ||
|
||
@end | ||
|
||
OCMOCK_EXTERN OCMLocation *OCMMakeLocation(id testCase, const char *file, int line); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright (c) 2014-2021 Erik Doernenburg and contributors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
* not use these files except in compliance with the License. You may obtain | ||
* a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@class OCMLocation; | ||
@class OCMQuantifier; | ||
@class OCMRecorder; | ||
@class OCMStubRecorder; | ||
@class OCMockObject; | ||
|
||
|
||
@interface OCMMacroState : NSObject | ||
{ | ||
id recorder; | ||
BOOL invocationDidThrow; | ||
} | ||
|
||
+ (void)beginStubMacro; | ||
+ (OCMStubRecorder *)endStubMacro; | ||
|
||
+ (void)beginExpectMacro; | ||
+ (OCMStubRecorder *)endExpectMacro; | ||
|
||
+ (void)beginRejectMacro; | ||
+ (OCMStubRecorder *)endRejectMacro; | ||
|
||
+ (void)beginVerifyMacroAtLocation:(OCMLocation *)aLocation; | ||
+ (void)beginVerifyMacroAtLocation:(OCMLocation *)aLocation withQuantifier:(OCMQuantifier *)quantifier; | ||
+ (void)endVerifyMacro; | ||
|
||
+ (OCMMacroState *)globalState; | ||
|
||
- (void)setRecorder:(id)aRecorder; | ||
- (id)recorder; | ||
|
||
- (void)switchToClassMethod; | ||
|
||
- (void)setInvocationDidThrow:(BOOL)flag; | ||
- (BOOL)invocationDidThrow; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (c) 2016-2021 Erik Doernenburg and contributors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
* not use these files except in compliance with the License. You may obtain | ||
* a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface OCMQuantifier : NSObject | ||
{ | ||
NSUInteger expectedCount; | ||
} | ||
|
||
+ (instancetype)never; | ||
+ (instancetype)exactly:(NSUInteger)count; | ||
+ (instancetype)atLeast:(NSUInteger)count; | ||
+ (instancetype)atMost:(NSUInteger)count; | ||
|
||
- (BOOL)isValidCount:(NSUInteger)count; | ||
|
||
- (NSString *)description; | ||
|
||
@end | ||
|
||
|
||
#define OCMNever() ([OCMQuantifier never]) | ||
#define OCMTimes(n) ([OCMQuantifier exactly:(n)]) | ||
#define OCMAtLeast(n) ([OCMQuantifier atLeast:(n)]) | ||
#define OCMAtMost(n) ([OCMQuantifier atMost:(n)]) | ||
|
||
#ifndef OCM_DISABLE_SHORT_QSYNTAX | ||
#define never() OCMNever() | ||
#define times(n) OCMTimes(n) | ||
#define atLeast(n) OCMAtLeast(n) | ||
#define atMost(n) OCMAtMost(n) | ||
#endif |
Oops, something went wrong.