[componentkit][test] Move mock CK imports to own .h file

Reviewed By: dulmarod

Differential Revision: D3909240

fbshipit-source-id: 66e8b71
master
Ryan Rhee 8 years ago committed by Facebook Github Bot 2
parent 561f4fdfad
commit f54b84c751

@ -0,0 +1,26 @@
/*
* Copyright (c) 2016 - present Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <Foundation/Foundation.h>
// Mimic importing CKComponnet
@interface CKComponent : NSObject
@end
// Mimic importing CKCompositeComponnet
@interface CKCompositeComponent : CKComponent
+ (instancetype)newWithComponent:(CKComponent*)component;
@end
// Mimic importing CKLabelComponent
typedef struct { NSString* string; } LabelAttributes;
typedef struct { int thisStructIsEmpty; } ViewAttributes;
typedef struct { int thisStructIsEmpty; } CKSize;

@ -9,28 +9,7 @@
#import <Foundation/Foundation.h>
// Mimic importing CKComponnet
@interface CKComponent : NSObject
@end
@implementation CKComponent
@end
// Mimic importing CKCompositeComponnet
@interface CKCompositeComponent : CKComponent
+ (instancetype)newWithComponent:(CKComponent*)component;
@end
@implementation CKCompositeComponent
+ (instancetype)newWithComponent:(CKComponent*)component {
return nil;
}
@end
// Mimic importing CKLabelComponent
typedef struct { NSString* string; } LabelAttributes;
typedef struct { int thisStructIsEmpty; } ViewAttributes;
typedef struct { int thisStructIsEmpty; } CKSize;
#import "FakeComponentKitHeader.h"
@interface CKLabelComponent : CKCompositeComponent
+ (instancetype)newWithLabelAttributes:(LabelAttributes)labelAttributes

@ -1,11 +1,11 @@
componentkit/Test.mm, BarComponent_new, 103, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, BarComponent_new, 105, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 69, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 74, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 76, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 80, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 85, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, SomeClass_init, 58, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, BarComponent_new, 82, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, BarComponent_new, 84, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 48, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 53, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 55, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 59, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, FooComponent_newWithString:, 64, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
componentkit/Test.mm, SomeClass_init, 37, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE
cxx_reference_in_block/block.mm, A_foo3:param2:, 37, CXX_REFERENCE_CAPTURED_IN_OBJC_BLOCK
cxx_reference_in_block/block.mm, A_foo:, 20, CXX_REFERENCE_CAPTURED_IN_OBJC_BLOCK
global-var/B.mm, Linters_dummy_method, 30, GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL

Loading…
Cancel
Save