qznn_test.go 374 B

12345678910111213141516171819202122232425262728
  1. package qznn
  2. import (
  3. "testing"
  4. "github.com/magiconair/properties/assert"
  5. )
  6. func TestStart(t *testing.T) {
  7. game := NewGame()
  8. game.Start()
  9. }
  10. func TestJoin(t *testing.T) {
  11. game := NewGame()
  12. game.Start()
  13. game.Join(1)
  14. _, exists := game.PlayerMap[1]
  15. assert.Equal(t, exists, true)
  16. }
  17. func TestReady(t *testing.T) {
  18. game := NewGame()
  19. game.Start()
  20. game.Ready(1)
  21. }