Conversation
Why: 当前测试用例较多(48+),当发生测试失败时,错误信息淹没在大量的控制台输出中,开发者需要向上翻页查找具体的失败位置,影响调试效率。 What: 修改 test/test_main_new.c,实现了失败用例的自动收集与汇总: 1. 定义静态数组 failed_tests(容量 200),用于存储失败测试名称; 2. 利用 Unity 的 tearDown 钩子,在检测到 Unity.CurrentTestFailed 时自动记录当前测试名; 3. 在 main 函数末尾(测试执行结束后)新增汇总打印逻辑,直接列出所有失败的测试用例名称。 TEST: 测试结束后,控制台最末尾将清晰显示失败用例列表,开发者可一眼定位问题。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why: 当前测试用例较多(48+),当发生测试失败时,错误信息淹没在大量的控制台输出中,开发者需要向上翻页查找具体的失败位置,影响调试效率。
What:
修改 test/test_main_new.c,实现了失败用例的自动收集与汇总:
TEST: 测试结束后,控制台最末尾将清晰显示失败用例列表,开发者可一眼定位问题。