Skip to content

Commit 0098829

Browse files
committed
change tests
1 parent 591816b commit 0098829

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Firestore/Swift/Tests/Integration/PipelineApiTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ final class PipelineTests: FSTIntegrationTestCase {
4040
func testWhereStage() async throws {
4141
_ = db.pipeline().collection("books")
4242
.where(
43-
Field("rating") > 4.0 && Field("genre") == "Science Fiction" || ArrayContains(
43+
Field("rating").gt(4.0) && Field("genre").eq("Science Fiction") || ArrayContains(
4444
fieldName: "fieldName",
4545
values: "rating"
4646
)
@@ -327,7 +327,7 @@ final class PipelineTests: FSTIntegrationTestCase {
327327
}
328328

329329
func testBooleanExpr() async throws {
330-
let isApple: BooleanExpr = Field("type") == "apple"
330+
let isApple: BooleanExpr = Field("type").eq("apple")
331331

332332
// USAGE: stage where requires an expression of type BooleanExpr
333333
let allAppleOptions: Pipeline = db.pipeline().collection("fruitOptions").where(isApple)

Firestore/Swift/Tests/Integration/PipelineTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class PipelineIntegrationTests: FSTIntegrationTestCase {
118118
let snapshot = try await firestore()
119119
.pipeline()
120120
.collection("/foo")
121-
.where(Field("foo") == Constant("bar"))
121+
.where(Field("foo").eq(Constant("bar")))
122122
.execute()
123123

124124
print(snapshot)

Firestore/core/src/api/stages.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,7 @@ google_firestore_v1_Pipeline_Stage ReplaceWith::to_proto() const {
319319
return result;
320320
}
321321

322-
ReplaceWith::ReplaceWith(std::shared_ptr<Expr> expr)
323-
: expr_(std::move(expr)) {
322+
ReplaceWith::ReplaceWith(std::shared_ptr<Expr> expr) : expr_(std::move(expr)) {
324323
}
325324

326325
Sample::Sample(std::string type, int64_t count, double percentage)

0 commit comments

Comments
 (0)