[英]Testing golang folder structure
我的文件夾結構如下:
src/
github.com/
hello/
hello.go
hello_test.go
integers/
integers.go
integers_test.go
hello.go/hello_test.go
屬於 package 主
integers.go/integers_test.go
屬於 package 整數
從文件夾 hello 的根目錄運行go test
時,它只運行hello_test.go
。 我怎樣才能讓它遞歸地運行所有測試。 這是在各自的包中構建測試的正確方法嗎?
有一個make文件怎么樣? 將來,如果您擴展項目並擁有更多測試文件,則只需運行make test
即可一次測試所有這些文件。 這個鏈接會很有幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.