From 9ba088053d5680ac4720fa488367c745b994d006 Mon Sep 17 00:00:00 2001 From: Gil Date: Wed, 9 May 2018 20:49:32 -0700 Subject: Add missing tests to the Firestore project (#1254) * Fix order of project elements * Add immutable container tests to the Firestore project * Fix style problems in TransformOperations * Method names should have an initial upper case character (except getters/setters) * Pointers bind to the type not the name in C++ * Fix unsigned/signed comparison warning * Make transform_operations.h Objective-C++ only It turns out that you can't conditionally define virtual methods. This causes multiple versions of the vtable to be emitted and when the linker resolves all the vtable definitions for a class it picks one arbitrarily causing failures for callers that expect some of the conditional methods to be present. * Add precondition_test and field_mask_test to the project * Add field_transform_test and transform_operations_test to the project * Clean up missing newline/excess comments * Use braced initialization to avoid linter false positive on std::transform --- Firestore/Source/Model/FSTMutation.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Firestore/Source') diff --git a/Firestore/Source/Model/FSTMutation.mm b/Firestore/Source/Model/FSTMutation.mm index ee6ef9c..82a535e 100644 --- a/Firestore/Source/Model/FSTMutation.mm +++ b/Firestore/Source/Model/FSTMutation.mm @@ -400,7 +400,7 @@ serverTransformResultsWithBaseDocument:(nullable FSTMaybeDocument *)baseDocument } [transformResults - addObject:transform.applyToRemoteDocument(previousValue, serverTransformResults[i])]; + addObject:transform.ApplyToRemoteDocument(previousValue, serverTransformResults[i])]; } return transformResults; } @@ -426,7 +426,7 @@ serverTransformResultsWithBaseDocument:(nullable FSTMaybeDocument *)baseDocument previousValue = [((FSTDocument *)baseDocument) fieldForPath:fieldTransform.path()]; } - [transformResults addObject:transform.applyToLocalView(previousValue, localWriteTime)]; + [transformResults addObject:transform.ApplyToLocalView(previousValue, localWriteTime)]; } return transformResults; } -- cgit v1.2.3