断言不匹配:-ea未指定,但-Dtests.asserts = true [英] Assertions mismatch: -ea was not specified but -Dtests.asserts=true

查看:182
本文介绍了断言不匹配:-ea未指定,但-Dtests.asserts = true的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行maven测试时,它成功运行。
但是,与Eclipse中的相​​同项目,它显示以下错误。

When I run maven test, it works successfully. However, with the same project in Eclipse, it shows the following error.

Assertions mismatch: -ea was not specified but -Dtests.asserts=true

应该添加或更改哪些配置?

What configuration should be added or changed?

推荐答案

这是因为Eclipse项目没有正确配置。

This is because the Eclipse project is not properly configured.


  1. eclipse首选项 - > junit - >添加-ea复选框。

  2. 右键单击eclipse项目 - >运行as - >运行配置 - >参数选项卡 - >添加< vm参数

这篇关于断言不匹配:-ea未指定,但-Dtests.asserts = true的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆