scala - 在scalatest中,如何在测试结果中显示完全差异?
问题描述
当 scalatest 中的相等断言失败时。它通常只显示不同的部分,例如:
"...error;
!I e: F[Arg]
[g invalid because
nonconformant bounds;
[Arg, Nothing]
[A <: __wrapper$1$47213a912399466a973eddce7b3420f4.__wrapper$1$47213a912399466a973eddce7b3420f4.]Bounds.Base, B]
im..." did not equal "...error;
!I e: F[Arg]
[Bounds.g invalid because
nonconformant bounds;
[Arg, Nothing]
[A <: ]Bounds.Base, B]
im..."
org.scalatest.exceptions.TestFailedException: "...error;
!I e: F[Arg]
[g invalid because
nonconformant bounds;
[Arg, Nothing]
[A <: __wrapper$1$47213a912399466a973eddce7b3420f4.__wrapper$1$47213a912399466a973eddce7b3420f4.]Bounds.Base, B]
im..." did not equal "...error;
!I e: F[Arg]
[Bounds.g invalid because
nonconformant bounds;
[Arg, Nothing]
[A <: ]Bounds.Base, B]
im..."
这份报告中丢失了很多信息。此外,当 IDE 配备差异解析器时,它会错误地显示比较结果。有没有办法在 scalatest 中禁用此功能,因此报告中不会有任何省略号?
解决方案
推荐阅读
- java - 使用 Tomcat 9 自定义日期格式日志记录
- google-api - 移动应用转化跟踪和再营销 API 始终返回 False
- java - 这里需要条件语句吗?
- python - 在 Linux 服务器上使用 Python Flask 的 Nginx 400 错误请求
- python - Fin plot 安装和导入问题
- javascript - 如果另一个 div 高度溢出,则显示/隐藏按钮
- php - 如何允许访问多站点上的 wordpress 插件 php 文件
- c++ - 在 C++ 中合并排序数组的问题
- c++ - !temp->left 和 temp->left!=NULL 不同吗?
- reactjs - ReactJS 定位组件