reporter_test.go 590 B

12345678910111213141516171819202122232425262728293031
  1. package micro
  2. import (
  3. "reflect"
  4. "testing"
  5. )
  6. func TestReporter_getMachineCode(t *testing.T) {
  7. type fields struct {
  8. ServerAddr string
  9. machineCode []byte
  10. }
  11. tests := []struct {
  12. name string
  13. fields fields
  14. want []byte
  15. }{
  16. // TODO: Add test cases.
  17. }
  18. for _, tt := range tests {
  19. t.Run(tt.name, func(t *testing.T) {
  20. r := &Reporter{
  21. ServerAddr: tt.fields.ServerAddr,
  22. machineCode: tt.fields.machineCode,
  23. }
  24. if got := r.getMachineCode(); !reflect.DeepEqual(got, tt.want) {
  25. t.Errorf("Reporter.getMachineCode() = %v, want %v", got, tt.want)
  26. }
  27. })
  28. }
  29. }