Skip to content

Commit

Permalink
fix tests (#671)
Browse files Browse the repository at this point in the history
Relates to #667.

This updates the expected scores, now that we have removed the repetition boost.
  • Loading branch information
stefanhengl authored Oct 23, 2023
1 parent ca7ee51 commit 5bbf05d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1193,20 +1193,20 @@ func TestScoringWithDocumentRanks(t *testing.T) {
{
name: "score with no document ranks",
// 5500 (partial symbol at boundary) + 1000 (Java class) + 500 (word match) + 10 (file order)
wantScore: 7012.00,
wantScore: 7010.00,
},
{
name: "score with document ranks",
documentRank: 0.8,
// 5500 (partial symbol at boundary) + 1000 (Java class) + 500 (word match) + 225 (file rank) + 10 (file order)
wantScore: 7237.00,
wantScore: 7235.00,
},
{
name: "score with custom document ranks weight",
documentRank: 0.8,
documentRanksWeight: 1000.0,
// 5500 (partial symbol at boundary) + 1000 (Java class) + 500 (word match) + 25.00 (file rank) + 10 (file order)
wantScore: 7037.00,
wantScore: 7035.00,
},
}

Expand Down Expand Up @@ -1281,19 +1281,19 @@ func TestRepoRanks(t *testing.T) {
{
name: "no shard rank",
// 5500 (partial symbol at boundary) + 1000 (Java class) + 500 (word match) + 10 (file order)
wantScore: 7012.00,
wantScore: 7010.00,
},
{
name: "medium shard rank",
repoRank: 30000,
// 5500 (partial symbol at boundary) + 1000 (Java class) + 500 (word match) + 10 (file order) + 9.16 (repo rank)
wantScore: 7021.16,
wantScore: 7019.16,
},
{
name: "high shard rank",
repoRank: 60000,
// 5500 (partial symbol at boundary) + 1000 (Java class) + 500 (word match) + 10 (file order) + 18.31 (repo rank)
wantScore: 7030.31,
wantScore: 7028.31,
},
}

Expand Down

0 comments on commit 5bbf05d

Please sign in to comment.