Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-10-11 17:46:46 +0000
committerEugene Tarassov2013-10-11 17:46:46 +0000
commit03d498cf98a6d364aec0b7c51d10d6662dbab356 (patch)
tree4fae7bcc26c721d3ef41092ed31cb6170387b8d3 /plugins
parente0d8bd9d64857a6efbcc07d66171c9523ffc6245 (diff)
downloadorg.eclipse.tcf-03d498cf98a6d364aec0b7c51d10d6662dbab356.tar.gz
org.eclipse.tcf-03d498cf98a6d364aec0b7c51d10d6662dbab356.tar.xz
org.eclipse.tcf-03d498cf98a6d364aec0b7c51d10d6662dbab356.zip
TCF Tests: more C++ expression tests
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestExpressions.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestExpressions.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestExpressions.java
index 98b82a9aa..4774fbf71 100644
--- a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestExpressions.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestExpressions.java
@@ -87,6 +87,10 @@ class TestExpressions implements ITCFTest, RunControl.DiagnosticTestDone,
"tcf_test_short",
"tcf_test_long",
"tcf_cpp_test_bool",
+ "tcf_cpp_test_class_extension_var",
+ "tcf_cpp_test_class_extension_ptr",
+ "tcf_cpp_test_class_extension_member_ptr",
+ "tcf_cpp_test_anonymous_union_var"
};
private static final String[] test_expressions = {
@@ -142,6 +146,13 @@ class TestExpressions implements ITCFTest, RunControl.DiagnosticTestDone,
"tcf_cpp_test_class::tcf_cpp_test_class_nested::s_int == 2",
"tcf_cpp_test_class_extension::tcf_cpp_test_class_nested::s_int == 2",
"enum_val1 == 1 && enum_val2 == 2 && enum_val3 == 3",
+ "tcf_cpp_test_anonymous_union_var.f1 == 234",
+ "tcf_cpp_test_anonymous_union_var.f2 == 235",
+ "tcf_cpp_test_anonymous_union_var.f3 == 235",
+ "tcf_cpp_test_class_extension_var.f_int == 345",
+ "tcf_cpp_test_class_extension_ptr == &tcf_cpp_test_class_extension_var",
+ "tcf_cpp_test_class_extension_var.*tcf_cpp_test_class_extension_member_ptr == tcf_cpp_test_class_extension_var.f_int",
+ "tcf_cpp_test_class_extension_ptr->*tcf_cpp_test_class_extension_member_ptr == tcf_cpp_test_class_extension_var.f_int"
};
private static final String[] test_dprintfs = {
@@ -622,6 +633,11 @@ class TestExpressions implements ITCFTest, RunControl.DiagnosticTestDone,
if (txt.indexOf("tcf_cpp_test") >= 0) continue;
if (txt.indexOf("(bool)") >= 0) continue;
}
+ boolean vars_ok = true;
+ for (String nm : global_var_names) {
+ if (txt.indexOf(nm) >= 0 && global_var_ids.get(nm) == null) vars_ok = false;
+ }
+ if (!vars_ok) continue;
if (expr_ctx.get(txt) == null) {
if (rnd.nextBoolean()) {
Map<String,Object> scope = new HashMap<String,Object>();

Back to the top