Fix tests for str::le patch

This commit is contained in:
Marijn Haverbeke 2012-02-03 14:18:14 +01:00
parent 31b0d1b4bd
commit c976b7c623
7 changed files with 10 additions and 35 deletions

View file

@ -1,17 +1,14 @@
// error-pattern:Unsatisfied precondition constraint (for example, le(b, d
use std;
import str::*;
import uint::*;
// error-pattern:Unsatisfied precondition constraint (for example, uint::le
fn main() unsafe {
let a: uint = 1u;
let b: uint = 4u;
let c: uint = 5u;
// make sure that the constraint le(b, a) exists...
check (le(b, a));
check (uint::le(b, a));
// ...invalidate it...
b += 1u;
check (le(c, a));
check (uint::le(c, a));
// ...and check that it doesn't get set in the poststate of
// the next statement, since it's not true in the
// prestate.

View file

@ -1,11 +1,8 @@
// error-pattern:Predicate le(a, b) failed
use std;
import str::*;
import uint::le;
// error-pattern:Predicate uint::le(a, b) failed
fn main() unsafe {
let a: uint = 4u;
let b: uint = 1u;
check (le(a, b));
check (uint::le(a, b));
log(error, str::unsafe::slice_bytes_safe_range("kitties", a, b));
}

View file

@ -1,12 +1,9 @@
use std;
import str::*;
import uint::*;
fn main() unsafe {
let a: uint = 1u;
let b: uint = 4u;
let c: uint = 17u;
check (le(a, b));
check (uint::le(a, b));
c <- a;
log(debug, str::unsafe::slice_bytes_safe_range("kitties", c, b));
}

View file

@ -1,11 +1,7 @@
use std;
import str::*;
import uint::*;
fn main() unsafe {
let a: uint = 1u;
let b: uint = 4u;
check (le(a, b));
check (uint::le(a, b));
let c <- a;
log(debug, str::unsafe::slice_bytes_safe_range("kitties", c, b));
}

View file

@ -1,11 +1,7 @@
use std;
import str::*;
import uint::*;
fn main() unsafe {
let a: uint = 4u;
let b: uint = 1u;
check (le(b, a));
check (uint::le(b, a));
b <-> a;
log(debug, str::unsafe::slice_bytes_safe_range("kitties", a, b));
}

View file

@ -1,11 +1,7 @@
use std;
import str::*;
import uint::*;
fn main() unsafe {
let a: uint = 1u;
let b: uint = 4u;
check (le(a, b));
check (uint::le(a, b));
let c = b;
log(debug, str::unsafe::slice_bytes_safe_range("kitties", a, c));
}

View file

@ -1,10 +1,6 @@
use std;
import str::*;
import uint::*;
fn main() unsafe {
let a: uint = 1u;
let b: uint = 4u;
check (le(a, b));
check (uint::le(a, b));
log(debug, str::unsafe::slice_bytes_safe_range("kitties", a, b));
}