Skip to content

Commit

Permalink
Add logging to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
a-maurice committed Aug 20, 2024
1 parent c11a478 commit 194e042
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4680,6 +4680,17 @@ private void AssertQueryResults(string desc, Query query, List<string> docIds) {
private void AssertQueryResults(string desc, Query query, List<string> docIds, long count) {
var snapshot = Await(query.GetSnapshotAsync());

if (docIds.Count != count) {
UnityEngine.Debug.Log("=-=-= WTF!!!");
}

if (snapshot.Count != docIds.Count) {
UnityEngine.Debug.Log("===== Got a snapshot for " + desc + ". Count: " + snapshot.Count + " expected: " + count);
for (int i = 0; i < snapshot.Count; i++) {
UnityEngine.Debug.Log("===== snapshot[" + i + "]: " + snapshot[i].Id);
}
}

AssertEq(desc + ": Query result count", snapshot.Count, docIds.Count);
for (int i = 0; i < snapshot.Count; i++) {
AssertEq(desc + ": Document ID " + i, docIds[i], snapshot[i].Id);
Expand Down

0 comments on commit 194e042

Please sign in to comment.