Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2014-08-26 12:29:30 -0400
committerEugene Tarassov2014-08-26 12:29:30 -0400
commit26d73c01ebb835d2106cdf11493e197f832385e5 (patch)
tree2de4ef28e7c9d53a7450e9ef93e0b06ebe9565b5
parent4a87f1ac229927afdcdeb2b58b4062465ff8e4c9 (diff)
downloadorg.eclipse.tcf-26d73c01ebb835d2106cdf11493e197f832385e5.tar.gz
org.eclipse.tcf-26d73c01ebb835d2106cdf11493e197f832385e5.tar.xz
org.eclipse.tcf-26d73c01ebb835d2106cdf11493e197f832385e5.zip
TCF Tests: more tests for $printf()
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/tests/TestExpressions.java4
1 files changed, 3 insertions, 1 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 f43a7c00e..9610b1993 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
@@ -187,6 +187,8 @@ class TestExpressions implements ITCFTest, RunControl.DiagnosticTestDone,
"$printf(\"%u\",func2_local3.f_enum)", "3",
"$printf(\"%g\",func2_local3.f_float)", "3.14",
"$printf(\"%g\",func2_local3.f_double)", "2.71",
+ "0 && $printf(\"fail\")", "",
+ "1 && $printf(\"OK\")", "OK",
};
@SuppressWarnings("unused")
@@ -833,7 +835,7 @@ class TestExpressions implements ITCFTest, RunControl.DiagnosticTestDone,
return;
}
for (byte b : data) {
- while (test_dprintfs[test_cnt * 2 + 1] == null) test_cnt++;
+ while (test_dprintfs[test_cnt * 2 + 1] == null || test_dprintfs[test_cnt * 2 + 1].length() == 0) test_cnt++;
char ch = test_dprintfs[test_cnt * 2 + 1].charAt(char_cnt++);
if (b != ch) {
exit(new Exception("Invalid output of $printf: " + test_dprintfs[test_cnt * 2 + 1] + " -> " + new String(data)));

Back to the top