Merge pull request #88 from realm/al-project
Make ReactTests runnable from RealmJS project
This commit is contained in:
commit
ce682c3f70
|
@ -124,6 +124,20 @@
|
|||
remoteGlobalIDString = 02B58CB01AE99CEC009B348C;
|
||||
remoteInfo = RealmJS;
|
||||
};
|
||||
02EE6D891BD87E310016A82E /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 02EE6D781BD87E310016A82E /* ReactTests.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 13B07F961A680F5B00A75B9A;
|
||||
remoteInfo = ReactTests;
|
||||
};
|
||||
02EE6D8B1BD87E310016A82E /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 02EE6D781BD87E310016A82E /* ReactTests.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 00E356EE1AD99517003FC87E;
|
||||
remoteInfo = RealmReactTests;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
|
@ -198,6 +212,7 @@
|
|||
02C0864C1BCDB27000942F9C /* list.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = list.cpp; path = "src/object-store/list.cpp"; sourceTree = "<group>"; };
|
||||
02C0864D1BCDB27000942F9C /* list.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = list.hpp; path = "src/object-store/list.hpp"; sourceTree = "<group>"; };
|
||||
02D456D91B7E59A500EE1299 /* ArrayTests.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = ArrayTests.js; path = tests/ArrayTests.js; sourceTree = SOURCE_ROOT; };
|
||||
02EE6D781BD87E310016A82E /* ReactTests.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReactTests.xcodeproj; path = tests/ReactTests/ios/ReactTests.xcodeproj; sourceTree = "<group>"; };
|
||||
F64E1EF01BC3510E00E0E150 /* util.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = util.js; path = tests/util.js; sourceTree = SOURCE_ROOT; };
|
||||
F68A278A1BC2722A0063D40A /* RJSModuleLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RJSModuleLoader.h; path = tests/RJSModuleLoader.h; sourceTree = SOURCE_ROOT; };
|
||||
F68A278B1BC2722A0063D40A /* RJSModuleLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RJSModuleLoader.m; path = tests/RJSModuleLoader.m; sourceTree = SOURCE_ROOT; };
|
||||
|
@ -305,6 +320,7 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
02A3C7841BC4317A00B1A7BE /* GCDWebServer.xcodeproj */,
|
||||
02EE6D781BD87E310016A82E /* ReactTests.xcodeproj */,
|
||||
02B58CCF1AE99D8C009B348C /* Frameworks */,
|
||||
0270BC3D1B7CFBFD00010E03 /* RealmJS */,
|
||||
02B58CC01AE99CEC009B348C /* RealmJSTests */,
|
||||
|
@ -354,6 +370,15 @@
|
|||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
02EE6D791BD87E310016A82E /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
02EE6D8A1BD87E310016A82E /* ReactTests.app */,
|
||||
02EE6D8C1BD87E310016A82E /* RealmReactTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
|
@ -487,6 +512,10 @@
|
|||
ProductGroup = 02A3C7851BC4317A00B1A7BE /* Products */;
|
||||
ProjectRef = 02A3C7841BC4317A00B1A7BE /* GCDWebServer.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 02EE6D791BD87E310016A82E /* Products */;
|
||||
ProjectRef = 02EE6D781BD87E310016A82E /* ReactTests.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
|
@ -533,6 +562,20 @@
|
|||
remoteRef = 02A3C7951BC4317A00B1A7BE /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
02EE6D8A1BD87E310016A82E /* ReactTests.app */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.application;
|
||||
path = ReactTests.app;
|
||||
remoteRef = 02EE6D891BD87E310016A82E /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
02EE6D8C1BD87E310016A82E /* RealmReactTests.xctest */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.cfbundle;
|
||||
path = RealmReactTests.xctest;
|
||||
remoteRef = 02EE6D8B1BD87E310016A82E /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
|
@ -574,7 +617,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = ": ${REALM_CORE_VERSION:=0.92.1.1} # set to \"current\" to always use the current build\n\necho \"Downloading dependency: core ${REALM_CORE_VERSION}\"\nTMP_DIR=\"$TMPDIR/core_bin\"\nmkdir -p \"${TMP_DIR}\"\nCORE_TMP_TAR=\"${TMP_DIR}/core-${REALM_CORE_VERSION}.tar.bz2.tmp\"\nCORE_TAR=\"${TMP_DIR}/core-${REALM_CORE_VERSION}.tar.bz2\"\nif [ ! -f \"${CORE_TAR}\" ]; then\ncurl -f -L -s \"http://static.realm.io/downloads/core/realm-core-${REALM_CORE_VERSION}.tar.bz2\" -o \"${CORE_TMP_TAR}\" ||\n(echo \"Downloading core failed. Please try again once you have an Internet connection.\" && exit 1)\nmv \"${CORE_TMP_TAR}\" \"${CORE_TAR}\"\nfi\n\n(\ncd \"${TMP_DIR}\"\nrm -rf core\ntar xjf \"${CORE_TAR}\"\nmv core core-${REALM_CORE_VERSION}\n)\n\nrm -rf core-${REALM_CORE_VERSION} core\nmv ${TMP_DIR}/core-${REALM_CORE_VERSION} .\nln -s core-${REALM_CORE_VERSION} core";
|
||||
shellScript = ": ${REALM_CORE_VERSION:=0.94.3} # set to \"current\" to always use the current build\n\necho \"Downloading dependency: core ${REALM_CORE_VERSION}\"\nTMP_DIR=\"$TMPDIR/core_bin\"\nmkdir -p \"${TMP_DIR}\"\nCORE_TMP_TAR=\"${TMP_DIR}/core-${REALM_CORE_VERSION}.tar.bz2.tmp\"\nCORE_TAR=\"${TMP_DIR}/core-${REALM_CORE_VERSION}.tar.bz2\"\nif [ ! -f \"${CORE_TAR}\" ]; then\ncurl -f -L -s \"http://static.realm.io/downloads/core/realm-core-${REALM_CORE_VERSION}.tar.bz2\" -o \"${CORE_TMP_TAR}\" ||\n(echo \"Downloading core failed. Please try again once you have an Internet connection.\" && exit 1)\nmv \"${CORE_TMP_TAR}\" \"${CORE_TAR}\"\nfi\n\n(\ncd \"${TMP_DIR}\"\nrm -rf core\ntar xjf \"${CORE_TAR}\"\nmv core core-${REALM_CORE_VERSION}\n)\n\nrm -rf core-${REALM_CORE_VERSION} core\nmv ${TMP_DIR}/core-${REALM_CORE_VERSION} .\nln -s core-${REALM_CORE_VERSION} core";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
|
@ -870,7 +913,7 @@
|
|||
"-isystem",
|
||||
core/include,
|
||||
);
|
||||
OTHER_LDFLAGS = "-lrealm-ios";
|
||||
OTHER_LDFLAGS = "-lrealm-ios-bitcode";
|
||||
OTHER_LIBTOOLFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
@ -903,7 +946,7 @@
|
|||
"-isystem",
|
||||
core/include,
|
||||
);
|
||||
OTHER_LDFLAGS = "-lrealm-ios";
|
||||
OTHER_LDFLAGS = "-lrealm-ios-bitcode";
|
||||
OTHER_LIBTOOLFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
@ -1036,7 +1079,7 @@
|
|||
"-isystem",
|
||||
core/include,
|
||||
);
|
||||
OTHER_LDFLAGS = "-lrealm-ios";
|
||||
OTHER_LDFLAGS = "-lrealm-ios-bitcode";
|
||||
OTHER_LIBTOOLFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "io.realm.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
|
|
@ -150,13 +150,13 @@ struct TrueExpression : realm::Expression {
|
|||
return realm::not_found;
|
||||
}
|
||||
void set_table() override {}
|
||||
const realm::Table* get_table() override { return nullptr; }
|
||||
const realm::Table* get_table() const override { return nullptr; }
|
||||
};
|
||||
|
||||
struct FalseExpression : realm::Expression {
|
||||
size_t find_first(size_t, size_t) const override { return realm::not_found; }
|
||||
void set_table() override {}
|
||||
const realm::Table* get_table() override { return nullptr; }
|
||||
const realm::Table* get_table() const override { return nullptr; }
|
||||
};
|
||||
|
||||
NSString *operatorName(NSPredicateOperatorType operatorType)
|
||||
|
@ -338,7 +338,7 @@ void process_or_group(realm::Query &query, id array, Func&& func) {
|
|||
// Queries can't be empty, so if there's zero things in the OR group
|
||||
// validation will fail. Work around this by adding an expression which
|
||||
// will never find any rows in a table.
|
||||
query.expression(new FalseExpression);
|
||||
query.and_query(new FalseExpression);
|
||||
}
|
||||
|
||||
query.end_group();
|
||||
|
@ -565,7 +565,7 @@ void update_query_with_predicate(NSPredicate *predicate, realm::Schema &schema,
|
|||
query.end_group();
|
||||
} else {
|
||||
// NSCompoundPredicate's documentation states that an AND predicate with no subpredicates evaluates to TRUE.
|
||||
query.expression(new TrueExpression);
|
||||
query.and_query(new TrueExpression);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -634,9 +634,9 @@ void update_query_with_predicate(NSPredicate *predicate, realm::Schema &schema,
|
|||
}
|
||||
}
|
||||
else if ([predicate isEqual:[NSPredicate predicateWithValue:YES]]) {
|
||||
query.expression(new TrueExpression);
|
||||
query.and_query(new TrueExpression);
|
||||
} else if ([predicate isEqual:[NSPredicate predicateWithValue:NO]]) {
|
||||
query.expression(new FalseExpression);
|
||||
query.and_query(new FalseExpression);
|
||||
}
|
||||
else {
|
||||
// invalid predicate type
|
||||
|
|
|
@ -409,9 +409,9 @@
|
|||
productReference = 00E356EE1AD99517003FC87E /* RealmReactTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
13B07F861A680F5B00A75B9A /* ReactTests */ = {
|
||||
13B07F861A680F5B00A75B9A /* ReactTestApp */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactTests" */;
|
||||
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactTestApp" */;
|
||||
buildPhases = (
|
||||
F65C4BCA1BC72C5A000A1793 /* ShellScript */,
|
||||
13B07F871A680F5B00A75B9A /* Sources */,
|
||||
|
@ -424,7 +424,7 @@
|
|||
dependencies = (
|
||||
F6F405B81BCE55FB00A1E24F /* PBXTargetDependency */,
|
||||
);
|
||||
name = ReactTests;
|
||||
name = ReactTestApp;
|
||||
productName = "Hello World";
|
||||
productReference = 13B07F961A680F5B00A75B9A /* ReactTests.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
|
@ -507,7 +507,7 @@
|
|||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
13B07F861A680F5B00A75B9A /* ReactTests */,
|
||||
13B07F861A680F5B00A75B9A /* ReactTestApp */,
|
||||
00E356ED1AD99517003FC87E /* RealmReactTests */,
|
||||
);
|
||||
};
|
||||
|
@ -674,7 +674,7 @@
|
|||
/* Begin PBXTargetDependency section */
|
||||
00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 13B07F861A680F5B00A75B9A /* ReactTests */;
|
||||
target = 13B07F861A680F5B00A75B9A /* ReactTestApp */;
|
||||
targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
|
||||
};
|
||||
F6F405B81BCE55FB00A1E24F /* PBXTargetDependency */ = {
|
||||
|
@ -859,7 +859,7 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactTests" */ = {
|
||||
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactTestApp" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
13B07F941A680F5B00A75B9A /* Debug */,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "ReactTests.app"
|
||||
BlueprintName = "ReactTests"
|
||||
BlueprintName = "ReactTestApp"
|
||||
ReferencedContainer = "container:ReactTests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
|
@ -58,7 +58,7 @@
|
|||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "ReactTests.app"
|
||||
BlueprintName = "ReactTests"
|
||||
BlueprintName = "ReactTestApp"
|
||||
ReferencedContainer = "container:ReactTests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
|
@ -81,7 +81,7 @@
|
|||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "ReactTests.app"
|
||||
BlueprintName = "ReactTests"
|
||||
BlueprintName = "ReactTestApp"
|
||||
ReferencedContainer = "container:ReactTests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
|
@ -100,7 +100,7 @@
|
|||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "ReactTests.app"
|
||||
BlueprintName = "ReactTests"
|
||||
BlueprintName = "ReactTestApp"
|
||||
ReferencedContainer = "container:ReactTests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
Loading…
Reference in New Issue