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

关于pg 的test case #110

Closed
baiwfg2 opened this issue Feb 22, 2022 · 1 comment
Closed

关于pg 的test case #110

baiwfg2 opened this issue Feb 22, 2022 · 1 comment

Comments

@baiwfg2
Copy link

baiwfg2 commented Feb 22, 2022

学习一项新项目代码,我倾向先看其test case 是什么样的,它不仅能帮忙快速了解各个函数是如何拼接在一起,如何达到预期的值的,而且让我们了解到开发者是如何证明代码是OK的,将来若被破坏是容易被发现的。

然而发现 pg 的test case 很少用 c 写的,这也能理解,毕竟 没有像gtest 那样的常用框架。大部分是用 perl 写的,目前还没法看懂。

我现在不太确定那些用 perl 写的case 的价值,值不值得我花点时间去学习perl 以读懂 pg 的test case。 您所了解到pg 社区重视代码的自动化测试、回归测试等吗?我怎么感觉源码里的 src/test cases 太少了,似乎没有大规模覆盖 src/backend 里的那么多源码逻辑?

@digoal
Copy link
Owner

digoal commented Sep 15, 2022

这块没有深入研究, 以前写过一篇覆盖率测试的相关文档:
https://github.com/digoal/blog/blob/master/201509/20150907_02.md
有些代码未覆盖, 可能需要增加与之相关的test case.

@digoal digoal closed this as completed Mar 19, 2023
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

2 participants