Skip to content

Commit 49d7f05

Browse files
committed
---
yaml --- r: 37349 b: refs/heads/try c: e0a9d41 h: refs/heads/master i: 37347: 0e64933 v: v3
1 parent adcaca8 commit 49d7f05

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: 254a86e49edb0fbf38d335a50b1ab535fa7fd757
5+
refs/heads/try: e0a9d41b04f16b7771315dcbfcb4e1fa4c347c33
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/libstd/sort.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,25 @@ mod test_tim_sort {
10461046
tim_sort(arr);
10471047
fail ~"Guarantee the fail";
10481048
}
1049+
1050+
struct DVal { val: ~uint }
1051+
impl DVal: Ord {
1052+
pure fn lt(_x: &DVal) -> bool { true }
1053+
pure fn le(_x: &DVal) -> bool { true }
1054+
pure fn gt(_x: &DVal) -> bool { true }
1055+
pure fn ge(_x: &DVal) -> bool { true }
1056+
}
1057+
1058+
#[test]
1059+
fn test_bad_Ord_impl() {
1060+
let rng = rand::Rng();
1061+
let mut arr = do vec::from_fn(500) |_i| {
1062+
let randVal = rng.gen_uint();
1063+
DVal { val: ~randVal }
1064+
};
1065+
1066+
tim_sort(arr);
1067+
}
10491068
}
10501069

10511070
#[cfg(test)]

0 commit comments

Comments
 (0)