google / google/s2-geometry-library-java

S1ChordAngleTest Failure

未关闭
#44 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
587
派生
231
PR 合并指标
30 天内没有已合并 PR

描述

I get the following failure when I run `mvn test`:

```
[ERROR] Tests run: 20, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.027 s <<< FAILURE! - in com.google.common.geometry.S1ChordAngleTest
[ERROR] com.google.common.geometry.S1ChordAngleTest.testTrigonometry Time elapsed: 0.003 s <<< FAILURE!
junit.framework.AssertionFailedError: expected:<0.15643446504023098> but was:<0.1564344650402278>
at junit.framework.Assert.fail(Assert.java:57)
...
```

Note that, as I mentioned in [issue 43](https://github.com/google/s2-geometry-library-java/issues/43), I had to change the `guava.version` from `32.0-jre` to `32.0.0-jre` in `pom.xml` to get `mvn compile` to succeed. That is the only local diff I have compared to the `master` branch.

In case it's relevant, when I run `java -version`, that returns

```
java version "22.0.1" 2024-04-16
Java(TM) SE Runtime Environment (build 22.0.1+8-16)
Java HotSpot(TM) 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)
```

贡献指南

打开贡献指南

调研方向

从 S1ChordAngleTest.testTrigonometry 开始,并在 Java 22 下使用 mvn test 重现失败。检查 pom.xml,包括 issue 中报告的 guava.version 变更,并将失败的数值断言与项目的预期行为进行比较;完成的标准是找出并处理原因,使测试套件能够稳定通过。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
testing
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。