scherzma / Skunk

P2P Tor Chat App
GNU General Public License v3.0
4 stars 0 forks source link

Integration Tests for p_model Peer #12

Closed JavaHammes closed 6 months ago

JavaHammes commented 6 months ago

To ensure that our code works, it is important that we implement unit tests. We should make sure that we really test everything and ideally also test cases in which there should be an error. For this, as probably for all tests, we will use the testsuite: go testing package conjunction with the package: go assert As a start, we will first write tests for the p_model peer code. All tests can be found in the folder test. A file containing tests has the following name: *_test.go. Where * is the generic term for the code to be tested. The tests can then be executed with:

go test

Initial unit tests will test the code written in #11