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

Go 单元测试 | 李斌的技术博客 #249

Open
jefferyjob opened this issue Jul 30, 2024 · 0 comments
Open

Go 单元测试 | 李斌的技术博客 #249

jefferyjob opened this issue Jul 30, 2024 · 0 comments

Comments

@jefferyjob
Copy link
Member

https://blog.mailjob.net/posts/3472441059.html

go test工具 Go语言中的测试依赖go test命令。编写测试代码和编写普通的Go代码过程是类似的,并不需要学习新的语法、规则或工具。 go test命令是一个按照一定约定和组织的测试代码的驱动程序。在包目录内,所有以xxx_test.go为后缀名的源代码文件都是go test测试的一部分,不会被go build编译到最终的可执行文件中。 在xxx_test.go文件中有三种类型的函数,单元

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

1 participant