OLD | NEW |
(Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 # OCHamcrest sources contains import rules using relative file names |
| 6 # ("HCAssertThat.h") and other using paths in an installed framework |
| 7 # (<OCHamcrest/HCMatcher.h>). In order to build, copy all the sources |
| 8 # to <(SHARED_INTERMEDIATE_DIR)/ios/third_party/ochmacrest/OCHamcrest |
| 9 # so that both type of import work (another option considered was to |
| 10 # build forwarding headers but this required duplicating the list of |
| 11 # files in GN build and was ruled out). |
| 12 # |
| 13 # To avoid ODR violation, direct import of ios/third_party/ochamcrest |
| 14 # is forbidden in ios/DEPS and code should instead use import as if |
| 15 # OCHamcrest was in a framework (i.e. #import <OCHamcrest/OCHamcrest.h>). |
| 16 copy("ochamcrest_copy_files") { |
| 17 testonly = true |
| 18 visibility = [ ":ochamcrest" ] |
| 19 sources = [ |
| 20 "src/Source/Core/HCAssertThat.h", |
| 21 "src/Source/Core/HCAssertThat.m", |
| 22 "src/Source/Core/HCBaseDescription.h", |
| 23 "src/Source/Core/HCBaseDescription.m", |
| 24 "src/Source/Core/HCBaseMatcher.h", |
| 25 "src/Source/Core/HCBaseMatcher.m", |
| 26 "src/Source/Core/HCDescription.h", |
| 27 "src/Source/Core/HCDiagnosingMatcher.h", |
| 28 "src/Source/Core/HCDiagnosingMatcher.m", |
| 29 "src/Source/Core/HCMatcher.h", |
| 30 "src/Source/Core/HCSelfDescribing.h", |
| 31 "src/Source/Core/HCStringDescription.h", |
| 32 "src/Source/Core/HCStringDescription.m", |
| 33 "src/Source/Core/Helpers/HCCollect.h", |
| 34 "src/Source/Core/Helpers/HCCollect.m", |
| 35 "src/Source/Core/Helpers/HCInvocationMatcher.h", |
| 36 "src/Source/Core/Helpers/HCInvocationMatcher.m", |
| 37 "src/Source/Core/Helpers/HCRequireNonNilObject.h", |
| 38 "src/Source/Core/Helpers/HCRequireNonNilObject.m", |
| 39 "src/Source/Core/Helpers/HCWrapInMatcher.h", |
| 40 "src/Source/Core/Helpers/HCWrapInMatcher.m", |
| 41 "src/Source/Core/Helpers/NSInvocation+OCHamcrest.h", |
| 42 "src/Source/Core/Helpers/NSInvocation+OCHamcrest.m", |
| 43 "src/Source/Core/Helpers/ReturnValueGetters/HCBoolReturnGetter.h", |
| 44 "src/Source/Core/Helpers/ReturnValueGetters/HCBoolReturnGetter.m", |
| 45 "src/Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.h", |
| 46 "src/Source/Core/Helpers/ReturnValueGetters/HCCharReturnGetter.m", |
| 47 "src/Source/Core/Helpers/ReturnValueGetters/HCDoubleReturnGetter.h", |
| 48 "src/Source/Core/Helpers/ReturnValueGetters/HCDoubleReturnGetter.m", |
| 49 "src/Source/Core/Helpers/ReturnValueGetters/HCFloatReturnGetter.h", |
| 50 "src/Source/Core/Helpers/ReturnValueGetters/HCFloatReturnGetter.m", |
| 51 "src/Source/Core/Helpers/ReturnValueGetters/HCIntReturnGetter.h", |
| 52 "src/Source/Core/Helpers/ReturnValueGetters/HCIntReturnGetter.m", |
| 53 "src/Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.h", |
| 54 "src/Source/Core/Helpers/ReturnValueGetters/HCLongLongReturnGetter.m", |
| 55 "src/Source/Core/Helpers/ReturnValueGetters/HCLongReturnGetter.h", |
| 56 "src/Source/Core/Helpers/ReturnValueGetters/HCLongReturnGetter.m", |
| 57 "src/Source/Core/Helpers/ReturnValueGetters/HCObjectReturnGetter.h", |
| 58 "src/Source/Core/Helpers/ReturnValueGetters/HCObjectReturnGetter.m", |
| 59 "src/Source/Core/Helpers/ReturnValueGetters/HCReturnTypeHandlerChain.h", |
| 60 "src/Source/Core/Helpers/ReturnValueGetters/HCReturnTypeHandlerChain.m", |
| 61 "src/Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.h", |
| 62 "src/Source/Core/Helpers/ReturnValueGetters/HCReturnValueGetter.m", |
| 63 "src/Source/Core/Helpers/ReturnValueGetters/HCShortReturnGetter.h", |
| 64 "src/Source/Core/Helpers/ReturnValueGetters/HCShortReturnGetter.m", |
| 65 "src/Source/Core/Helpers/ReturnValueGetters/HCUnsignedCharReturnGetter.h", |
| 66 "src/Source/Core/Helpers/ReturnValueGetters/HCUnsignedCharReturnGetter.m", |
| 67 "src/Source/Core/Helpers/ReturnValueGetters/HCUnsignedIntReturnGetter.h", |
| 68 "src/Source/Core/Helpers/ReturnValueGetters/HCUnsignedIntReturnGetter.m", |
| 69 "src/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongLongReturnGetter.h
", |
| 70 "src/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongLongReturnGetter.m
", |
| 71 "src/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongReturnGetter.h", |
| 72 "src/Source/Core/Helpers/ReturnValueGetters/HCUnsignedLongReturnGetter.m", |
| 73 "src/Source/Core/Helpers/ReturnValueGetters/HCUnsignedShortReturnGetter.h", |
| 74 "src/Source/Core/Helpers/ReturnValueGetters/HCUnsignedShortReturnGetter.m", |
| 75 "src/Source/Core/Helpers/TestFailureReporters/HCGenericTestFailureReporter.h
", |
| 76 "src/Source/Core/Helpers/TestFailureReporters/HCGenericTestFailureReporter.m
", |
| 77 "src/Source/Core/Helpers/TestFailureReporters/HCSenTestFailureReporter.h", |
| 78 "src/Source/Core/Helpers/TestFailureReporters/HCSenTestFailureReporter.m", |
| 79 "src/Source/Core/Helpers/TestFailureReporters/HCTestFailure.h", |
| 80 "src/Source/Core/Helpers/TestFailureReporters/HCTestFailure.m", |
| 81 "src/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.h", |
| 82 "src/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporter.m", |
| 83 "src/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.h", |
| 84 "src/Source/Core/Helpers/TestFailureReporters/HCTestFailureReporterChain.m", |
| 85 "src/Source/Core/Helpers/TestFailureReporters/HCXCTestFailureReporter.h", |
| 86 "src/Source/Core/Helpers/TestFailureReporters/HCXCTestFailureReporter.m", |
| 87 "src/Source/Library/Collection/HCEvery.h", |
| 88 "src/Source/Library/Collection/HCEvery.m", |
| 89 "src/Source/Library/Collection/HCHasCount.h", |
| 90 "src/Source/Library/Collection/HCHasCount.m", |
| 91 "src/Source/Library/Collection/HCIsCollectionContaining.h", |
| 92 "src/Source/Library/Collection/HCIsCollectionContaining.m", |
| 93 "src/Source/Library/Collection/HCIsCollectionContainingInAnyOrder.h", |
| 94 "src/Source/Library/Collection/HCIsCollectionContainingInAnyOrder.m", |
| 95 "src/Source/Library/Collection/HCIsCollectionContainingInOrder.h", |
| 96 "src/Source/Library/Collection/HCIsCollectionContainingInOrder.m", |
| 97 "src/Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.h", |
| 98 "src/Source/Library/Collection/HCIsCollectionContainingInRelativeOrder.m", |
| 99 "src/Source/Library/Collection/HCIsCollectionOnlyContaining.h", |
| 100 "src/Source/Library/Collection/HCIsCollectionOnlyContaining.m", |
| 101 "src/Source/Library/Collection/HCIsDictionaryContaining.h", |
| 102 "src/Source/Library/Collection/HCIsDictionaryContaining.m", |
| 103 "src/Source/Library/Collection/HCIsDictionaryContainingEntries.h", |
| 104 "src/Source/Library/Collection/HCIsDictionaryContainingEntries.m", |
| 105 "src/Source/Library/Collection/HCIsDictionaryContainingKey.h", |
| 106 "src/Source/Library/Collection/HCIsDictionaryContainingKey.m", |
| 107 "src/Source/Library/Collection/HCIsDictionaryContainingValue.h", |
| 108 "src/Source/Library/Collection/HCIsDictionaryContainingValue.m", |
| 109 "src/Source/Library/Collection/HCIsEmptyCollection.h", |
| 110 "src/Source/Library/Collection/HCIsEmptyCollection.m", |
| 111 "src/Source/Library/Collection/HCIsIn.h", |
| 112 "src/Source/Library/Collection/HCIsIn.m", |
| 113 "src/Source/Library/Decorator/HCDescribedAs.h", |
| 114 "src/Source/Library/Decorator/HCDescribedAs.m", |
| 115 "src/Source/Library/Decorator/HCIs.h", |
| 116 "src/Source/Library/Decorator/HCIs.m", |
| 117 "src/Source/Library/Logical/HCAllOf.h", |
| 118 "src/Source/Library/Logical/HCAllOf.m", |
| 119 "src/Source/Library/Logical/HCAnyOf.h", |
| 120 "src/Source/Library/Logical/HCAnyOf.m", |
| 121 "src/Source/Library/Logical/HCIsAnything.h", |
| 122 "src/Source/Library/Logical/HCIsAnything.m", |
| 123 "src/Source/Library/Logical/HCIsNot.h", |
| 124 "src/Source/Library/Logical/HCIsNot.m", |
| 125 "src/Source/Library/Number/HCIsCloseTo.h", |
| 126 "src/Source/Library/Number/HCIsCloseTo.m", |
| 127 "src/Source/Library/Number/HCIsEqualToNumber.h", |
| 128 "src/Source/Library/Number/HCIsEqualToNumber.m", |
| 129 "src/Source/Library/Number/HCIsTrueFalse.h", |
| 130 "src/Source/Library/Number/HCIsTrueFalse.m", |
| 131 "src/Source/Library/Number/HCNumberAssert.h", |
| 132 "src/Source/Library/Number/HCNumberAssert.m", |
| 133 "src/Source/Library/Number/HCOrderingComparison.h", |
| 134 "src/Source/Library/Number/HCOrderingComparison.m", |
| 135 "src/Source/Library/Object/HCArgumentCaptor.h", |
| 136 "src/Source/Library/Object/HCArgumentCaptor.m", |
| 137 "src/Source/Library/Object/HCClassMatcher.h", |
| 138 "src/Source/Library/Object/HCClassMatcher.m", |
| 139 "src/Source/Library/Object/HCConformsToProtocol.h", |
| 140 "src/Source/Library/Object/HCConformsToProtocol.m", |
| 141 "src/Source/Library/Object/HCHasDescription.h", |
| 142 "src/Source/Library/Object/HCHasDescription.m", |
| 143 "src/Source/Library/Object/HCHasProperty.h", |
| 144 "src/Source/Library/Object/HCHasProperty.m", |
| 145 "src/Source/Library/Object/HCIsEqual.h", |
| 146 "src/Source/Library/Object/HCIsEqual.m", |
| 147 "src/Source/Library/Object/HCIsInstanceOf.h", |
| 148 "src/Source/Library/Object/HCIsInstanceOf.m", |
| 149 "src/Source/Library/Object/HCIsNil.h", |
| 150 "src/Source/Library/Object/HCIsNil.m", |
| 151 "src/Source/Library/Object/HCIsSame.h", |
| 152 "src/Source/Library/Object/HCIsSame.m", |
| 153 "src/Source/Library/Object/HCIsTypeOf.h", |
| 154 "src/Source/Library/Object/HCIsTypeOf.m", |
| 155 "src/Source/Library/Object/HCThrowsException.h", |
| 156 "src/Source/Library/Object/HCThrowsException.m", |
| 157 "src/Source/Library/Text/HCIsEqualIgnoringCase.h", |
| 158 "src/Source/Library/Text/HCIsEqualIgnoringCase.m", |
| 159 "src/Source/Library/Text/HCIsEqualIgnoringWhiteSpace.h", |
| 160 "src/Source/Library/Text/HCIsEqualIgnoringWhiteSpace.m", |
| 161 "src/Source/Library/Text/HCStringContains.h", |
| 162 "src/Source/Library/Text/HCStringContains.m", |
| 163 "src/Source/Library/Text/HCStringContainsInOrder.h", |
| 164 "src/Source/Library/Text/HCStringContainsInOrder.m", |
| 165 "src/Source/Library/Text/HCStringEndsWith.h", |
| 166 "src/Source/Library/Text/HCStringEndsWith.m", |
| 167 "src/Source/Library/Text/HCStringStartsWith.h", |
| 168 "src/Source/Library/Text/HCStringStartsWith.m", |
| 169 "src/Source/Library/Text/HCSubstringMatcher.h", |
| 170 "src/Source/Library/Text/HCSubstringMatcher.m", |
| 171 "src/Source/OCHamcrest.h", |
| 172 ] |
| 173 outputs = [ |
| 174 "$root_gen_dir/ios/third_party/ochamcrest/OCHamcrest/{{source_file_part}}", |
| 175 ] |
| 176 } |
| 177 |
| 178 config("ochamcrest_config") { |
| 179 visibility = [ ":ochamcrest" ] |
| 180 libs = [ "XCTest.framework" ] |
| 181 include_dirs = [ "$root_gen_dir/ios/third_party/ochamcrest" ] |
| 182 } |
| 183 |
| 184 config("ochamcrest_private_config") { |
| 185 visibility = [ ":ochamcrest" ] |
| 186 |
| 187 # TODO(crbug.com/589097): remove this once OCHamcrest source has been fixed |
| 188 # by removing the semicolon in HCGenericTestFailureReporter.m. |
| 189 cflags = [ "-Wno-semicolon-before-method-body" ] |
| 190 cflags_objc = [ "-fobjc-arc" ] |
| 191 } |
| 192 |
| 193 source_set("ochamcrest") { |
| 194 testonly = true |
| 195 configs += [ |
| 196 ":ochamcrest_config", |
| 197 ":ochamcrest_private_config", |
| 198 "//build/config/compiler:no_chromium_code", |
| 199 ] |
| 200 public_configs = [ ":ochamcrest_config" ] |
| 201 public_deps = [ |
| 202 ":ochamcrest_copy_files", |
| 203 ] |
| 204 sources = get_target_outputs(":ochamcrest_copy_files") |
| 205 } |
OLD | NEW |