Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-04-13 21:20:37 -0400
committerSergey Prigogin2012-04-13 21:20:37 -0400
commit2b8e34b7773953edb1ecc354d734eee79e767454 (patch)
tree7d8b948df251a215b34d555ae36c8c3c942e780d /core/org.eclipse.cdt.core.tests
parent89e9f5d607099d68b061d46b3905be9131912269 (diff)
downloadorg.eclipse.cdt-2b8e34b7773953edb1ecc354d734eee79e767454.tar.gz
org.eclipse.cdt-2b8e34b7773953edb1ecc354d734eee79e767454.tar.xz
org.eclipse.cdt-2b8e34b7773953edb1ecc354d734eee79e767454.zip
Treat __attribute__ ((__mode__ (__DI__))) as long instead of long long
in 64-bit mode.
Diffstat (limited to 'core/org.eclipse.cdt.core.tests')
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2BaseTest.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java9
2 files changed, 7 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2BaseTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2BaseTest.java
index 8305b21591..9f68e1f51e 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2BaseTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2BaseTest.java
@@ -107,12 +107,14 @@ public class AST2BaseTest extends BaseTestCase {
map.put("__GNUC__", "4");
map.put("__GNUC_MINOR__", "5");
map.put("__SIZEOF_INT__", "4");
+ map.put("__SIZEOF_LONG__", "8");
return map;
}
private static Map<String, String> getStdMap() {
Map<String, String> map= new HashMap<String, String>();
map.put("__SIZEOF_INT__", "4");
+ map.put("__SIZEOF_LONG__", "8");
return map;
}
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
index cbbaeb85a0..26a291eb12 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
@@ -9569,8 +9569,7 @@ public class AST2CPPTests extends AST2BaseTest {
// void f(int16_t*) {}
// void f(int32_t*) {}
// void f(int64_t*) {}
- // void f(word_t*) {}
- // void test(signed char* i8, short* i16, int* i32, long long* i64, word_t* word) {
+ // void test(signed char* i8, short* i16, int* i32, long* i64, word_t* word) {
// f(i8);
// f(i16);
// f(i32);
@@ -9584,11 +9583,13 @@ public class AST2CPPTests extends AST2BaseTest {
for (int i = 0; i < calls.length; i++) {
functions[i] = bh.assertNonProblem(calls[i], 1, ICPPFunction.class);
}
- for (int i = 0; i < functions.length; i++) {
- for (int j = i + 1; j < functions.length; j++) {
+ for (int i = 0; i < functions.length - 1; i++) {
+ for (int j = 0; j < i ; j++) {
assertNotSame(calls[i] + " and " + calls[j] + " resolve to the same function",
functions[i], functions[j]);
}
}
+ assertSame(calls[calls.length - 1] + " and " + calls[calls.length - 2] + " resolve to different functions",
+ functions[calls.length - 1], functions[calls.length - 2]);
}
}

Back to the top