File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed
internal/integrationtest/daemon Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
2323 "time"
2424
2525 "github.com/arduino/arduino-cli/arduino"
26+ f "github.com/arduino/arduino-cli/internal/algorithms"
2627 "github.com/arduino/arduino-cli/internal/integrationtest"
2728 "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
2829 "github.com/arduino/go-paths-helper"
@@ -187,13 +188,7 @@ func TestDaemonCompileOptions(t *testing.T) {
187188 // assert that the task progress is increasing and doesn't contain multiple 100% values
188189 results := analyzer .Results ["" ]
189190 require .True (t , results [len (results )- 1 ].Completed )
190- require .IsNonDecreasing (t , func () []float32 {
191- res := make ([]float32 , len (results ))
192- for i := 0 ; i < len (results ); i ++ {
193- res [i ] = results [i ].Percent
194- }
195- return res
196- }())
191+ require .IsNonDecreasing (t , f .Map (results , (* commands .TaskProgress ).GetPercent ))
197192}
198193
199194func TestDaemonCompileAfterFailedLibInstall (t * testing.T ) {
Original file line number Diff line number Diff line change 1+ // This file is part of arduino-cli.
2+ //
3+ // Copyright 2022 ARDUINO SA (http://www.arduino.cc/)
4+ //
5+ // This software is released under the GNU General Public License version 3,
6+ // which covers the main part of arduino-cli.
7+ // The terms of this license can be found at:
8+ // https://www.gnu.org/licenses/gpl-3.0.en.html
9+ //
10+ // You can be released from the requirements of the above licenses by purchasing
11+ // a commercial license. Buying such a license is mandatory if you want to
12+ // modify or otherwise use the software for commercial activities involving the
13+ // Arduino software without disclosing the source code of your own applications.
14+ // To purchase a commercial license, send an email to [email protected] . 15+
116package daemon_test
217
318import (
You can’t perform that action at this time.
0 commit comments