Skip to content

Commit fefa2e7

Browse files
Fix TestLoadTools testcase
In commit 7520e66 (Removed no more used "coan" tools), one tool was removed, but this testcase was not updated accordingly. This commit updates the testcase with the correct number of tools to expect. While here, the testcase is expanded to also explicitely check the name and version number for all tools. This makes the test more complete, but also documents what tools and versions are expected exactly, which makes it easier to diagnose problems like this one later. Signed-off-by: Matthijs Kooijman <[email protected]>
1 parent 4c463af commit fefa2e7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/arduino.cc/builder/test/tools_loader_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func TestLoadTools(t *testing.T) {
6464
NoError(t, err)
6565

6666
tools := ctx.Tools
67-
require.Equal(t, 7, len(tools))
67+
require.Equal(t, 6, len(tools))
6868

6969
sort.Sort(ByToolIDAndVersion(tools))
7070

@@ -88,6 +88,10 @@ func TestLoadTools(t *testing.T) {
8888
require.Equal(t, "bossac", tools[idx].Name)
8989
require.Equal(t, "1.6.1-arduino", tools[idx].Version)
9090
require.Equal(t, Abs(t, "./downloaded_tools/bossac/1.6.1-arduino"), tools[idx].Folder)
91+
idx++
92+
require.Equal(t, "ctags", tools[idx].Name)
93+
require.Equal(t, "5.8-arduino10", tools[idx].Version)
94+
require.Equal(t, Abs(t, "./downloaded_tools/ctags/5.8-arduino10"), tools[idx].Folder)
9195
}
9296

9397
func TestLoadToolsWithBoardManagerFolderStructure(t *testing.T) {

0 commit comments

Comments
 (0)