Skip to content

Commit c976b7c

Browse files
committed
Fix tests for str::le patch
1 parent 31b0d1b commit c976b7c

File tree

7 files changed

+10
-35
lines changed

7 files changed

+10
-35
lines changed

src/test/compile-fail/no-constraint-prop.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
// error-pattern:Unsatisfied precondition constraint (for example, le(b, d
2-
use std;
3-
import str::*;
4-
import uint::*;
1+
// error-pattern:Unsatisfied precondition constraint (for example, uint::le
52

63
fn main() unsafe {
74
let a: uint = 1u;
85
let b: uint = 4u;
96
let c: uint = 5u;
107
// make sure that the constraint le(b, a) exists...
11-
check (le(b, a));
8+
check (uint::le(b, a));
129
// ...invalidate it...
1310
b += 1u;
14-
check (le(c, a));
11+
check (uint::le(c, a));
1512
// ...and check that it doesn't get set in the poststate of
1613
// the next statement, since it's not true in the
1714
// prestate.

src/test/run-fail/fn-constraint.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
// error-pattern:Predicate le(a, b) failed
2-
use std;
3-
import str::*;
4-
import uint::le;
1+
// error-pattern:Predicate uint::le(a, b) failed
52

63
fn main() unsafe {
74
let a: uint = 4u;
85
let b: uint = 1u;
9-
check (le(a, b));
6+
check (uint::le(a, b));
107
log(error, str::unsafe::slice_bytes_safe_range("kitties", a, b));
118
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
use std;
2-
import str::*;
3-
import uint::*;
41

52
fn main() unsafe {
63
let a: uint = 1u;
74
let b: uint = 4u;
85
let c: uint = 17u;
9-
check (le(a, b));
6+
check (uint::le(a, b));
107
c <- a;
118
log(debug, str::unsafe::slice_bytes_safe_range("kitties", c, b));
129
}
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
use std;
2-
import str::*;
3-
import uint::*;
4-
51
fn main() unsafe {
62
let a: uint = 1u;
73
let b: uint = 4u;
8-
check (le(a, b));
4+
check (uint::le(a, b));
95
let c <- a;
106
log(debug, str::unsafe::slice_bytes_safe_range("kitties", c, b));
117
}
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
use std;
2-
import str::*;
3-
import uint::*;
4-
51
fn main() unsafe {
62
let a: uint = 4u;
73
let b: uint = 1u;
8-
check (le(b, a));
4+
check (uint::le(b, a));
95
b <-> a;
106
log(debug, str::unsafe::slice_bytes_safe_range("kitties", a, b));
117
}

src/test/run-pass/constraint-prop.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
use std;
2-
import str::*;
3-
import uint::*;
4-
51
fn main() unsafe {
62
let a: uint = 1u;
73
let b: uint = 4u;
8-
check (le(a, b));
4+
check (uint::le(a, b));
95
let c = b;
106
log(debug, str::unsafe::slice_bytes_safe_range("kitties", a, c));
117
}

src/test/run-pass/fn-constraint.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
use std;
2-
import str::*;
3-
import uint::*;
4-
51
fn main() unsafe {
62
let a: uint = 1u;
73
let b: uint = 4u;
8-
check (le(a, b));
4+
check (uint::le(a, b));
95
log(debug, str::unsafe::slice_bytes_safe_range("kitties", a, b));
106
}

0 commit comments

Comments
 (0)