Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2019-03-26 17:34:16 -0400
committerJeff Johnston2019-04-03 10:20:28 -0400
commit5bd43cf304999714f6e8b1c23638e7ffd0e51a74 (patch)
tree7475b4ee626b812a73db14e0a3cf33c82901f79c
parentd9550199f882e71343e3e2caa1e2c12360b84c64 (diff)
downloadorg.eclipse.cdt-5bd43cf304999714f6e8b1c23638e7ffd0e51a74.tar.gz
org.eclipse.cdt-5bd43cf304999714f6e8b1c23638e7ffd0e51a74.tar.xz
org.eclipse.cdt-5bd43cf304999714f6e8b1c23638e7ffd0e51a74.zip
Bug 545819 - Meson properties dialog doesn't work with meson 0.50.1
- fix meson properties page to use meson setup -h - reenable meson ui tests - fix CMake New Project test to wait for shell open/closes - fix regression in EvalUnaryTypeID that is made visible by CMake New project test Change-Id: Id64d4df6d9764d0c84553b5c4f73fa44149bda19
-rw-r--r--build/org.eclipse.cdt.cmake.ui.tests/src/org/eclipse/cdt/cmake/ui/internal/tests/NewCMakeProjectTest.java11
-rw-r--r--build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewManualNinjaTest.java3
-rw-r--r--build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewMesonConfigureTest.java3
-rw-r--r--build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewMesonProjectTest.java10
-rw-r--r--build/org.eclipse.cdt.meson.ui/META-INF/MANIFEST.MF2
-rw-r--r--build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnaryTypeID.java12
7 files changed, 24 insertions, 20 deletions
diff --git a/build/org.eclipse.cdt.cmake.ui.tests/src/org/eclipse/cdt/cmake/ui/internal/tests/NewCMakeProjectTest.java b/build/org.eclipse.cdt.cmake.ui.tests/src/org/eclipse/cdt/cmake/ui/internal/tests/NewCMakeProjectTest.java
index 35c0e3bbdf..0f18d9b54e 100644
--- a/build/org.eclipse.cdt.cmake.ui.tests/src/org/eclipse/cdt/cmake/ui/internal/tests/NewCMakeProjectTest.java
+++ b/build/org.eclipse.cdt.cmake.ui.tests/src/org/eclipse/cdt/cmake/ui/internal/tests/NewCMakeProjectTest.java
@@ -21,8 +21,10 @@ import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem;
import org.junit.Before;
@@ -74,15 +76,20 @@ public class NewCMakeProjectTest {
});
// Select the shell again since magic wizardry happened
- bot.shell("New CMake Project").activate();
+ SWTBotShell newProjectShell = bot.shell("New CMake Project").activate();
+ bot.waitUntil(Conditions.shellIsActive("New CMake Project"));
+ newProjectShell.setFocus();
// Create the project
String projectName = "CMakeTestProj";
bot.textWithLabel("Project name:").setText(projectName);
bot.button("Finish").click();
+ bot.waitUntil(Conditions.shellCloses(newProjectShell));
// Make sure it shows up in Project Explorer
- bot.viewByPartName("Project Explorer").show();
+ SWTBotView explorer = bot.viewByPartName("Project Explorer");
+ explorer.show();
+ explorer.setFocus();
bot.tree().getTreeItem(projectName);
// Make sure the project indexer completes. At that point we're stable.
diff --git a/build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewManualNinjaTest.java b/build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewManualNinjaTest.java
index 74c37bf6a1..5024c98c2d 100644
--- a/build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewManualNinjaTest.java
+++ b/build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewManualNinjaTest.java
@@ -46,13 +46,11 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.FixMethodOrder;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runners.MethodSorters;
@SuppressWarnings("nls")
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
-@Ignore
public class NewManualNinjaTest {
private static SWTWorkbenchBot bot;
@@ -193,7 +191,6 @@ public class NewManualNinjaTest {
assertEquals("Build dir: " + projectPath + "/build/default", lines[5]);
assertEquals("Build type: native build", lines[6]);
assertEquals("Project name: MesonTestProj3", lines[7]);
- assertTrue(lines[8].startsWith("Native C compiler: cc"));
int i = 0;
while (i < 10 && !lines[lines.length - 1].startsWith("Build complete")) {
diff --git a/build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewMesonConfigureTest.java b/build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewMesonConfigureTest.java
index 15049faae3..f01ff98a7e 100644
--- a/build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewMesonConfigureTest.java
+++ b/build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewMesonConfigureTest.java
@@ -128,7 +128,6 @@ public class NewMesonConfigureTest {
}
@Test
- @Ignore
public void attemptMesonConfiguration() throws Exception {
String projectName = "MesonTestProj2";
// open C++ perspective
@@ -188,7 +187,6 @@ public class NewMesonConfigureTest {
}
@Test
- @Ignore
public void buildMesonProject() throws Exception {
String projectName = "MesonTestProj2";
// Make sure the project indexer completes. At that point we're stable.
@@ -330,7 +328,6 @@ public class NewMesonConfigureTest {
}
@Test
- @Ignore
public void rebuildMesonProject() throws Exception {
String projectName = "MesonTestProj2";
// Make sure the project indexer completes. At that point we're stable.
diff --git a/build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewMesonProjectTest.java b/build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewMesonProjectTest.java
index cc2a596756..74d6a0f604 100644
--- a/build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewMesonProjectTest.java
+++ b/build/org.eclipse.cdt.meson.ui.tests/src/org/eclipse/cdt/internal/meson/ui/tests/NewMesonProjectTest.java
@@ -43,13 +43,11 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.FixMethodOrder;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runners.MethodSorters;
@SuppressWarnings("nls")
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
-@Ignore
public class NewMesonProjectTest {
private static SWTWorkbenchBot bot;
@@ -185,10 +183,10 @@ public class NewMesonProjectTest {
assertEquals("Build dir: " + projectPath + "/build/default", lines[5]);
assertEquals("Build type: native build", lines[6]);
assertEquals("Project name: MesonTestProj", lines[7]);
- assertTrue(lines[8].startsWith("Native C compiler: cc"));
- assertEquals("Build targets in project: 1", lines[11]);
- assertTrue(lines[lines.length - 3].startsWith("[1/2] cc -IMesonTestProj@exe"));
- assertTrue(lines[lines.length - 2].startsWith("[2/2] cc -o MesonTestProj"));
+ assertTrue(lines[lines.length - 3].startsWith("[1/2] cc"));
+ assertTrue(lines[lines.length - 3].contains("-IMesonTestProj@exe"));
+ assertTrue(lines[lines.length - 2].startsWith("[2/2] cc"));
+ assertTrue(lines[lines.length - 2].contains("-o MesonTestProj"));
int i = 0;
while (i < 10 && !lines[lines.length - 1].startsWith("Build complete")) {
diff --git a/build/org.eclipse.cdt.meson.ui/META-INF/MANIFEST.MF b/build/org.eclipse.cdt.meson.ui/META-INF/MANIFEST.MF
index 86732d46ea..33a2b06471 100644
--- a/build/org.eclipse.cdt.meson.ui/META-INF/MANIFEST.MF
+++ b/build/org.eclipse.cdt.meson.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.cdt.meson.ui;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
Bundle-Vendor: %vendorName
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Activator: org.eclipse.cdt.meson.ui.Activator
diff --git a/build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java b/build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java
index 975702f965..9007fcd215 100644
--- a/build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java
+++ b/build/org.eclipse.cdt.meson.ui/src/org/eclipse/cdt/meson/ui/properties/MesonPropertyPage.java
@@ -120,7 +120,8 @@ public class MesonPropertyPage extends PropertyPage {
if (launcher instanceof ICBuildCommandLauncher) {
((ICBuildCommandLauncher) launcher).setBuildConfiguration(buildConfig);
}
- Process p = launcher.execute(new Path("meson"), new String[] { "-h" }, //$NON-NLS-1$ //$NON-NLS-2$
+ Process p = launcher.execute(new Path("meson"), //$NON-NLS-1$
+ new String[] { "setup", "-h" }, //$NON-NLS-1$ //$NON-NLS-2$
new String[0], sourceDir, new NullProgressMonitor());
if (p == null) {
return null;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnaryTypeID.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnaryTypeID.java
index e08dce34c8..ff508152fb 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnaryTypeID.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnaryTypeID.java
@@ -160,10 +160,14 @@ public class EvalUnaryTypeID extends CPPDependentEvaluation {
case op_sizeof:
case op_sizeofParameterPack:
case op_alignof:
- CPPBasicType t = (CPPBasicType) CPPVisitor.get_SIZE_T().clone();
- if (getValue().numberValue() != null)
- t.setAssociatedNumericalValue(getValue().numberValue().longValue());
- return t;
+ IType o = CPPVisitor.get_SIZE_T();
+ if (o instanceof CPPBasicType) {
+ CPPBasicType t = (CPPBasicType) o.clone();
+ if (getValue().numberValue() != null)
+ t.setAssociatedNumericalValue(getValue().numberValue().longValue());
+ return t;
+ }
+ return o;
case op_typeid:
return CPPVisitor.get_type_info();
case op_has_nothrow_copy:

Back to the top