Skip to content

Commit 55066cb

Browse files
committed
---
yaml --- r: 146301 b: refs/heads/try2 c: 01097cb h: refs/heads/master i: 146299: f4bd6d9 v: v3
1 parent 3366090 commit 55066cb

File tree

3 files changed

+34
-11
lines changed

3 files changed

+34
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: a027f164bcda6f99d0b44f79ca9f676ecc12a50a
8+
refs/heads/try2: 01097cbab00f64b922bcf5b91fb26a68f6d0d9cf
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/compiletest/runtest.rs

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
281281
};
282282
let config = &mut config;
283283
let cmds = props.debugger_cmds.connect("\n");
284-
let check_lines = props.check_lines.clone();
284+
let check_lines = &props.check_lines;
285285

286286
// compile test file (it shoud have 'compile-flags:-g' in the header)
287287
let mut ProcRes = compile_test(config, props, testfile);
@@ -315,11 +315,34 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
315315

316316
let num_check_lines = check_lines.len();
317317
if num_check_lines > 0 {
318+
// Allow check lines to leave parts unspecified (e.g., uninitialized
319+
// bits in the wrong case of an enum) with the notation "[...]".
320+
let check_fragments: ~[~[&str]] = check_lines.map(|s| s.split_str_iter("[...]").collect());
318321
// check if each line in props.check_lines appears in the
319322
// output (in order)
320323
let mut i = 0u;
321324
for line in ProcRes.stdout.line_iter() {
322-
if check_lines[i].trim() == line.trim() {
325+
let mut rest = line.trim();
326+
let mut first = true;
327+
let mut failed = false;
328+
for &frag in check_fragments[i].iter() {
329+
let found = if first {
330+
if rest.starts_with(frag) { Some(0) } else { None }
331+
} else {
332+
rest.find_str(frag)
333+
};
334+
match found {
335+
None => {
336+
failed = true;
337+
break;
338+
}
339+
Some(i) => {
340+
rest = rest.slice_from(i + frag.len());
341+
}
342+
}
343+
first = false;
344+
}
345+
if !failed && rest.len() == 0 {
323346
i += 1u;
324347
}
325348
if i == num_check_lines {

branches/try2/src/test/debug-info/method-on-enum.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// STACK BY REF
1616
// debugger:finish
1717
// debugger:print *self
18-
// check:$1 = {{Variant2, x = 1799, y = 1799}, {Variant2, 117901063}}
18+
// check:$1 = {{Variant2, [...]}, {Variant2, 117901063}}
1919
// debugger:print arg1
2020
// check:$2 = -1
2121
// debugger:print arg2
@@ -25,7 +25,7 @@
2525
// STACK BY VAL
2626
// debugger:finish
2727
// d ebugger:print self -- ignored for now because of issue #8512
28-
// c heck:$X = {{Variant2, x = 1799, y = 1799}, {Variant2, 117901063}}
28+
// c heck:$X = {{Variant2, [...]}, {Variant2, 117901063}}
2929
// debugger:print arg1
3030
// check:$4 = -3
3131
// debugger:print arg2
@@ -35,7 +35,7 @@
3535
// OWNED BY REF
3636
// debugger:finish
3737
// debugger:print *self
38-
// check:$6 = {{Variant1, x = 1799, y = 1799}, {Variant1, 117901063}}
38+
// check:$6 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
3939
// debugger:print arg1
4040
// check:$7 = -5
4141
// debugger:print arg2
@@ -45,7 +45,7 @@
4545
// OWNED BY VAL
4646
// debugger:finish
4747
// d ebugger:print self -- ignored for now because of issue #8512
48-
// c heck:$X = {{Variant1, x = 1799, y = 1799}, {Variant1, 117901063}}
48+
// c heck:$X = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
4949
// debugger:print arg1
5050
// check:$9 = -7
5151
// debugger:print arg2
@@ -55,7 +55,7 @@
5555
// OWNED MOVED
5656
// debugger:finish
5757
// debugger:print *self
58-
// check:$11 = {{Variant1, x = 1799, y = 1799}, {Variant1, 117901063}}
58+
// check:$11 = {{Variant1, x = 1799, y = 1799}, {Variant1, [...]}}
5959
// debugger:print arg1
6060
// check:$12 = -9
6161
// debugger:print arg2
@@ -65,7 +65,7 @@
6565
// MANAGED BY REF
6666
// debugger:finish
6767
// debugger:print *self
68-
// check:$14 = {{Variant2, x = 1799, y = 1799}, {Variant2, 117901063}}
68+
// check:$14 = {{Variant2, [...]}, {Variant2, 117901063}}
6969
// debugger:print arg1
7070
// check:$15 = -11
7171
// debugger:print arg2
@@ -75,7 +75,7 @@
7575
// MANAGED BY VAL
7676
// debugger:finish
7777
// d ebugger:print self -- ignored for now because of issue #8512
78-
// c heck:$X = {{Variant2, x = 1799, y = 1799}, {Variant2, 117901063}}
78+
// c heck:$X = {{Variant2, [...]}, {Variant2, 117901063}}
7979
// debugger:print arg1
8080
// check:$17 = -13
8181
// debugger:print arg2
@@ -85,7 +85,7 @@
8585
// MANAGED SELF
8686
// debugger:finish
8787
// debugger:print self->val
88-
// check:$19 = {{Variant2, x = 1799, y = 1799}, {Variant2, 117901063}}
88+
// check:$19 = {{Variant2, [...]}, {Variant2, 117901063}}
8989
// debugger:print arg1
9090
// check:$20 = -15
9191
// debugger:print arg2

0 commit comments

Comments
 (0)