11
11
import org .junit .Test ;
12
12
13
13
import io .sloeber .core .api .Preferences ;
14
+ import io .sloeber .core .api .SloeberProject ;
14
15
import io .sloeber .providers .Arduino ;
15
16
16
17
/**
@@ -43,7 +44,9 @@ public void setup() {
43
44
44
45
@ Test
45
46
public void upgradeSingleConfigProjectFromVersion4_3_3 () throws Exception {
46
-
47
+ /*
48
+ * A arduino uno project is upgraded that need the extra compile option extraCPP
49
+ */
47
50
String projectName = "upgradeSingleConfigProject" ;
48
51
String inputZipFile = Shared .getprojectZip ("upgradeSingleConfigProject4_3_3.zip" ).toOSString ();
49
52
// /io.sloeber.tests/src/projects/upgradeSingleConfigProject4_3_3.zip
@@ -55,8 +58,15 @@ public void upgradeSingleConfigProjectFromVersion4_3_3() throws Exception {
55
58
theTestProject .open (null );
56
59
Shared .waitForAllJobsToFinish (); // for the indexer
57
60
theTestProject .build (IncrementalProjectBuilder .FULL_BUILD , null );
61
+ if (!Shared .hasBuildErrors (theTestProject )) {
62
+ fail ("The project has been automagically upgraded:" + projectName );
63
+ }
64
+ //try to convert the project
65
+ SloeberProject .convertToArduinoProject (theTestProject , null );
66
+ Shared .waitForAllJobsToFinish (); // for the indexer
67
+ theTestProject .build (IncrementalProjectBuilder .FULL_BUILD , null );
58
68
if (Shared .hasBuildErrors (theTestProject )) {
59
- fail ("Failed to compile the project:" + projectName );
69
+ fail ("Failed to compile the upgraded project:" + projectName );
60
70
}
61
71
}
62
72
0 commit comments