TEST(QueryProjectionTest, ValidPositionalOperatorProjections) {
    createFindProjection("{a: 1}", "{'a.$': 1}");
    createFindProjection("{a: 1}", "{'a.foo.bar.$': 1}");
    createFindProjection("{'a.b.c': 1}", "{'a.b.c.$': 1}");
    createFindProjection("{'a.b.c': 1}", "{'a.e.f.$': 1}");
    createFindProjection("{a: {b: 1}}", "{'a.$': 1}");
    createFindProjection("{a: 1, b: 1}}", "{'a.$': 1}");
    createFindProjection("{a: 1, b: 1}}", "{'b.$': 1}");
    createFindProjection("{$and: [{a: 1}, {b: 1}]}", "{'a.$': 1}");
    createFindProjection("{$and: [{a: 1}, {b: 1}]}", "{'b.$': 1}");
    createFindProjection("{$or: [{a: 1}, {b: 1}]}", "{'a.$': 1}");
    createFindProjection("{$or: [{a: 1}, {b: 1}]}", "{'b.$': 1}");
    createFindProjection("{$and: [{$or: [{a: 1}, {$and: [{b: 1}, {c: 1}]}]}]}", "{'c.d.f.$': 1}");
}
TEST(QueryProjectionTest, ValidPositionalOperatorProjections) {
    createFindProjection("{a: 1}", "{'a.$': 1}");
    createFindProjection("{a: 1}", "{'a.foo.bar.$': 1}");
    createFindProjection("{'a.b.c': 1}", "{'a.b.c.$': 1}");
    createFindProjection("{'a.b.c': 1}", "{'a.e.f.$': 1}");
    createFindProjection("{a: {b: 1}}", "{'a.$': 1}");
    createFindProjection("{a: 1, b: 1}}", "{'a.$': 1}");
    createFindProjection("{a: 1, b: 1}}", "{'b.$': 1}");
    createFindProjection("{$and: [{a: 1}, {b: 1}]}", "{'a.$': 1}");
    createFindProjection("{$and: [{a: 1}, {b: 1}]}", "{'b.$': 1}");
    createFindProjection("{$or: [{a: 1}, {b: 1}]}", "{'a.$': 1}");
    createFindProjection("{$or: [{a: 1}, {b: 1}]}", "{'b.$': 1}");
    createFindProjection("{$and: [{$or: [{a: 1}, {$and: [{b: 1}, {c: 1}]}]}]}", "{'c.d.f.$': 1}");
}