This repository was archived by the owner on Apr 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 256
OCMock for Mac tests #399
Merged
Merged
OCMock for Mac tests #399
Conversation
This file contains hidden or 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
Closed
|
If you do this then make your macos target depend on # Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#assert(is_ios)
ocmock_path = "//third_party/ocmock/Source"
# OCMock headers use `#import <OCMock/Foo.h>`.
config("ocmock_config") {
include_dirs = [ "$ocmock_path" ]
}
source_set("ocmock_src") {
configs -= [ "//build/config/compiler:chromium_code" ]
all_dependent_configs = [ ":ocmock_config" ]
cflags = [
"-fvisibility=default",
"-Wno-misleading-indentation",
]
sources = [
"$ocmock_path/OCMock/NSInvocation+OCMAdditions.h",
"$ocmock_path/OCMock/NSInvocation+OCMAdditions.m",
"$ocmock_path/OCMock/NSMethodSignature+OCMAdditions.h",
"$ocmock_path/OCMock/NSMethodSignature+OCMAdditions.m",
"$ocmock_path/OCMock/NSNotificationCenter+OCMAdditions.h",
"$ocmock_path/OCMock/NSNotificationCenter+OCMAdditions.m",
"$ocmock_path/OCMock/NSObject+OCMAdditions.h",
"$ocmock_path/OCMock/NSObject+OCMAdditions.m",
"$ocmock_path/OCMock/NSValue+OCMAdditions.h",
"$ocmock_path/OCMock/NSValue+OCMAdditions.m",
"$ocmock_path/OCMock/OCClassMockObject.h",
"$ocmock_path/OCMock/OCClassMockObject.m",
"$ocmock_path/OCMock/OCMArg.h",
"$ocmock_path/OCMock/OCMArg.m",
"$ocmock_path/OCMock/OCMArgAction.h",
"$ocmock_path/OCMock/OCMArgAction.m",
"$ocmock_path/OCMock/OCMBlockArgCaller.h",
"$ocmock_path/OCMock/OCMBlockArgCaller.m",
"$ocmock_path/OCMock/OCMBlockCaller.h",
"$ocmock_path/OCMock/OCMBlockCaller.m",
"$ocmock_path/OCMock/OCMBoxedReturnValueProvider.h",
"$ocmock_path/OCMock/OCMBoxedReturnValueProvider.m",
"$ocmock_path/OCMock/OCMConstraint.h",
"$ocmock_path/OCMock/OCMConstraint.m",
"$ocmock_path/OCMock/OCMExceptionReturnValueProvider.h",
"$ocmock_path/OCMock/OCMExceptionReturnValueProvider.m",
"$ocmock_path/OCMock/OCMExpectationRecorder.h",
"$ocmock_path/OCMock/OCMExpectationRecorder.m",
"$ocmock_path/OCMock/OCMFunctions.h",
"$ocmock_path/OCMock/OCMFunctions.m",
"$ocmock_path/OCMock/OCMFunctionsPrivate.h",
"$ocmock_path/OCMock/OCMIndirectReturnValueProvider.h",
"$ocmock_path/OCMock/OCMIndirectReturnValueProvider.m",
"$ocmock_path/OCMock/OCMInvocationExpectation.h",
"$ocmock_path/OCMock/OCMInvocationExpectation.m",
"$ocmock_path/OCMock/OCMInvocationMatcher.h",
"$ocmock_path/OCMock/OCMInvocationMatcher.m",
"$ocmock_path/OCMock/OCMInvocationStub.h",
"$ocmock_path/OCMock/OCMInvocationStub.m",
"$ocmock_path/OCMock/OCMLocation.h",
"$ocmock_path/OCMock/OCMLocation.m",
"$ocmock_path/OCMock/OCMMacroState.h",
"$ocmock_path/OCMock/OCMMacroState.m",
"$ocmock_path/OCMock/OCMNotificationPoster.h",
"$ocmock_path/OCMock/OCMNotificationPoster.m",
"$ocmock_path/OCMock/OCMObserverRecorder.h",
"$ocmock_path/OCMock/OCMObserverRecorder.m",
"$ocmock_path/OCMock/OCMPassByRefSetter.h",
"$ocmock_path/OCMock/OCMPassByRefSetter.m",
"$ocmock_path/OCMock/OCMRealObjectForwarder.h",
"$ocmock_path/OCMock/OCMRealObjectForwarder.m",
"$ocmock_path/OCMock/OCMRecorder.h",
"$ocmock_path/OCMock/OCMRecorder.m",
"$ocmock_path/OCMock/OCMReturnValueProvider.h",
"$ocmock_path/OCMock/OCMReturnValueProvider.m",
"$ocmock_path/OCMock/OCMStubRecorder.h",
"$ocmock_path/OCMock/OCMStubRecorder.m",
"$ocmock_path/OCMock/OCMVerifier.h",
"$ocmock_path/OCMock/OCMVerifier.m",
"$ocmock_path/OCMock/OCMock.h",
"$ocmock_path/OCMock/OCMockObject.h",
"$ocmock_path/OCMock/OCMockObject.m",
"$ocmock_path/OCMock/OCObserverMockObject.h",
"$ocmock_path/OCMock/OCObserverMockObject.m",
"$ocmock_path/OCMock/OCPartialMockObject.h",
"$ocmock_path/OCMock/OCPartialMockObject.m",
"$ocmock_path/OCMock/OCProtocolMockObject.h",
"$ocmock_path/OCMock/OCProtocolMockObject.m",
]
}
# This is a static library so it can be used by xcode's build system too.
static_library("ocmock") {
if (is_ios) {
cflags = [
"-mios-simulator-version-min=$ios_testing_deployment_target",
]
}
public_deps = [
":ocmock_src",
]
} |
gaaclarke
approved these changes
Sep 3, 2020
cbracken
added a commit
that referenced
this pull request
Sep 11, 2020
In #399, the static_library target was split into a source_set and static_library target, but this resulted in libocmock being built as an empty 88-byte library. We never caught the issue since this buildroot change was never rolled to the engine. This reverts things back to match how we build other static libraries such as libzip and libxml. This reverts 940dcf6.
cbracken
added a commit
that referenced
this pull request
Sep 11, 2020
This re-lands #399 with complete_static_lib=true in the static library target. static_library does not includes sources from its dependencies, and since this target had no (direct) sources of its own, was being built empty in the original version of this split. The complete_static_lib forces the library to include sources from its dependencies.
chinmaygarde
pushed a commit
to chinmaygarde/flutter_buildroot
that referenced
this pull request
May 4, 2021
Gets ocmock set up so that it can be used by the Mac unit tests (in flutter/engine#20531).
chinmaygarde
pushed a commit
to chinmaygarde/flutter_buildroot
that referenced
this pull request
May 4, 2021
In flutter#399, the static_library target was split into a source_set and static_library target, but this resulted in libocmock being built as an empty 88-byte library. We never caught the issue since this buildroot change was never rolled to the engine. This reverts things back to match how we build other static libraries such as libzip and libxml. This reverts 940dcf6.
chinmaygarde
pushed a commit
to chinmaygarde/flutter_buildroot
that referenced
this pull request
May 4, 2021
This re-lands flutter#399 with complete_static_lib=true in the static library target. static_library does not includes sources from its dependencies, and since this target had no (direct) sources of its own, was being built empty in the original version of this split. The complete_static_lib forces the library to include sources from its dependencies.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
OCMock is currently set up only for iOS, but I need it in a Mac test in flutter/engine#20531.