google / google/s2-geometry-library-java

S2CellUnionTests Line 258-260 should be removed.

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-migrated Priority-Medium Type-Defect
Dominant language
Java
Stars
587
Forks
231
PR merge metrics
No merged PRs in 30d

Description

```
Line 258-260 as below should be removed:

if (!u.contains(xId)) {
u.getIntersection(xCells, yId);
}

It is extraneous and guarantees the subsequent assertTrue(u.contains(xId)); on
line 261 will always work even though this is the line that is being ultimately
tested.
```

Original issue reported on code.google.com by `uvico...@gmail.com` on 9 Jul 2013 at 1:39

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open S2CellUnionTests and inspect lines 258-261, focusing on how the assertion is currently made reachable. Confirm the test still exercises the intended behavior without the extraneous block, then run the relevant S2CellUnion tests and verify the assertion remains meaningful.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.