Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[utest] 单元测试框架不够完善 #8869

Open
wdfk-prog opened this issue Apr 27, 2024 · 3 comments
Open

[utest] 单元测试框架不够完善 #8869

wdfk-prog opened this issue Apr 27, 2024 · 3 comments

Comments

@wdfk-prog
Copy link
Contributor

  • 单元测试提供的宏太少了,对比其Unity测试框架来说的话
  • 对于断言失败也没有退出机制,还得自行手动退出

https://github.com/ThrowTheSwitch/Unity/blob/25ca536caf5c085c453917fe139b3303b8a36e9d/src/unity.h#L102-L691

@BernardXiong
Copy link
Member

欢迎PR新的特性

@wdfk-prog
Copy link
Contributor Author

欢迎PR新的特性

  • 直接copy别人的代码修改合适吗...
  • 或许应该把unity的直接拉进来,再进行修改更好

@polarvid
Copy link
Contributor

polarvid commented May 6, 2024

另外 assert 不支持运行时表达式结果打印。比如 assert_equal(a, b),如果出错大部分框架都会展示 a, b 的运行时结果。类似

assert failed: a == b,
    a is $RUNTIME_VALUE_A
    b is $RUNTIME_VALUE_B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants