final fixes

This commit is contained in:
Ari Lazier 2016-02-17 20:51:03 -08:00
parent 1d01a1db73
commit b3486c0d0e
2 changed files with 5 additions and 1 deletions

View File

@ -160,7 +160,7 @@ JSObjectRef RJSResultsCreate(JSContextRef ctx, SharedRealm realm, std::string cl
JSObjectRef RJSResultsCreate(JSContextRef ctx, realm::SharedRealm realm, const realm::ObjectSchema &objectSchema, realm::Query query, size_t argumentCount, const JSValueRef arguments[]) {
std::string queryString = RJSValidatedStringForValue(ctx, arguments[0], "predicate");
std::vector<JSValueRef> args( argumentCount - 1 );
std::vector<JSValueRef> args(argumentCount - 1);
for (size_t i = 1; i < argumentCount; i++) {
args[i-1] = arguments[i];
}

View File

@ -130,6 +130,10 @@ module.exports = BaseTest.extend({
TestCase.assertEqual(realm.objects('DefaultValuesObject').filtered('dateCol > $0', new Date(4)).length, 1);
TestCase.assertEqual(realm.objects('DefaultValuesObject').filtered('dateCol <= $0', new Date(4)).length, 2);
TestCase.assertThrows(function() {
realm.objects('PersonObject').filtered("invalidQuery");
});
},
testSort: function() {
var realm = new Realm({schema: [schemas.TestObject]});