@@ -68,14 +68,14 @@ func TestBoardFromPorts(t *testing.T) {
68
68
name : "port-filter" ,
69
69
filter : & CreateParams {FQBN : nil , Port : stringPointer ("ACM1" )},
70
70
ports : portsTwoBoards ,
71
- want : & board {fqbn : "arduino:avr:uno" , port : "ACM1" },
71
+ want : & board {fqbn : "arduino:avr:uno" , address : "ACM1" },
72
72
},
73
73
74
74
{
75
75
name : "fqbn-filter" ,
76
76
filter : & CreateParams {FQBN : stringPointer ("arduino:avr:uno" ), Port : nil },
77
77
ports : portsTwoBoards ,
78
- want : & board {fqbn : "arduino:avr:uno" , port : "ACM1" },
78
+ want : & board {fqbn : "arduino:avr:uno" , address : "ACM1" },
79
79
},
80
80
81
81
{
@@ -90,7 +90,7 @@ func TestBoardFromPorts(t *testing.T) {
90
90
filter : & CreateParams {FQBN : nil , Port : nil },
91
91
ports : portsTwoBoards ,
92
92
// first board found is selected
93
- want : & board {fqbn : "arduino:samd:nano_33_iot" , port : "ACM0" },
93
+ want : & board {fqbn : "arduino:samd:nano_33_iot" , address : "ACM0" },
94
94
},
95
95
96
96
{
@@ -104,7 +104,7 @@ func TestBoardFromPorts(t *testing.T) {
104
104
name : "both-filter-found" ,
105
105
filter : & CreateParams {FQBN : stringPointer ("arduino:avr:uno" ), Port : stringPointer ("ACM1" )},
106
106
ports : portsTwoBoards ,
107
- want : & board {fqbn : "arduino:avr:uno" , port : "ACM1" },
107
+ want : & board {fqbn : "arduino:avr:uno" , address : "ACM1" },
108
108
},
109
109
110
110
{
@@ -123,14 +123,14 @@ func TestBoardFromPorts(t *testing.T) {
123
123
return
124
124
125
125
} else if got != nil && tt .want == nil {
126
- t .Errorf ("Expected nil board, received not nil board with port %s and fqbn %s" , got .port , got .fqbn )
126
+ t .Errorf ("Expected nil board, received not nil board with port %s and fqbn %s" , got .address , got .fqbn )
127
127
128
128
} else if got == nil && tt .want != nil {
129
- t .Errorf ("Expected not nil board with port %s and fqbn %s, received a nil board" , tt .want .port , tt .want .fqbn )
129
+ t .Errorf ("Expected not nil board with port %s and fqbn %s, received a nil board" , tt .want .address , tt .want .fqbn )
130
130
131
- } else if got .port != tt .want .port || got .fqbn != tt .want .fqbn {
131
+ } else if got .address != tt .want .address || got .fqbn != tt .want .fqbn {
132
132
t .Errorf ("Expected board with port %s and fqbn %s, received board with port %s and fqbn %s" ,
133
- tt .want .port , tt .want .fqbn , got .port , got .fqbn )
133
+ tt .want .address , tt .want .fqbn , got .address , got .fqbn )
134
134
}
135
135
})
136
136
}
0 commit comments