rt-thread
rt-thread copied to clipboard
[utest] 单元测试框架不够完善
- 单元测试提供的宏太少了,对比其Unity测试框架来说的话
- 对于断言失败也没有退出机制,还得自行手动退出
https://github.com/ThrowTheSwitch/Unity/blob/25ca536caf5c085c453917fe139b3303b8a36e9d/src/unity.h#L102-L691
欢迎PR新的特性
欢迎PR新的特性
- 直接copy别人的代码修改合适吗...
- 或许应该把unity的直接拉进来,再进行修改更好
另外 assert 不支持运行时表达式结果打印。比如 assert_equal(a, b),如果出错大部分框架都会展示 a, b 的运行时结果。类似
assert failed: a == b,
a is $RUNTIME_VALUE_A
b is $RUNTIME_VALUE_B