diff options
author | Konstantin Varlamov <var-const@users.noreply.github.com> | 2018-02-20 17:33:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-20 17:33:57 -0500 |
commit | 14ea068f5fd03a658017f8472a4078a727fabc3a (patch) | |
tree | 56696c49546e2147ec1b8ebdeba24dd292f0c951 /Firestore/Example/Tests/Util | |
parent | de00de25deebc35c4c7167135d5b1f29a7d9fe6f (diff) |
Make FSTTimestamp into a public Firestore class (#698)
- FSTTimestamp is now FIRTimestamp, under Firestore/Source/{Public,API}. This is a temporary solution; eventually, FIRTimestamp is supposed to live somewhere under Firebase;
- move most internal Timestamp methods to the public header (the only exception is ISOString).
Diffstat (limited to 'Firestore/Example/Tests/Util')
-rw-r--r-- | Firestore/Example/Tests/Util/FSTHelpers.h | 6 | ||||
-rw-r--r-- | Firestore/Example/Tests/Util/FSTHelpers.mm | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/Firestore/Example/Tests/Util/FSTHelpers.h b/Firestore/Example/Tests/Util/FSTHelpers.h index 4dbf910..9ee9a0b 100644 --- a/Firestore/Example/Tests/Util/FSTHelpers.h +++ b/Firestore/Example/Tests/Util/FSTHelpers.h @@ -37,7 +37,7 @@ @class FSTSnapshotVersion; @class FSTSortOrder; @class FSTTargetChange; -@class FSTTimestamp; +@class FIRTimestamp; @class FSTTransformMutation; @class FSTView; @class FSTViewSnapshot; @@ -132,8 +132,8 @@ extern "C" { XCTAssertTrue(__didThrow, ##__VA_ARGS__); \ }) -/** Creates a new FSTTimestamp from components. Note that year, month, and day are all one-based. */ -FSTTimestamp *FSTTestTimestamp(int year, int month, int day, int hour, int minute, int second); +/** Creates a new FIRTimestamp from components. Note that year, month, and day are all one-based. */ +FIRTimestamp *FSTTestTimestamp(int year, int month, int day, int hour, int minute, int second); /** Creates a new NSDate from components. Note that year, month, and day are all one-based. */ NSDate *FSTTestDate(int year, int month, int day, int hour, int minute, int second); diff --git a/Firestore/Example/Tests/Util/FSTHelpers.mm b/Firestore/Example/Tests/Util/FSTHelpers.mm index 452e9a6..586fdbc 100644 --- a/Firestore/Example/Tests/Util/FSTHelpers.mm +++ b/Firestore/Example/Tests/Util/FSTHelpers.mm @@ -21,12 +21,12 @@ #import <FirebaseFirestore/FIRFieldPath.h> #import <FirebaseFirestore/FIRGeoPoint.h> +#import <FirebaseFirestore/FIRTimestamp.h> #import "Firestore/Source/API/FIRFieldPath+Internal.h" #import "Firestore/Source/API/FSTUserDataConverter.h" #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Core/FSTSnapshotVersion.h" -#import "Firestore/Source/Core/FSTTimestamp.h" #import "Firestore/Source/Core/FSTView.h" #import "Firestore/Source/Core/FSTViewSnapshot.h" #import "Firestore/Source/Local/FSTLocalViewChanges.h" @@ -55,9 +55,9 @@ static NSString *const kDeleteSentinel = @"<DELETE>"; static const int kMicrosPerSec = 1000000; static const int kMillisPerSec = 1000; -FSTTimestamp *FSTTestTimestamp(int year, int month, int day, int hour, int minute, int second) { +FIRTimestamp *FSTTestTimestamp(int year, int month, int day, int hour, int minute, int second) { NSDate *date = FSTTestDate(year, month, day, hour, minute, second); - return [FSTTimestamp timestampWithDate:date]; + return [FIRTimestamp timestampWithDate:date]; } NSDate *FSTTestDate(int year, int month, int day, int hour, int minute, int second) { @@ -140,7 +140,7 @@ FSTSnapshotVersion *FSTTestVersion(FSTTestSnapshotVersion versionMicroseconds) { int64_t seconds = versionMicroseconds / kMicrosPerSec; int32_t nanos = (int32_t)(versionMicroseconds % kMicrosPerSec) * kMillisPerSec; - FSTTimestamp *timestamp = [[FSTTimestamp alloc] initWithSeconds:seconds nanos:nanos]; + FIRTimestamp *timestamp = [[FIRTimestamp alloc] initWithSeconds:seconds nanoseconds:nanos]; return [FSTSnapshotVersion versionWithTimestamp:timestamp]; } |